3. Who I am?
● Co-Boss and Technical Director at
Vile Monarch
● Previously 11bit studios – Lead
Programmer of This War of Mine and
Sleepwalkers Journey
● Lecturer at Warsaw Film School
● Musician - amateur
grzegorz.mazur@vilemonarch.com
@dagenoth
4. What is AI in games?
● Interactive system that animates game world
● AI Agent
● Agent based on his state and game world state takes
action
5. What is AI in games?
Stimulus, for example:
- enemy in sight
- hearing call for help
- taking damage
State of agent, for ex:
- HP level
- resource quantity
- current goal
AI System
Action, for example:
- shooting
- playing animation
- beginning of movement
- command to move troop
6. What makes AI good for player?
● It should support gameplay...
● ... especially create challenge
● Good AI DOESNT have to be SMART
7. What makes AI good for developer?
● It should support gameplay... ;)
● Configurable
● Predictable
● Reusable
● Scalable
8. Scripted AI
● Simple scripts "if X then Y" and event-based programming
● Simple customization
● You have to predict everything
● Its hard to make it emergent
● It becomes drastically complicated with size
9. Finite State Machines
● In every moment Agent is in a single, specific state. For
example: combat, retreat, looking for enemy.
● State → specific behaviour
● Under specific conditions agent can make transistion from
current state to another
11. Behaviour Trees
● Node – complex agent behaviour
● Each node knows if he can run
● When node is running it tries to run its first runnable child
● Thats how tree-based decision structure appears
● At each moment only one branch of tree is running
15. Behaviour Trees
● Sequences, selectors, actions, decorators
● After certain time/after certain stimulus we cen reevaluate
whole tree
● After reevaluation of tree a new branch can start running
● Behaviour trees look similar to hierarchical finiste state
machines
17. Influence Mapping
● Method of finding areas in which we should move our
troops
● Game world represented by grid or graph
18. Influence Mapping
● Each unit/building/resource on
a map has its own base
influence – area and value
● Map of our influence
● Map of enemy influence
19. Influence Mapping
● Influence Map = Our
influence map – enemy
influence map
● Weight of area = influence
/ cost of movement
● Goal for troop = area with
highest weight
20. Influence Mapping
● Tension map = our influence + enemy influence
● The higher value – the bigger forces at the area
● Vulnerability map = tension map – ABS(influence map)
● The higher value – the bigger even fights at the area
21. Influence Mapping
● Based on information from different maps and additonal
conditions we can create any strategy
● Optionally we can introduce inertia and propagation of
influence
● Designer can introduce his own additional goal map
● Simple scripts are enough to make use of influence map