45

Click here to load reader

Science and Videogames. Computational intelligence in videogames

Embed Size (px)

DESCRIPTION

Presentation with a description of the actual relationship between science and videogames, concerning several aspects and, mainly focusing on the computational intelligence applied to videogames area. This is a tutorial given at the GAME-ON 2012 conference, held at the University of Málaga from 14 to 16th November.

Citation preview

Page 1: Science and Videogames. Computational intelligence in videogames

PLAYER 1 – ANTONIO M. MORA GARCÍA

SCIENCE AND VIDEOGAMES SCIENCE AND VIDEOGAMES

© GAME-ON 2012

- Press START -

Page 2: Science and Videogames. Computational intelligence in videogames

• Introduction videogames market, players taxonomy, current game systems. Videogames at the University. • Videogames applied to science videogame system-based science, engineering and technology.

• Science in videogames scientific principles of videogames. • Researching in videogames main research fields in videogames. • Examples: Our works

Page 3: Science and Videogames. Computational intelligence in videogames

INTRODUCTION INTRODUCTION

Page 4: Science and Videogames. Computational intelligence in videogames

• Very big growing of videogames market, due to their movement to new groups of interest: people older than 25 and younger than 10, including parents and grandparents, in addition to the feminine sector.

• This growing is mainly due to a change in the

videogames philosophy, offering more ‘adult’ contents, or the contrary, easier and child-focused, in addition to direct and brief action games.

There is a wide market for science!!!

Page 5: Science and Videogames. Computational intelligence in videogames

• The usual players have auto renamed as hardcore gamers. They (really) enjoy and profit the games, they are informed, like most types of games, and play for long periods (if possible).

• In the current market has arisen the so-called casual gamers: sporadic players users of brief and direct action games (arcade, sports, mini- games), or the so-called no-games (training games, art games, and so on).

More fun if they plug-in the console A friendly way to say “Virgin until the age of 37”

Page 6: Science and Videogames. Computational intelligence in videogames

• A sincere feeling:

Page 7: Science and Videogames. Computational intelligence in videogames

• In addition to PC and mobile systems (iOS, Android, etc), there are some extended systems:

• Home consoles

• Portable consoles

Wii Xbox 360 Playstation 3

Nintendo Playstation 3DS Vita

Page 8: Science and Videogames. Computational intelligence in videogames

• And many more (open-philosphy consoles), not known for most of the people.

GP2X Wiz Caanoo

Dingoo Pandora

Page 9: Science and Videogames. Computational intelligence in videogames

• Another (positive) consequence is the adaptation of the study plans for videogames development.

• In Spain there are arising courses in Grades and Masters

• Anyway, we are still far from other countries in Europe: – Example: Center for Computer Game Research (Copenhagen)

Page 10: Science and Videogames. Computational intelligence in videogames
Page 11: Science and Videogames. Computational intelligence in videogames

SCIENTIFIC APPLICATIONS

SCIENTIFIC APPLICATIONS

Page 12: Science and Videogames. Computational intelligence in videogames

Its (at the beginning) novel controller (Wiimote) has been very famous mainly among the scientific and technical community:

• Robots control, reactive/touch-detecting screens or surfaces, or pattern/subjects recognition, among others.

http://www.youtube.com/watch?v=v1AJ_OBJUpY http://www.youtube.com/watch?v=TkmxhVtvLoM http://www.youtube.com/watch?v=0awjPUkBXOU

Page 13: Science and Videogames. Computational intelligence in videogames

There is even a project, WiiLab, which has created a Matlab toolbox for interacting with Wiimote… …and with Game Maker (an easy game development framework)

http://code.google.com/p/giimote/

http://www.youtube.com/watch?v=EeBAYeoX7-8

Page 14: Science and Videogames. Computational intelligence in videogames

• It was initially used for building console-based clusters (super computers), due to the powerful chip Cell, and the cheap price it had.

• It was possible to use an additional Linux O.S. (Yellow Dog), very flexible.

• But later, the console was updated for not admitting the installation of any additional O.S., so Linux was lost forever.

Page 15: Science and Videogames. Computational intelligence in videogames

Very famous in the community due to Kinect:

• Robots control by movement and/or voice, pattern and person recognition, among others.

http://www.youtube.com/watch?v=Sw4RvwhQ73E http://www.youtube.com/watch?v=c6jZjpvIio4

Page 16: Science and Videogames. Computational intelligence in videogames

SCIENCE IN VIDEOGAMES

SCIENCE IN VIDEOGAMES

Page 17: Science and Videogames. Computational intelligence in videogames
Page 18: Science and Videogames. Computational intelligence in videogames

• Videogames have always respected physics rules, even a ‘simple’ one (in appearance) such as Super Mario Bros. (jumps, trajectories, inertia,…).

• Nowadays the tendency is to develop completely realistic games in that sense, by implementing specific engines for physics modeling.

http://www.youtube.com/watch?v=B7_rPDwSKe8

Page 19: Science and Videogames. Computational intelligence in videogames

The scientific principles of operation of the first main controller for a console based in movement (Wiimote) are:

http://www.youtube.com/watch?v=ETAKfSkec6A

Page 20: Science and Videogames. Computational intelligence in videogames

RESEARCH IN VIDEOGAMES

RESEARCH IN VIDEOGAMES

Page 21: Science and Videogames. Computational intelligence in videogames

• In addition to visual and physics realism, it is desired to model enemies and partners , with an ‘intelligent’ (human) behavior.

• Thus a big amount of resources have been focused on artificial intelligence.

Realistic Game

Page 22: Science and Videogames. Computational intelligence in videogames

• AI is the area of computer science devoted to implement nonliving rational agents (at least in appearance).

• Inside a videogame, AI is focused on defining behavior techniques for non-playable characters (NPCs), commonly named bots, which simulate being rational. These characters could be enemies or partners.

• It is not a matter of literally showing human behavior, since it means the consideration of mistakes.

Page 23: Science and Videogames. Computational intelligence in videogames

• In the very beginning, NPCs followed some predefined behavior patterns, that the programmer implemented at game implementation and which were invariable.

• Reactive AIs proposed NPC’s actions as a response to player’s actions.

• Dedicated AIs set different ‘personalities’ for NPCs.

Page 24: Science and Videogames. Computational intelligence in videogames

• Later there were introduced the finite state machines, which define a set of possible states for the NPC, and a set of transitions between them. Transitions are based in perceptions about the game or about the players.

By Fergu

Page 25: Science and Videogames. Computational intelligence in videogames

• Other extended methods include rule-based systems and decision trees. In both cases, there is a set of rules that the NPC will follow, depending on the inputs or perceptions about its environment.

Page 26: Science and Videogames. Computational intelligence in videogames

• Nowadays it is usual to mix some of these techniques, thus in most games NPCs follow predefined behavioral models (scripts), depending on player’s actions.

• Their advantage is that it is easy to define them, considering programmer’s experience and modeling player’s behavior.

• Their main disadvantage is the low flexibility they have in order to adapt to new situations/events.

• Moreover, NPCs have additional advantages over the human player, such as perfect aim (based in exact coordinates), or navigation points (waypoints in maps modeling advantageous routes, shortest paths, etc).

• Just a few ‘scientific techniques’ have been used in commercial games…

Page 27: Science and Videogames. Computational intelligence in videogames

• Traditionally in the scientific area it was called Game Theory, a branch of applied mathematics in which there are some rewards depending on the chosen decision. It involved simple, but difficult to solve, games: Hanoi towers, prisoner’s dilemma, game of life.

• These games proposed problems to be solved by means of exact methods, heuristics or metaheuristics: tree-based search, A*, evolutionary algorithms, ant colony optimization,…

• Moreover, the resolution of traditional games (usually puzzles) has also been studied from the ‘ancient times’ in science life: chess, backgammon, mastermind, sudoku

Page 28: Science and Videogames. Computational intelligence in videogames

• videogames provide a new environment for solving heterogeneous problems.

• The most famous (and probably the first) problem addressed was AI related issues. It still remains as the main (the most studied) problem in the area.

• However, with the advances and improvement of technology, videogames have increased their complexity, so new researching lines have been arisen: – Search in maps, combat prediction, or simulation, to cite a few

• Nowadays, there are a huge number of research fields inside videogames scope, so research studies and publications have grown exponentially.

Page 29: Science and Videogames. Computational intelligence in videogames

• AI branch which applies metaheuristics and bioinspired methods for the resolution of complex problems, usually by means of adaptive systems.

• It is necessary to model the game (or a part of it) as an optimization, search or learning problem, among others.

• Examples: – Pathfinding – Combat prediction – Automated generation of behavioral rules – Parameter tuning – Objective decision

Page 30: Science and Videogames. Computational intelligence in videogames

• The most used metaheuristics are: Genetic Algorithms (GA), Ant Colony Optimization (ACO), Monte-Carlo Tree Search (MCTS), A*, Genetic Programming (GP), Fuzzy Logic, Neural Networks…

• Which are mostly applied over finite state machines (FSM), scripts, rule-based systems (RS) or expert system (ES), among others.

Page 31: Science and Videogames. Computational intelligence in videogames

• NPC’s AI: try to model AI aspects for enemies or partners. It is usual to apply GAs to optimize parameters considered in behavioral rules.

• Rule system generation: automated definition of behavioral rules sets, which determine the way the NPCs act in different situations. It is usual to apply GP.

• Human-like behavior analysis and modeling: the objective is to model NPCs which behave as human players. Data mining and learning techniques are usually employed.

Page 32: Science and Videogames. Computational intelligence in videogames

• Cheating detection: trick detection techniques, based on the study of statistics about matches.

• Move and battle prediction: prediction

methods are trained (using neural networks) analyzing data from recorded matches, trying to anticipate future movements and actions.

• Learning in games: adaptive agents can be created by means of reinforcement learning.

Page 33: Science and Videogames. Computational intelligence in videogames

• Game mechanics and features analysis: game components are analyzed and parameterized in order to get numeric valuations of the game components.

• Exploration and search in games: search algorithms are applied in order to find the best paths to objectives in maps, or to explore some areas maximizing the covering, for instance.

• Content, characters, levels and story generation: is the so-called procedural content generation, and is aimed to generate automatically contents. They are valued by the players (interactive methods) or by means of mathematical models.

Page 34: Science and Videogames. Computational intelligence in videogames

EXAMPLES EXAMPLES

Page 35: Science and Videogames. Computational intelligence in videogames

i initial population f evaluation function (fitness) ? stop condition Se selection Cr crossover Mu mutation Re replacement

by Johann Dréo

Page 36: Science and Videogames. Computational intelligence in videogames

http://www.youtube.com/watch?v=ejxfTy4lI6I

Page 37: Science and Videogames. Computational intelligence in videogames

Unreal is a first person shooter (FPS). Famous due to the excelent AI of the enemies (bots), which makes it an amazing multiplayer game. Unreal Tournament series is very well considered. It offers an editor (UnrealEd) which lets us change almost anything in the game even the behavior of the bots. It uses the language UnrealScript.

Page 38: Science and Videogames. Computational intelligence in videogames

A java middleware for Unreal Tournament series games and Defcon games. The architecture is as follows: It is possible to interact with the game from a java program, getting higher independence (avoiding Unrealscript restrictions) and increasing the Possibilities (java libraries). On the contrary, the structures, classes, functions and workflows defined in the Unreal engine, cannot be accessed, nor used.

Page 39: Science and Videogames. Computational intelligence in videogames

Bot based in GA

(GA-Bot)

Evolutionary

process

Std

AI

population

Std

AI

Std

AI

FITNESS EVALUATION

• Analyze FSM • Identify behavioral parameters • Optimize them

A.M. Mora et al.: Evolving bot AI in Unreal. EVO* 2010. LNCS 6024, Springer, pp. 170–179

Page 40: Science and Videogames. Computational intelligence in videogames

• Analyze FSM • Identify parameters devoted to

team performance • Optimize them

Team of bots

based on GAs

(GT-Bot)

Evolutionary

Process

population

FITNESS EVALUATION

Std

AI Std

AI

Std

AI

vs

Or

A.M. Mora et al.: Evolving the cooperative behaviour in unreal bots. IEEE CIG 2010, pp. 241–248

Page 41: Science and Videogames. Computational intelligence in videogames

• Define a FSM based in expert’s knowledge: – Two state levels, Set of rules

• Optimize parameters by means of a GA

Page 42: Science and Videogames. Computational intelligence in videogames

• Examples of NPCs/Bots/Agents:

http://www.youtube.com/watch?v=EiAWYGNpu9M http://www.youtube.com/watch?v=0Khtp2tEU1k

Page 43: Science and Videogames. Computational intelligence in videogames

A good way to start working:

• 2K BotPrize: Unreal bots which should behave as human as possible. • Starcraft: combats inside the famous RTS. • Planet Wars: simpler RTS game. Google AI Challenge 2010. • ANTS: RTS modeling ant’s fighting. Google AI Challenge 2011. • Pac-Man: It can be implemented pac-man’s or ghosts intelligence. • Simulated Car Racing: Car races, track generation, mechanical

optimization. • Mario AI: Agent, learning, level generation.

http://geneura.ugr.es/cig2012/competitions.html

Page 44: Science and Videogames. Computational intelligence in videogames

• Conferences: – IEEE CIG – CGAMES – GAME-ON – CGAT – Special Sessions: LION, IWANN, EVO*, GECCO, WCCI

• Journals: – Transactions on Computational

Intelligence and AI in Games (IEEE) – Entertainment Computing (Springer) … – Anyone which accept your paper

Page 45: Science and Videogames. Computational intelligence in videogames