DOC PREVIEW
U-M CIS 487 - AI and Game Programming

This preview shows page 1-2-3 out of 10 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

AI and Game ProgrammingSelected AI TechniquesDeterministic AlgorithmsRandom MotionTracking and PursuitTracking and EvasionPatterns and ScriptsBehavioral State SystemsMemory and LearningDeciding Between AI Techniques1AI and Game ProgrammingCIS 487/587Bruce R. MaximUM-Dearborn2Selected AI Techniques•Deterministic algorithms•Heuristic programming•Patterns and scripts•Finite state machines•Production systems•Genetic algorithms•Neural networks3Deterministic Algorithms •Each clock tickasteroid_x += asteroid_x_velocityasteroid_y += asteroid_y_velocity•Asteroids follow their course until–off screen–collision occurs–blown up4Random Motionfly_x = rand() % 80fly_y= rand() % 80while(~done()){fly_count = 0fly_x_velocity = -8 + rand() % 16fly_y_velocity = -8 + rand() % 16while (++fly_count < 10){fly_x += fly_x_velocityfly_y += fly_y_velocity}5Tracking and Pursuitif (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--6Tracking and Evasionif (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--7Patterns 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 car8Behavioral 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 transitions9Memory 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 approaches10Deciding 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


View Full Document

U-M CIS 487 - AI and Game Programming

Documents in this Course
Mad Maxim

Mad Maxim

10 pages

DirectX

DirectX

10 pages

Load more
Download AI and Game Programming
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view AI and Game Programming and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view AI and Game Programming 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?