Summary
Year: 2016- 2018
Personal Project
Programming languages: C++, Unreal Blueprints
Engine: Unreal Engine 4
Software: Visual studio
Simulation is a personal project where I created a simple neighborhood simulation. The simulation uses behavior trees and goal orientated action planners made from scratch. The agents in the simulation need to balance stress, money, hunger and agent- agent relationships. The project is available on GitHub.
Behavior trees
I build my own behavior tree mostly to learn the ins and outs of behavior trees and how they work but also because I was not completely satisfied with the behavior trees provided by the Unreal Engine. I focused my behavior tree on ease of use in C++ instead of Blueprints in the Unreal Engine. My behavior tree has additional functionality for example: Queue, Parallel, not, Repeat and Domain nodes. The cons of my behavior tree over the Unreal one is the visual feedback you get while debugging.
Goal orientated action planner
The GOAP is mostly used in the project for simple tasks like performing tasks in a working environment. I mostly played around with GOAP, with the goal of learning how to use it and its strength and weaknesses.
Agents
The agents need to balance stress, hunger and money. When an agent is too hungry he dies. If an agent is too stressed he can’t work and when the agent has no money he can’t afford food or housing. Each agent has a behavior tree which correspond to the behaviors. By default, agents would prioritize working over relaxing/ eating but stress levels and hunger levels can change the agent’s behavior. As a result, the agents look like they have their own simple lives. Agents also interact with each other while being at work, relaxing/ eating. If 2 agents like each other enough they will live together. If 2 agents hate each other they will engage an argument increasing each other stress.


Color coded agents:
- Blue = currently selected agent
- Red = agent the selected agent hates
- Green = agent the selected agent likes
Link to the GitHub project: https://github.com/Bakuipje/CitySim