Neural Networks - PowerPoint PPT Presentation

About This Presentation
Title:

Neural Networks

Description:

Comprised of one or more layers of neurons. Several types, we'll ... 'Tickling' increase certain weights. Hitting reduces certain weights. Usefulness in Games ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 24
Provided by: megan5
Category:

less

Transcript and Presenter's Notes

Title: Neural Networks


1
Neural Networks
  • Slides by Megan Vasta

2
Neural Networks
  • Biological approach to AI
  • Developed in 1943
  • Comprised of one or more layers of neurons
  • Several types, well focus on feed-forward
    networks

3
Neurons
Biological
Artificial
4
Neural Network Neurons
  • Receives n-inputs
  • Multiplies each input by its weight
  • Applies activation function to the sum of results
  • Outputs result

5
Activation Functions
  • Controls when unit is active or inactive
  • Threshold function outputs 1 when input is
    positive and 0 otherwise
  • Sigmoid function 1 / (1 e-x)

6
Neural Network Layers
  • Each layer receives its inputs from the previous
    layer and forwards its outputs to the next layer

7
Simple Example Application
  • Smart Sweepers
  • Red mine sweepers are best generated so far
  • Hit F key to switch between displays
  • Every generation changes neural net weights by a
    genetic algorithm

8
Neural Network Learning
  • Back-Propagation Algorithm

9
Back-Propagation Illustration
ARTIFICIAL NEURAL NETWORKS Colin Fahey's Guide
(Book CD)
10
Neural Networks and Game AI
  • simplify coding of complex state machines or
    rules-based systems
  • potential for AI to adapt as the game is played
  • I am very confident about it as well, because I
    understand what the neural net is doing. I
    haven't just created a big mysterious black box,
    I can map out the internal workings of it.

Jeff Hannan, creator of AI for Colin McRae Rally
2.0
http//www.generation5.org/content/2001/hannan.asp

11
Colin McRae Rally 2.0
  • Used standard feedforward multilayer perceptron
    neural network
  • Constructed with the simple aim of keeping the
    car to the racing line

http//www.generation5.org/content/2001/hannan.asp

12
BATTLECRUISER 3000AD
  • 1998 space simulation game
  • 'I am a Gammulan Criminal up against a Terran
    EarthCOM ship. My ship is 50 damaged but my
    weapon systems are fully functional and my goal
    is still unresolved' what do I do?

http//www.3000ad.com/shots/bc3k.shtml
http//www.gameai.com/games.html
13
Black and White
  • Uses neural networks to teach the creature
    behaviors
  • Tickling increase certain weights
  • Hitting reduces certain weights

14
Usefulness in Games
  • Control motor controller, for example, control
    of a race car or airplane
  • Threat Assessment input number of enemy ground
    units, aerial units, etc.
  • Attack or Flee input health, distance to enemy,
    class of enemy, etc.
  • Anticipation Predicting players next move,
    input previous moves, output prediction

http//www.onlamp.com/pub/a/onlamp/2004/09/30/AIfo
rGameDev.html
15
Influence Maps Refresher
  • From section 7.1
  • Creates a spatial database of game world info
  • Static or dynamic

Openness Layer
Occupancy Layer
Static Cover Layer
Desirability Layer
16
Neural Networks and Influence Maps
  • Usually influence map layers are combined using a
    weighted sum
  • Neural network can be used instead
  • Finding correct weight for each layer usually
    results in trial and error
  • Choosing relevant layers can be difficult
  • Potential loss of important information if
    factors cancel each other

17
Computational Complexity
  • Could lead to a very large number of calculations

18
Optimizations
  • Only analyze relevant portion of map
  • Reduce grid resolution
  • Train network during development, not in-game

19
Design Details
  • Need an input for each cell in each layer of the
    influence map
  • Need one output for each cell on map
  • Hidden units are arbitrary, usually 10-20 with
    some guess and test to prune it

20
Different Decisions and Personalities
  • One network for each decision
  • Implemented as one network with a different array
    of weights for each decision
  • Different personalities can have multiple arrays
    of weights for each decision

21
Training
  • Datasets from gaming sessions of human vs. human
    are best
  • Must decide whether training will occur in-game,
    during development, or both
  • Learning during play provides for adaptations
    against individual players

22
Conclusions
  • Neural networks provide ability to provide more
    human-like AI
  • Takes rough approximation and hard-coded
    reactions out of AI design (i.e. Rules and FSMs)
  • Still require a lot of fine-tuning during
    development

23
References
  • Four Cool Ways to Use Neural Networks in Games
  • Interview with Jeff Hannan, creator of AI for
    Colin McRae Rally 2.0
  • Interview with Derek Smart, creator of AI for
    Battlecruiser 3000AD
  • Neural Netware, a tutorial on neural networks
  • Sweetser, Penny. Strategic Decision-Making with
    Neural Networks and Influence Maps, AI Game
    Programming Wisdom 2, Section 7.7 (439 46)
  • Russell, Stuart and Norvig, Peter. Artificial
    Intelligence A Modern Approach, Section 20.5
    (736 48)
Write a Comment
User Comments (0)
About PowerShow.com