Unity ABM Framework (ABMU)
An Agent-Based Modelling (ABM) Framework for Unity3D
ABMU allows modellers to take advantage of Unity’s built-in methods and classes to create complex agent behaviours in 3D, including Physics, Navigation, Animation, etc, all written in native
Developers familiar with Unity3D should find the ABMU framework quite familiar to work with, as it provides simple hooks for converting methods written in Unity into ABMU behaviours.
ABMU is extendable, and can be coupled with other Unity libraries and assets.
Behind-the-scenes, ABMU implements a scheduling system to handle the execution of agent behaviours at the correct time, simplifying the timestep implementation process and allowing modellers to focus on the agent and model behaviour.
Installation / Getting started
Clone this repository and open in the Unity Editor.
Download the unity package and import into an existing Unity project.
All classes in ABMU are contained within the
ABMU namespace, so scripts implementing ABMU functionality should import the
using ABMU; using ABMU.Core;
Example models demonstrating ABMU applicability are provided in the project, in the Examples folder. Six example models are included:
- The simple random movement model used in the tutorial.
- A Neighbour Detection model, where randomly wandering agents alter their speed and size based on the number of other agents in their neighbourhood.
- An implementation of Reynolds’ (1987) 3D Boids model (ref)
- Schelling’s (1971) Segregation model (ref), adapted to run in 3D space
- An implementation of Epstein & Axtell’s (1996) Sugarscape model (ref)
- A 3D Navigation model, where agents wander randomly within an indoor multi-storey environment using Unity’s NavMesh and pathfinding.
To run the examples, load the respective scene in Unity and press Play.
More detailed documentation on ABMU methods and classes as well as tutorials can be found in the Wiki.
ABMU has been developed and tested with Unity version 2018.3.0f2. It should probably work with all newer versions of Unity as well (and probably older versions too), but no guarantees.
The code in this project is licensed under MIT license.