Using a framework for a zombie survival game this AI agent's goal is to survive as long as possible.
​
The game features pickups:
- Unusable junk to get rid of
- Pistols to kill enemies with
- Food to avoid dying to hunger
​
This AI is built up with a behavior tree. It's primary focus lies on collecting food and eating it when needed. Enemies are shot or avoided using a steering pipeline that uses a seek behavior and changes its target to run around enemies.
​
The world is being "scanned" when booting the game by going to the center first (You usually spawn there anyway) and then moving outwards in a spiral-like trajectory. Every time the agent spots a house it goes inside to the center to check for loot. Once the center is reached this house location is pushed in an array. Once a spiral has been completely run through this list of location will be the new path to follow.
​
Items get picked up if there is a free inventory slot. If not the AI will drop items until it has 2 guns and 2 pieces of food.
​
The AI will try to shoot
enemies on sight.
While it is aiming it will
also start to walk away
from the enemy for extra
safety. If it currently has
no gun with ammo it will
just run around the enemy.
Survival AI


Enemy avoidance
Object collecting + enemy killing