ai and game programming
Download
Skip this Video
Download Presentation
AI and Game Programming

Loading in 2 Seconds...

play fullscreen
1 / 10

AI and Game Programming - PowerPoint PPT Presentation


  • 88 Views
  • Uploaded on

AI and Game Programming. CIS 487/587 Bruce R. Maxim UM-Dearborn. Selected AI Techniques. Deterministic algorithms Heuristic programming Patterns and scripts Finite state machines Production systems Genetic algorithms Neural networks. Deterministic Algorithms. Each clock tick

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 ' AI and Game Programming' - nay


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
ai and game programming

AI and Game Programming

CIS 487/587

Bruce R. Maxim

UM-Dearborn

selected ai techniques
Selected AI Techniques
  • Deterministic algorithms
  • Heuristic programming
  • Patterns and scripts
  • Finite state machines
  • Production systems
  • Genetic algorithms
  • Neural networks
deterministic algorithms
Deterministic Algorithms
  • Each clock tick

asteroid_x += asteroid_x_velocity

asteroid_y += asteroid_y_velocity

  • Asteroids follow their course until
    • off screen
    • collision occurs
    • blown up
random motion
Random Motion

fly_x = rand() % 80

fly_y= rand() % 80

while(~done())

{

fly_count = 0

fly_x_velocity = -8 + rand() % 16

fly_y_velocity = -8 + rand() % 16

while (++fly_count < 10)

{

fly_x += fly_x_velocity

fly_y += fly_y_velocity

}

tracking and pursuit
Tracking and Pursuit

if (player_x > monster_x)

monster_x++

if (player_x < monster_x)

monster_x--

if (player_y > monster_y)

monster_y++

if (player_y < monster_y)

monster_y--

tracking and evasion
Tracking and Evasion

if (player_x < monster_x)

monster_x++

if (player_x > monster_x)

monster_x--

if (player_y < monster_y)

monster_y++

if (player_y > monster_y)

monster_y--

patterns and scripts
Patterns and Scripts
  • Get keys out of pocket
  • Put key in door
  • Open door
  • Get in car
  • Close door
  • Put key in ignition
  • Turn key to start car
behavioral state systems
Behavioral State Systems
  • Finite state machines
    • give them enough states to be interesting (each represents different goals or motives)
    • lots of inputs (environment attributes and other object states)
  • Some states may need substates or multi-part actions (e.g. move toward opponent and attack 20% of the time)
  • Personality of characters and spheres of influence may also be factored in as probabilistic input values to state entry or transitions
memory and learning
Memory and Learning
  • Memory is really just a decision to record a few details
    • record changes to frames
    • recording the last few moves
  • Learning is self-improvement
    • neural networks
    • genetic algorithms
    • numerical approaches (e.g. Samuels & checkers)
    • structural approaches
deciding between ai techniques
Deciding Between AI Techniques
  • Use deterministic techniques for simple behavior (e.g. rocks or missiles)
  • Add randomness and patterns for smart elements (e.g. birds or spaceships)
  • Use finite state machines for important game characters
  • For computer controlled opponents use everything (including memory and learning)
ad