Strategy AI Roundtable (Thursday) - Josh's Notes
- (At least) two layers to AI:
|Map analysis||Formation movement|
- Performance measurement
- People worked on: "Empire Earth", "Moo3", military, "Game AI Programming Wisdom"
- General approach for "Kohan"
- AI has: Build path templates; priorities
- Map analysis (connectivity, identifying goals: attack, defend, explore, build, ...)
- Analyze resources
- Resource allocation: match resources to goals
- A second (not implemented) layer: get these resources because we really want to achieve this goal -- long term planning
- Get a bonus for continuing current action: "Decision inertia"
- Resulted in very little coordination, especially if two troops at different distances from target
- Very little in the way of objective criteria; did not have reproducibility (time slice model: AI smarter on faster computers)
- Would be a good idea to make it reproducible for debugging
- Could have a middle layer to group attacks
- Another good idea for testing: Make sure can play without the rendering engine
- Starcraft cpu vs. cpu good for finding bugs, bad for tuning AI
- Influence mapping is useful!
- Where to attack (graph influence of enemy strength)
- Where to build (graph resources)
- AI respects fog of war? Design decision. Much easier to cheat, maybe "ignore" goals AI doesn't know about
- (Kohan) "Smart" exploring: only way to match human's ability to explore is to give a bonus to the AI for exploring where the human is
- Influence mapping can be used to find safe paths (using it to weight path finding score)
- Individual paths vs. formations: individual paths good for dealing with rough terrain/forests, but individuals get lost/fall behind
- Influence mapping leads to terrain analysis where you, e.g., identify bottlenecks/choke points
- Results of map analysis (Blizzard guy) peformed at map load time:
- Graph of connected areas "nodes"
- Look for small cuts to graph to find choke points
- Used to speed pathfinding (recommendation: all pathfinders should be hierarchical, at least 2 levels, SC uses 2)
- Precomputes if two areas are reachable
- Update map as game progresses?
- Starcraft performs only local repair
- Another guy said they update their map analysis in the background -- AI may use slightly out of date map analysis
- Starcraft: ignores enemies blockage: we'll attack it, not walk around)
- Kohan plans a path for 1 guy ("leader"), everyone else is given a path slightly offset
- Units should recognize when they are out of position
- Kohan sped up laggers to maintain formation: improved gameplay for human players, less frustrating
- Two goals: reach eventual destination (long-term goal), maintain position relative to leader (short-term, takes priority if too far out of formation)
- Starcraft/WarCraft 3: first tried following (had a problem with leader getting blocked by followers), individual pathing good for navigating forest/rough terrain
- Clever idea used in another game: use a "virtual" main guy, avoids blocking problem and squad speed problem. Used so that squad members could advance between secure positions.
- One solution that worked in robotics: use potential fields to guide units to goal, into formation, avoiding obstacles (advantage: already worked out)
- Planning/scheduling: do something approximate it is going to break anyway as conditions change; repairing plans much more important -- airports use this so they minimize the number of commitments they break
- Difficulty levels
- Kohan easy AI: more random, smaller time slices allocated so tends to choose first option, reconsiders plans less often
- Consider scaling tactical ability since newbies bad at the clickfest