-
Embracing Emergent Behavior with Goal-Based AI Kevin [email protected]
-
Blue Fang GamesTo create compelling, emotionally engaging games, focused on the animal kingdom, that set the benchmark for broad-based family entertainment.
-
The PlanMotivationKohan 2 DemoCommon AI TechniquesGoal-based AIBoxy-dog DemoQuestions
-
The PlanWhat I Want:Cunning OpponentsResponsive AlliesReplayabilityOrganic Credibility Emotional AppealCompelling PerformancesOr, more generally:Situational AwarenessEmergent Behavior
-
Motivation, cont.Declarative AI (vs. Procedural AI)Wikipedia: A program is declarative if it describes what something is like, rather than how to create it.Developers role: not to tell the AI what to do, but to tell the AI how to decide for itself.
-
Techniques Scripted AIAI Follows a script, much like a movieScript specifies exactly what will happen, when it will happen, where it will happenAdvantages:Gives designers explicit control Easy to writeEasy to balanceDisadvantagesRepetitive and predictable
-
Techniques State MachinesA state is defined for every high-level action the AI can takeTransitions are defined to move from one state to another stateEach state has custom code to control the character while in that state
-
First Person Shooter ExampleGet AmmoGet HealthRun AwaySearch For EnemyAttackEnemy FoundEnemy LostLow on AmmoLow on HealthGot Away, Low on HealthGot HealthGot AmmoGot Away, Low on Ammo
-
Techniques State MachinesAdvantages:Easy to conceptualizeEasy to implementMiddleware tools existDisadvantages:Complexity scales poorly as AI growsRampant duplication of codeCan only do one thing at a time
-
Techniques Goal Based AIA goal is defined for every high-level action that the AI can takeEach goal is assigned a priority:Base priority (evaluate current situation)Allocate resourcesOptimize resources and calculate final priorityHighest priority goal(s) are executed
-
Goal TypesSome common RTS goals:Attack Construct BuildingDefend Repair BuildingExplore Upgrade BuildingRecruit Unit Sell BuildingRecover Health Give Resources To AllyResearch
-
Techniques Goal Based AIAdvantagesFlexible and powerfulComplexity scales fairly well as AI growsCan execute more than one goal at a timeEmergent behaviorDisadvantages:Priority calculations (Bucket of Floats)Emergent behavior
-
Goal Selection BasicsWWHD (What Would a Human Do?)Write down a list of the factors you would consider if you were playing the gameSome common tricks:Bonuses Repeat PenaltiesMultipliers One-Time BonusesExponents Actor CategoriesFuzzy Factors Templates
-
Example: Attack GoalBase priority:Actor value for the most desirable building or unit in the area (taking into account enemys economy if appropriate)Travel DistanceIntervening targets (attack goals only)
-
Attack Goal, cont.Priority Curve:Target CV ratioMin CV to assignLow CV exponent Max advantageMax multiplier Other considerationsCombined armsWall strengthAdjusting builder CV* CV = Combat Value
-
Loose EndsGoal CommitmentIF: you cant afford something nowBUT: you will be able to soonTHEN: dont perform lower priority goals that use the same resourceGoal InertiaBonus to keep doing what youre doingLocked GoalsDisable all other goals until current goal is complete
-
Jack the Terrier