using cellular automata and influence maps in games l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Using Cellular Automata and Influence Maps in Games PowerPoint Presentation
Download Presentation
Using Cellular Automata and Influence Maps in Games

Loading in 2 Seconds...

play fullscreen
1 / 24

Using Cellular Automata and Influence Maps in Games - PowerPoint PPT Presentation


  • 319 Views
  • Uploaded on

Using Cellular Automata and Influence Maps in Games. Penny Sweetser The University of Queensland. Overview. Cellular Automata Influence Maps Grid-Based Techniques Decision making, environmental modelling Spread information in different ways Simple and powerful, separately or together

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Using Cellular Automata and Influence Maps in Games' - Sophia


Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
using cellular automata and influence maps in games

Using Cellular Automata and Influence Maps in Games

Penny Sweetser

The University of Queensland

overview
Overview
  • Cellular Automata
  • Influence Maps
  • Grid-Based Techniques
  • Decision making, environmental modelling
  • Spread information in different ways
  • Simple and powerful, separately or together
  • Design, implementation, application to games
cells
Cells
  • Divide game world into cells
  • Each cell a database containing info about:
    • combat strength, vulnerable assets, area visibility, body count, resources, weather, passability
  • Cell size – accuracy / efficiency
    • 10-20 standard units side by side
influence maps 1
Influence Maps1
  • Strategic assessment / decision-making
  • Usually strategy games
  • Spatial representation of AI’s knowledge about the game world
  • Strategic perspective of game state layered over geographical

1Tozour, P. (2001) Influence Mapping. In M. Deloura (Ed.), Game Programming Gems 2. Hingham, MA: Charles River Media, Inc., pp. 287-297.

influence maps
Influence Maps
  • Influence map indicates:
    • where the AI’s forces are deployed
    • where the enemy is / most likely to be
    • where the “frontier” between players lies
    • what areas are yet to be explored
    • where significant battles have occurred
    • where enemies are most likely to attack in the future
influence maps6
Influence Maps
  • IM’s structure makes it possible to make intelligent inferences about:
    • areas of high strategic control
    • weak spots in an opponent’s defences
    • prime “camping” locations
    • strategically vulnerable areas
    • choke points on the terrain
    • other meaningful features that human players would choose through intuition or practice
influence maps7
Influence Maps
  • IM tracks variables separately for each player (multiple parallel IM’s)
  • Each AI keeps one IM for itself and one for every other player
  • Could keep one IM and let all AI’s access it (but this is cheating)
influence propagation
Influence Propagation
  • Once initial values given to cells, needs to be propagated
  • More accurate strategic perspective – current influence / potential influence
  • Spread influence with “falloff” rule
  • Selection of falloff rules is subjective, requires tweaking and tuning
  • Exponential falloff – choose a constant 0..1
  • Need to terminate falloff (never reaches 0)
  • Falloff should be proportional to cell size
influence propagation9
Influence Propagation
  • Top-left:
    • Game state
  • Top-right:
    • Propagation
  • Lower-left:
    • Influence values
  • Lower-right:
    • Influence grey scale

2Sweetser, P. (2004) Strategic Decision-Making with Neural Networks and Influence Maps. In S. Rabin (Ed.), AI Game Programming Wisdom 2. Hingham, MA: Charles River Media, Inc., pp. 439-446.

desirability value
Desirability Value
  • Estimates cell’s value with respect to a certain decision (e.g. where to attack)
  • Cells can be ranked by how good they appear for the decision
  • Usually calculated with weighted sum
    • Choose relevant variables for decision
    • Multiply by coefficient (roughly indicates variable’s importance for decision)
    • Sum all weighted variables together
  • Choice of variables / weights is subjective
desirability value11
Desirability Value
  • Variables used depends on game / design / decisions being made
  • Need to compensate for different units of measure (e.g. health vs. rate of fire)
  • Example desirability values:
    • attack and defence desirability, exploration, defensive asset placement, resource-collection asset placement, unit-producing asset placement, vulnerable asset placement
weighted sums for desirability
Weighted Sums for Desirability
  • Weighted sums are simple / transparent
  • But:
    • Choosing the relevant variables is difficult
    • Finding good weights is time-consuming
    • Important info might be lost
alternative to weighted sums
Alternative to Weighted Sums
  • Simulated annealing or evolutionary approaches to find weights
  • Neural networks:
    • Determine variables that most influence decision / ignore irrelevant variables
    • Variables are analysed in parallel, info in individual variables is not lost
    • Weights are determined during training
neural networks in im s 2
Neural Networks in IM’s2
  • Computational complexity
    • Number of inputs and weights
    • But don’t need to analyse whole map
    • Train before shipping
  • Different AI personalities / strategies
  • Learn to mimic human players

2Sweetser, P. (2004) Strategic Decision-Making with Neural Networks and Influence Maps. In S. Rabin (Ed.), AI Game Programming Wisdom 2. Hingham, MA: Charles River Media, Inc., pp. 439-446.

cellular automata in games
Cellular Automata in Games
  • Proposed as a solution to static environments in games3
  • More dynamic / realistic behaviour of scripted elements – fire, water, explosions, smoke, heat
  • Conducting research into using CA in games for environmental modelling

3Forsyth, T. (2002) Cellular Automata for Physical Modelling. In D. Treglia (Ed.), Game Programming Gems 3. Hingham, MA: Charles River Media, Inc.

cellular automata research
Cellular Automata Research
  • No research or implementation of CA in games
  • Are CA appropriate for use in games?
  • Can CA facilitate emergent gameplay?
  • What effect will this have on the player?
cellular automata traditional
Cellular Automata - Traditional
  • Spatial, discrete time model
  • Space represented as uniform grid
  • Each cell has a state (from a finite set)
  • Time advances in discrete steps
  • Each step, cells change state according to a set of rules
  • New state = function of previous state of the cell and state of neighbour cells
cellular automata traditional18
Cellular Automata - Traditional
  • 1D – single line of cells, 2 neighbours
  • 2D – 4 or 8 neighbours

1

2

2

1

cellular automata in games19
Cellular Automata in Games
  • States are continuous (not discrete)
    • E.g. heat = 657.21
  • States have multiple variables
    • E.g. heat, pressure, water
  • Rules are continuous
    • Damage = temp * burning rate
ca in games research 4
CA in Games Research4
  • Environmental systems
    • Heat and Fire
    • Rain and Fluid Flow
    • Pressure and Explosions
    • Integrated System

4 Sweetser, P. & Wiles, J. (unpublished) Using Cellular Automata to Facilitate Emergence in Game Environments. Submitted to the Journal of Game Development.

ca and ims in games
CA and IMs in Games
  • Cellular automata and influence maps can be integrated
  • Values generated by CA used for decision-making by influence map
    • E.g. AI can consider environmental factors when making a decision
ca im in games research
CA & IM in Games Research
  • Agents used CA and IM to determine how to react to the environment
  • Agents use the cellular automata values to determine “comfort”
  • Added a goal (desirability)
  • Desirability of goal is propagated
conclusion
Conclusion
  • Grid-based techniques
    • Cellular Automata
    • Influence Maps
  • Advantages
    • Allow type of behaviour to be specified
  • Disadvantages
    • Lots of tuning / testing to get desired behaviour
references
References

Forsyth, T. (2002) Cellular Automata for Physical Modelling. In D. Treglia (Ed.), Game Programming Gems 3. Hingham, MA: Charles River Media, Inc.

Sweetser, P. (2004) Strategic Decision-Making with Neural Networks and Influence Maps. In S. Rabin (Ed.), AI Game Programming Wisdom 2. Hingham, MA: Charles River Media, Inc., pp. 439-446.

Sweetser, P. & Wiles, J. (unpublished) Using Cellular Automata to Facilitate Emergence in Game Environments. Submitted to the Journal of Game Development.

Tozour, P. (2001) Influence Mapping. In M. Deloura (Ed.), Game Programming Gems 2. Hingham, MA: Charles River Media, Inc., pp. 287-297.