Skip to content

Latest commit

 

History

History

tactics

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

class: center, middle

Artificial Intelligence

Strategy & Tactics


Gerard Escudero, 2020


:scale 50%

.footnote[source ]


class: left, middle, inverse

Outline

  • .cyan[Introduction]

  • Formation Motion

  • Waypoint Tactics

  • Tactical Analysis

  • Tactical Pathfinding

  • References


Group AI

:scale 75%


Strategy vs Tactics

.blue[Strategy]:

General plan to achieve a goal (long time).

Example:
Planning where to send the troops to win the war.

.blue[Tactics]:

Specific plan to achieve a particular goal (part of a strategy).

Example:
How soldiers should run in a zig-zag pattern to decrease the chance of being shot.

.footnote[.red[Source]: Diffen (Strategy vs Tactic)]


class: left, middle, inverse

Outline

  • .brown[Introduction]

  • .cyan[Formation Motion]

  • Waypoint Tactics

  • Tactical Analysis

  • Tactical Pathfinding

  • References


Fixed Formations

.cols5050[ .col1[ For simple formations.

  • .blue[Formation]: set of slots

  • .blue[Slot]: location for an agent

    • 1 slot leader
    • rest of slots follow the leader
      $p_s=p_l+\Omega_l r_s$
      $\Omega_s=\Omega_l+\omega_s$

      $s$: slot
      $l$: leader
      $p$: position
      $\Omega$: orientation
      $r$: position to leader
      $\omega$: orientation to leader ] .col2[

Example:

  • video / code / download
    Other formations may require the rotation of the followers!

Variants:

  • .blue[Scalable Formations]

    • Depends on the number of members.
    • Example: defensive circles
  • .blue[Emergent Formations]

    • Not all the members follow the leader (cascade)
    • Example: wedge formation ]]

Slot Roles & Assignment I

  • .blue[Slot Roles] are the typical RPG formations, in which every layer has a role:

    1. Melee warriors
    2. Arquers and Missile Magicians
    3. Magic and Healers
  • They might need rearguard layers.

.blue[Approach 1: fixed slots]

  • Given a fixed slot structure, an assignment of units has to be given:

.cols5050[ .col1[ .center[

Cost Magic Missile Melee
Ranger 1000 0 500
Warrior 2000 1000 0
Mage 500 0 2000
Healer 0 1000 2000
(Millington, 2019)
]]
.col2[
.blue[Optimization process]
  • Genetic Algorithm

  • Fitness: $\sum_i cost_i$

Melee Missile Magic Melee
3 2 1 2

]]


Slot Roles & Assignment II

.blue[Approach 2: dynamic slots]


class: left, middle, inverse

Outline

  • .brown[Introduction]

  • .brown[Formation Motion]

  • .cyan[Waypoint Tactics]

  • Tactical Analysis

  • Tactical Pathfinding

  • References


Tactical Locations

.blue[Tactical locations or waypoints]:

  • defensive locations, cover points, shadows...

  • A location can be a compound tactic: set of primitive tactics
    Example: cover / shadow

.blue[Using tactical locations]:

  • Previous algorithms: FSM, BTs, GOAP...

.blue[Generation of properties]:

  • Manually: level designer

  • Automatic: raycast (visibility, cover), light maps (shadow)...

.blue[Generation of waypoints]:

  • Watching human players

  • Waypoint Grids: test possible locations and choose the bests


Example: BT for Cops Manager

.center[ :scale 80% ]

.cols5050[ .col1[


class: left, middle, inverse

Outline

  • .brown[Introduction]

  • .brown[Formation Motion]

  • .brown[Waypoint Tactics]

  • .cyan[Tactical Analysis]

    • .cyan[Influence maps]

    • Terrain Analysis

  • Tactical Pathfinding

  • References


Influence Maps

Track of current military influence of each location.

.blue[Influence]:

.cols5050[ .col1[ $$I_d=\frac{I_0}{1+d}$$ ] .col2[ $I_0$: power of the unit

$d$: distance to the unit ]]

.blue[Applications]:

  • Safe areas, areas to avoid, weakest border...

  • Plan attack locations or movement guide

.blue[Dealing with unknowns]:

  • Risk of underestimating forces (fog-of-war)

  • Prediction of the enemy forces (Machine Learning)


Example

Influence maps by Anomalous Underdog

:scale 60%


class: left, middle, inverse

Outline

  • .brown[Introduction]

  • .brown[Formation Motion]

  • .brown[Waypoint Tactics]

  • .cyan[Tactical Analysis]

    • .brown[Influence maps]

    • .cyan[Terrain Analysis]

  • Tactical Pathfinding

  • References


Terrain Analysis

Extracting useful data from the structure of the landscape.

  • Covers, shadows, visibility...

  • Algorithm: visite locations, calculate and annotate.

  • Situations may change fast and they can have a high cost.

Example:

.cols5050[ .col1[ :scale 105% ] .col2[ Killzone's AI: dynamic procedural combat tactics

.blue[Initial situation]
(with legends)

]]


Example

.cols5050[ .col1[ .blue[a) Distance nearby points]
:scale 80%

.blue[c) Line-of-fire secondary threats]
:scale 80%

] .col2[ .blue[b) Line-of-fire primary threat]
:scale 80%

.blue[d) Preferred fighting range]
:scale 80% ]]

.footnote[Killzone's AI: dynamic procedural combat tactics]


Example

.blue[e) Adding all annotations yields best position]

.center[ :scale 60% ]

.footnote[Killzone's AI: dynamic procedural combat tactics]


class: left, middle, inverse

Outline

  • .brown[Introduction]

  • .brown[Formation Motion]

  • .brown[Waypoint Tactics]

  • .brown[Tactical Analysis]

  • .cyan[Tactical Pathfinding]

  • References


Tactical Pathfinding

.blue[Is shortest path the best path?]

:scale 45% :scale 45%.red[*]

.blue[Connection cost function]:

.cols5050[ .col1[ $$C=D+\sum_i w_iT_i$$ ] .col2[ $D$: distance
$w$: weight
$T$: tactic ]]

class: left, middle, inverse

Outline

  • .brown[Introduction]

  • .brown[Formation Motion]

  • .brown[Waypoint Tactics]

  • .brown[Tactical Analysis]

  • .brown[Tactical Pathfinding]

  • .cyan[References]


References