1 / 20

Game AI

Game AI. Kevin Dill Senior AI Engineer Blue Fang Games kad@bluefang.com. Blue Fang Games. “To create compelling, emotionally engaging games focused on the animal kingdom that set the benchmark for broad-based family entertainment.”. The Plan. What is Game AI?

mira
Télécharger la présentation

Game AI

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Game AI Kevin Dill Senior AI Engineer Blue Fang Games kad@bluefang.com

  2. Blue Fang Games “To create compelling, emotionally engaging games focused on the animal kingdom that set the benchmark for broad-based family entertainment.”

  3. The Plan • What is Game AI? • How does it compare to Academic AI? • A few common techniques • A few interesting research areas NOTE: talk runs a little long

  4. What is Game AI? • Makes the characters in the game move • Decide what, where, how, when • Some uses of AI: • Opposing/allied player AI • Character AI • Path planning & collision avoidance • Animation selection

  5. The Goals of Game AI • Games need to be fun! • “Organic credibility” • Create the illusion of intelligence • Players will make up stories about the AI • Rule #1: Don’t look stupid • Rule #2: Try to look smart • But not *too* smart! • Rule #3: Don’t cheat • Rule #3 (revised): Don’t get caught!

  6. Academic AI (vs. Game AI) • Hard, unsolved problems • Scientific method: Simplify & focus down • Planning • Time • Resources • Imperfect knowledge • Failure • Not constrained by performance (mostly) • Checkers/Chess/Go

  7. Game AI (vs. Academic AI) • Avoid unsolved problems like the plague (unless it’s the core of your game) • You can’t simplify the game away • Time • Resources • Imperfect knowledge • Failure • *Very* constrained by performance

  8. Techniques – Scripted AI • AI Follows a script, much like a movie • Script specifies exactly what will happen, when it will happen, where it will happen • Advantages: • Gives designers explicit control • Easy to write • Easy to balance • Disadvantages • Extremely poor replayability

  9. Techniques – State Machines • States represent a high level view of what the AI is trying to do • Each state has custom code • Transitions occur when the situation changes

  10. First Person Shooter Example Search For Enemy Get Ammo Got Ammo Got Health EnemyFound EnemyLost Get Health Attack Got Away,Low on Health Got Away,Low on Ammo Low on Health Low on Ammo Run Away

  11. Techniques – State Machines • Advantages: • Easy to conceptualize • Easy to implement • Middleware tools exist • Disadvantages: • Quickly becomes large and unwieldy • Difficult to debug • Difficult to expand • Rampant duplication of code

  12. Techniques – Goal Based AI • A “goal” is defined for every action that the AI can take • Examples of goals from Kohan II include: Attack, Defend, Retreat, Explore, Build • Each goal is assigned a priority, the highest priority goal(s) are executed

  13. Explore Goal Example num_goals = 2 min_priority = 0 base_priority = 300 repeat_penalty = 100 black_fog_priority = 500 grey_fog_priority = 100 fog_search_depth = 3 current_region_bonus = 200 actor_region_bonus = 100 building_region_bonus = 50 flare_region_bonus = 1000 percent_to_count_region_explored = 0.8 consider_distance_to_kingdom_center = true kingdom_center_distance_prefer_close = true consider_distance_to_last_region = true last_region_distance_prefer_close = true consider_distance_to_actor = true actor_distance_prefer_close = true

  14. Techniques – Goal Based AI • Advantages • Flexible and powerful • Can execute more than one goal at a time • Emergent behavior • Disadvantages: • Performance issues need to be managed • “Bucket of floats” can make balance tricky • Emergent behavior

  15. Research – Path Planning • *Not* a solved problem • Particularly interesting is how to handle planning with constraints • Travel in forest is slower then open fields • Avoid being sighted by the enemy • *Really* avoid coming under enemy fire • See as much unexplored territory as possible

  16. Research – Terrain Analysis • How do I break the map up into meaningful areas? • What use can I make of those areas? • How can I launch a multi-pronged attack? • How can I identify strategically important terrain to attack or defend? • How can I identify my borders? • What is the best placement for my scouts? • Where can I ambush the enemy?

  17. Research – Dynamic Difficulty • Games need to be fun! • How can I adjust game difficulty dynamically so as to deliver the proper challenge to the player? • Is it possible to determine the challenge the player wants? Or does that have to be designer defined? • How do I do all this without the player catching on?

  18. Resources • Artificial Intelligence for Games Ian Millington • Programming Game AI by Example Matt Buckland • AI Game Programming Wisdom 1-3 Steve Rabin, editor • Craig Reynolds’ web site http://www.red3d.com/cwr/games/

  19. Game AI Kevin Dill Senior AI Engineer Blue Fang Games kad@bluefang.com

More Related