Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in...

57
Evolutionary Computation in Games: Dealing With Uncertainty Paolo Burelli - Aalborg University Copenhagen [email protected] - www.paoloburelli.com

Transcript of Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in...

Page 1: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Evolutionary Computation in Games: Dealing With Uncertainty

Paolo Burelli - Aalborg University [email protected] - www.paoloburelli.com

Page 2: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Me

• Research in Artificial Intelligence and Computer Graphics (Intelligent User Interfaces)

• Focus on Virtual Cinematographyand Player Modelling

Page 3: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Tutorial

• Evolutionary Computation in Games

• Uncertainty

• Uncertainty in Games

• Examples

Page 4: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Evolutionary Computation In Games

• Objective functions

- Player: performance/human likeness

- Game: player experience, balance, duration...

• Domain

- Player: controller/strategy

- Game: content configuration

Generate optimal player/game

Page 5: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Galactic Arms Race

• Evolving weapons

• Interactive Evolutionary Computation

- Objective function is human evaluation

• Compositional Pattern-Producing Networks

E. J. Hastings, R. K. Guha and K. O. Stanley. Automatic Content Generation in the Galactic Arms Race Video Game. IEEE Transactions on Computational Intelligence and AI in Games, 2009.

Page 6: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Uncertainty

• Noise

• Robustness

• Approximation

• Dynamic Problem

Page 7: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Noise

• Noisy objective function evaluation

• Same evaluation, different values

- Genotype v.s. phenotype

- Environment/Sensor noise

Page 8: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Robustness

• Variations of the design variables

• Variations of the environment

Page 9: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Approximation

• Objective function is an approximation of the real problem

• Evaluation is time-consuming

• No real fitness available

• Additional evaluation necessary

• Rugged fitness landscape

Page 10: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Dynamic Problem

• Optimum moves during optimization

- Environment

- Objectives

- Representation

• Linear/non-linear motion

• Oscillation

• Random jumps

Page 11: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Uncertainty in Games

• Affects the quality of content/agent

• Sources?

Page 12: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Uncertainty in Games

• Affects the quality of content/agent

• Sources:

- Player

- Sensors

- Dynamic virtual environment

- Complex virtual environment

- Slow execution

My list

Page 13: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Examples

• Automatic Camera Control

• Experience Driven Procedural Content Generation

• Simulation Based Optimization

Page 14: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Example 1: Automatic Camera Control

Page 15: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Virtual CameraCamera

Action

Frame

Page 16: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Automatic Camera Control

•Abstraction Layer

•High Level Properties

•Automatic Configuration

•Automatic Animation

Camera Controller

Virtual Environment

Camera

Visual and Motion

Properties

Page 17: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Inputs

Camera Controller

Virtual Environment

Camera

Visual and Motion Properties

Composition Properties

Animation Properties

Camera Properties

Page 18: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Inputs

Camera Controller

Virtual Environment

Camera

Visual and Motion

Properties

SubjectsEnvironmentGeometry

Page 19: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

CamOn

Camera Controller

Virtual Environment

Visual and Motion

PropertiesObjective Function

Visual and Motion

PropertiesSolver Animator Camera

Virtual Env.

Page 20: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Objective Function

Property 0 Property 1 Property N

Object.Func. 0

Object.Func. 1

Object.Func. N

Sum

Objective Function

Weight 0

Weight 1

Weight N

Page 21: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Objective Function: Properties

Visibility Vantage Angle Projection Size Frame Position

Page 22: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Objective Function: Domain

X Y Z α β

Camera

Position Orientation

Page 23: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Main source of uncertainty?

Page 24: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Main source of uncertainty: Dynamic Problem

Page 25: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Dynamic Problem

• Subjects and other objects move in the virtual space

• The frame properties might change

• The geometry of the subjects might change

Page 26: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Possible Solution

• Restart

Page 27: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Possible Solution

• Restart

• Simple

Page 28: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Possible Solution

• Restart

• Simple

• No time

Page 29: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Possible Solution

• Restart

• Simple

• No time

• Waste of information

Page 30: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Possible Solution

• Restart

• Simple

• No time

• Waste of information

• Might be the only solution

Page 31: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Challenges

Information Reusehow to store and reuse information

about the landscape?

Population Diversityhow to avoid premature population convergence?

Page 32: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Information Reuse

• Explicit memory

- Data structure: landscape fingerprint, optima

- Ruse part of the population

• Implicit memory

- Multiploidy/Diploidy

• Information validity

- Generational

Page 33: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Population Diversity

• Diversity after change

- Hypermutation

- Variable local search

• Diversity throughout the optimization

- Random immigrants

• Multiple populations

Rasmus K. Ursen. Multinational GAs: Multimodal optimization techniques in dynamic environments. Evolutionary Computation Conference, 2000

Page 34: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Hybrid Genetic Algorithm

• Hybrid Lamarckian-Darwinian evolution

• Explore if early convergence

• Early convergence if:

- No improvement for one frame

- Complete occlusion

Paolo Burelli. Interactive Virtual Cinematography. IT University Of Copenhagen, 2012

Page 35: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Example 2: Experience Driven Procedural Content Generation

Page 36: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

EDPCG

Georgios N. Yannakakis and Julian Togelius. Experience-driven procedural content generation. IEEE Transactions on Affective Computing, 2011.

Op#mize  player  experience

Capture  player  experience

Model  the  effect  of  game  content

Page 37: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Challenges

• How to capture Player Experience?

• How to evaluate the quality of content?

• How to optimize game content for Player Experience?

Page 38: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Capturing Player Experience

• Subjectively

- Asking players: self-report questionnaires (ranking, preferences)

• Objectively

- Physiology (GCR, EEG, EMG, BVP,…); eye-tracking; facial expression; speech

• GamePlay-Based

- Player game preferences (what players do relates to their experience)

Page 39: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Content Quality

• Direct utility/fitness

- A direct mapping between content and quality; e.g. number of jumps in a platform game

• Simulation-based

- An AI agent (human-like?) plays the game for a while and content is evaluated through playing style

• Interactive fitness

- Real-time evaluation via a player or players

Page 40: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Player Experience Model

Optimize Content

ContentOptimizerContent

Quality

Content Representationn

Page 41: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Main sources of uncertainty?

Page 42: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Main sources of uncertainty: Noise, Robustness

Page 43: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Noise

Page 44: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Dealing with Noise• Explicit average

- Multiple samples per evaluation

- Average with neighborhud

- Interpolation

• Implicit average

- Increase population size

• Selection scheme

- Threshold for selection

• Noise might be useful...

Sandor Markon, Dirk V. Arnold, Thomas Back, Thomas Beielstein and Hans–Georg Beyer. Thresholding – a Selection Operator for Noisy ES, IEEE Congress on Evolutionary Computation, 2001

Page 45: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Robustness

Page 46: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Dealing With Robustness

• Optimizing Expected Fitness

- Average in the neighborhood

- Average with similar previous values

- Add noise and increase population

• Multi-Objective Optimization

- Fitness v.s. Robustness

- Measure of robustness

Yaochu Jin and Bernhard Sendhoff. Trade-off between Performance and Robustness: An Evolutionary Multiobjective Approach. Evolutionary Multi-Criterion Optimization, 2003

Fitness

Robustness

Page 47: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Example 3: Simulation Based Optimization

Page 48: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Evolving Strategy Game Units

• Objective: complementarity

• Balanced units sets stronger than unbalanced ones

Tobias Mahlmann, Julian Togelius and Georgios N. Yannakakis. Towards Procedural Strategy Game Generation : Evolving Complementary Unit Types. European Conference on Applications of Evolutionary Computation, 2011.

<

Page 49: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Problem Characteristics

• 21 attributes in the gene

• Objective function based on 6 matches player 200 times

• 1 minute per evaluation

Page 50: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Time Consuming Evaluation

• Long experimental time

• No possible “real-time” execution

• Applies also to agent learning

Page 51: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Main source of uncertainty: Approximation

Page 52: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Motivations

• Time consuming evaluation

• No available analytical fitness

• Noise Reduction

• Rugged landscape

• Smart population initialisation

Page 53: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Approximation Methods

• Simplified simulation

• Data-driven functional approximation

• Evaluations reduction

- Fitness inheritance

- Fitness imitation

- Fitness assignment

Page 54: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Dealing With ApproximationCombine approximated function with real-function

Individual Based Control

•Random•Best•Most uncertain•Most representative

Generation Based Control

Whole population every N generations

Jürgen Branke and Christian. Faster convergence by means of fitness estimation. Soft Computing, 2005

Page 55: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Future Work

• Experiment these techniques in games

• Use games as a benchmark for uncertainty

• Other forms of uncertainty?

Page 56: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

References• Erin J. Hastings, Ratan K. Guha and Kenneth O. Stanley. Automatic Content Generation in the Galactic Arms Race Video Game. IEEE

Transactions on Computational Intelligence and AI in Games, 2009.

• Paolo Burelli. Interactive Virtual Cinematography. IT University Of Copenhagen, 2012

• Rasmus K. Ursen. Multinational GAs: Multimodal optimization techniques in dynamic environments. Evolutionary Computation Conference, 2000

• Georgios N. Yannakakis and Julian Togelius. Experience-driven procedural content generation. IEEE Transactions on Affective Computing, 2011.

• Sandor Markon, Dirk V. Arnold, Thomas Back, Thomas Beielstein and Hans–Georg Beyer. Thresholding – a Selection Operator for Noisy ES, IEEE Congress on Evolutionary Computation, 2001

• Yaochu Jin and Bernhard Sendhoff. Trade-off between Performance and Robustness: An Evolutionary Multiobjective Approach. Evolutionary Multi-Criterion Optimization, 2003

• Tobias Mahlmann, Julian Togelius and Georgios N. Yannakakis. Towards Procedural Strategy Game Generation  : Evolving Complementary Unit Types. European Conference on Applications of Evolutionary Computation, 2011.

• Jürgen Branke and Christian. Faster convergence by means of fitness estimation. Soft Computing, 2005

• Jürgen Branke and Yaochu Jin. Evolutionary Optimization in Uncertain Environments. IEEE Transaction on Evolutionary Computation, 2005

Page 57: Evolutionary Computation in Games: Dealing With Uncertainty · • Uncertainty • Uncertainty in Games • Examples. Evolutionary Computation In Games •Objective functions-Player:

Thank you! Questions?

EvoGAMES 2013Bio-inspired Algorithms in Games

Submission  deadline:  1  November  2012Vienna,  3-­‐5  April  2013