top of page

AI bot surviving a zombie apocalypse

Updated: Oct 16, 2019

This bot is from a course where I implemented Steering behavior, A* pathfinding, navigation meshes, etc in an existing engine. This example uses the engine's behavior tree system and my own implementation of an inventory system, dynamic influence maps, moods and states.


Footage:


Debug drawings:

Blue circle: recently visited house

Pink circle: not recently visited house

Red circle: spotted zombie

Blue dot: checkpoint

Green dot: Item (with circle = spotted)

Dot with arrow: zombie



Dynamic influence map:

The influence map is the big circles you see. when the bot enters the sphere it might be influenced based on the condition of the bot. the bot has warning states which translates into having different objectives. Low on health / energy and no items in inventory = Emergency state. In the Emergency state the bot will take more risk going to the closest house that's not recently visited. If the bot is healthy and has a full inventory it will just go to the checkpoints to get a better score, but can easily be influenced by pink circles. There is also no need to take unnecessary risks, so running away from enemies is a good option. the word "dynamic" is used because the bot makes the map while running and nothing is hard coded.


Mood:

The steering behavior changes based on the mood. The default option, 'OK', is going to the checkpoint. This can be overwritten by 'interested', where the bot will go to an item or house. This is caused by the influence map or the inventory system setting the emergency state and remembering the position of an item during a period where the bot had a full inventory. the 'run' mood is when the weight of the zombie influence spheres are too high. the bot will try and avoid it by leaving the bad influence spheres.


Inventory system:

If the bot is low on items or health/energy, the inventory system will kick in and change the emergency state of the bot. it tracks what items the bot is holding and items the bot saw but never picked up, due to having enough in his inventory. The inventory has an output this will be taken in to account when calculating the influence, example: No need to check houses when having a full inventory. Going to the checkpoint is preferable.


35 views0 comments

Recent Posts

See All

KIN

bottom of page