Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into...
Transcript of Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into...
![Page 1: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/1.jpg)
Artificial Intelligence for Games
Tactical and Strategical AI
Artificial Intelligence for Games
![Page 2: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/2.jpg)
Character AI
Group AI
Execution Management
World
Inter
Strategy
Decision Making
Content Creation
ScriptingInter
face
Animation Physics
Decision Making
Movement Pathfinding
Scripting
![Page 3: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/3.jpg)
Waypoint Tactics
Artificial Intelligence for Gaming
![Page 4: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/4.jpg)
Waypoint Tactics� Waypoint: single position in a game
� Pathfinding uses nodes
� Now: associate those nodes with different tactical situations
� Tactical locations (a.k.a. rally points)Waypoints for tactical situations (not only rally � Waypoints for tactical situations (not only rally points)
� Usually used to represent � defensive locations (cover points)
� sniper points
� ambush points
� ...
![Page 5: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/5.jpg)
Waypoint Tactics
� Waypoints are not necessarily useful for
pathfinding
� Usually many more waypoints
� Generated by hand
� Or generated automatically
![Page 6: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/6.jpg)
Waypoint Tactics
cover
sniping
cover
shadow
cover
shadow
sniping
![Page 7: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/7.jpg)
Waypoint Tactics� More sophisticated methods
� Ideal sniper position has good cover and wide view of
enemy
� Sniper points are both cover points and reconnaissance points
� Need only store primitive properties of waypoints
� When looking for an ambush point:� When looking for an ambush point:
� based on cover
� based on shadow
� based on exposure
� Preferable for smaller number of characters and simple
conditions
� If not, can preprocess and label waypoints with labels for more
complicated properties
![Page 8: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/8.jpg)
Waypoint Tactics
cover
sniping
cover
shadow
exposed exposed
cover
shadow
sniping
exposed
pointexposed
point
exposed
point
shadow
cover
![Page 9: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/9.jpg)
Waypoint Tactics
� Context Sensitivity
� Tactical value of any type of point depends on the
situation
� Attitude of a character determines whether a cover point
really provides cover
Sniping points depend on enemy position for their aptitude� Sniping points depend on enemy position for their aptitude
� Evaluation
� Precompute multiple values:
� Enemy position in all four directions
� Casts ray to actual enemy position to see whether cover is
provided
![Page 10: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/10.jpg)
Waypoint Tactics
Cover:
N: 3
E: 5
S: 0
W: 0
Cover:
N: 4
E: 5
S: 4
W: 0
![Page 11: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/11.jpg)
Waypoint Tactics
![Page 12: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/12.jpg)
Waypoint Tactics
� Precomputing values
� Fast: no calculations necessary
� Can explode:
� Cover in four directions
� Two attitudes: standing / crouchingTwo attitudes: standing / crouching
� Against five types of weapons
� Total 40 values
� Post-processing
� Ray-casting can be expensive
� Some games use 30% of a processing power on line-of-
sight calculations
![Page 13: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/13.jpg)
Waypoint Tactics
� Waypoint overview:
� Many games can use simple labels
� Context sensitivity through precomputation
� Post-processing for tactically involved games
![Page 14: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/14.jpg)
Waypoint Tactics
� Using tactical locations
� Mechanism to include waypoint data into decision
making:
1. Simple decision making process such as a decision tree
2. Incorporating tactical information into decision making
processprocess
3. Character motion that is always tactical aware
![Page 15: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/15.jpg)
Waypoint Tactics
� Simple tactical experience
� Character uses a decision tree based on current
state: health, ammo, enemy position
� Decides for reloading
� Queries tactical waypoints in the vicinity� Queries tactical waypoints in the vicinity
� Evaluate for cover
� Drawback: Availability of a nearby cover point is
not assured
![Page 16: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/16.jpg)
Waypoint Tactics� Using tactical information during decision making
� Binary decisions:� Decision tree with a node:
� Is there a cover point nearby?
� State machine with state machine
� Fuzzy logic decision making� Fuzzy logic decision making� Incorporates values of waypoints
� Generating nearby decision points
� need to be fast
� Use data structures such as quad-trees, binary space partitions, ...
� Needs to take obstacles into account
![Page 17: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/17.jpg)
Waypoint Tactics
� Tactical Pathfinding
� Extend A* pathfinding algorithm
![Page 18: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/18.jpg)
Waypoint Tactics
� Generating waypoints
� Part of level design
� Use tiling
� Evaluate center points
![Page 19: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/19.jpg)
Waypoint Tactics
� Cover points
� Quality evaluated by calculating proportion of
successful attacks from different points
� Create potential enemy locations around point
� Create different heights of enemy
![Page 20: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/20.jpg)
Waypoint Tactics� Visibility points
� Use line-of-sight tests
Partial cover
Full cover
Visibility arc Arc of no cover
Partial cover
Partial cover
Full cover
![Page 21: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/21.jpg)
Waypoint Tactics
� Shadow points
� Use lighting model of level
� Test amount of light at different heights over the
point
![Page 22: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/22.jpg)
Waypoint Tactics
� Automatic generation of waypoints
� Watching human players
� Condensing the waypoint grid
� Start with points in center of a dense tiling
� Discard points with low evaluationDiscard points with low evaluation
� (Careful: In a room with almost no cover, a modest cover
point is important)
� Condense remaining points
� If character can move simply between two points, can
keep the better of the points
![Page 23: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/23.jpg)
Tactical Analysis
Artificial Intelligence for Gaming
![Page 24: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/24.jpg)
Tactical Analysis� Represent the game level
� Tiling with a dense grid
� Dirichlet domains
� Simple influence maps
� Each type of unit gives influence
![Page 25: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/25.jpg)
Tactical Analysis
cell) d(avatar,--1 max(0, influenceφ
φα ⋅=
Manhattan geometry
Formula for atenuation
![Page 26: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/26.jpg)
Tactical Analysis
Other formulas for atenuation
![Page 27: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/27.jpg)
Tactical Analysis
� Cumulative effect of units
� Add, but limit effect of each unit to a certain circle
� Use a convolution filter
� Use only the highest influence unit to calculate
influenceinfluence
![Page 28: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/28.jpg)
Tactical Analysis
� Influence can depend on the type of unit
� Artillery: Influence only in a certain ring around unit
![Page 29: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/29.jpg)
Tactical Analysis
� Use of tactical map:
� Difference between influences with and without
enemy
![Page 30: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/30.jpg)
Tactical Analysis
� Use of tactical map:
� White piece in center is surrounded by black
influence: vulnerable
![Page 31: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/31.jpg)
Tactical Analysis
� Tension Map:
� Difference between influences:
![Page 32: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/32.jpg)
Tactical Analysis
� Tension minus my influence gives vulnerability
Tension Influence Vulnerability
![Page 33: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/33.jpg)
Tactical Analysis
� Example:
� Well-defined frontline
� Conflict in middle
![Page 34: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/34.jpg)
Tactical Analysis
![Page 35: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/35.jpg)
Tactical Pathfinding
Artificial Intelligence for Gaming
![Page 36: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/36.jpg)
Tactical pathfinding
� Tactical pathfinding
� Incorporates the tactical evaluation into costs of
paths
� Connection cost depends on
� Distance� Distance
� Tactical quality of each connection
� Tactical quality of connection is stored
� With waypoints
� (Average the tactical quality of the two endpoints, but
face problems)
![Page 37: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/37.jpg)
A B
Direct connection between A and B exposes character
Can only see this with lots of waypoints
A B
![Page 38: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/38.jpg)
Tactical pathfinding
� Modify pathfinding heuristics
� Euclidean distance heuristic can lead to
underestimate tactically excellent routes
![Page 39: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/39.jpg)
Tactical pathfinding
� Modify graph:
� Need to add waypoints that are not tactical
![Page 40: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/40.jpg)
Coordinated Actions
Artificial Intelligence for Gaming
![Page 41: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/41.jpg)
Coordinated Actions
Strategy
Tactical Analysis
Planning
Group Movement
Individual
Movement
Individual
Movement
Individual
Movement
Individual
Movement
![Page 42: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/42.jpg)
Coordinated Action
� Incorporating players does not mix well with multi-
tiered AI
Pathfinding
pathPreferred
path of player
![Page 43: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/43.jpg)
Coordinated Action
� Integration of player
� Explicit player orders
� Different structuring of multi-tier AI
![Page 44: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/44.jpg)
Coordinated Action
Player
Action recognition
(rule based)
Strategy
Tactical Analysis
Group Movement
Individual
Movement
Individual
Movement
Individual
Movement
Individual
Movement
![Page 45: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/45.jpg)
Coordinated Action
� Emergent cooperation
� Characters run their own decision making
procedure
� Taking into account what other characters are doing
� Tune decision making so that cooperate actions � Tune decision making so that cooperate actions
emerge
![Page 46: Tactical and StrategicalAItschwarz/COEN129/PPT... · 2. Incorporating tactical information into decision making process 3. Character motion that is always tactical aware. Waypoint](https://reader035.fdocuments.net/reader035/viewer/2022071023/5fd7f68f8b2f9279a258c245/html5/thumbnails/46.jpg)
Coordinated Action
� Scripted actions
� Special situations in sports
� Football
� Soccer: corner kick, free shot
� Baseball: double play, bunt
� Military tactics
� Entering a potential hostile room
� Teams moves into position outside
� Throws stun grenade
� Move into corner of room
� Flank inside of doorway