Westworld is a Python multi-agent simulation library for simulating and optimizing systems and environments composed of interactions among multiple agents. It is inspired by Unity software and Unity ML Agents, and implements similar ideas in Python. The project name is taken from the TV series Westworld, which is itself a massive multi-agent simulation system.
Purpose and Target Scenarios The library targets simulation needs in fields such as logistics, retail, and epidemiology, providing pre-written spatial environments and communication capabilities between agents. The optimization component can be achieved with heuristic methods or combined with reinforcement learning.
Main Capabilities Current features include: convenient creation of grid and non-grid environments; provision of object types such as Agents, Obstacles, Collectibles, and Triggers; support for creating custom objects by inheriting from different objects; provision of a Spawner to randomly generate objects in the environment; provision of a basic rigid body system for all objects; provision of simple agent behaviors, including pathfinding, wandering, random walking, fleeing, and field of view; support for automatic maze generation; provision of layer integration, which can convert images into obstacles and align them to the grid; inclusion of example simulations and example agents for classic simulations; support for simulation visualization, replay, and export as GIF or video.
Usage The library can be installed via PyPi. You can also clone the GitHub repository or fork it for local development. The project uses Poetry for environment management, dependency management, and release; after cloning the repository, the relevant commands can be run. Documentation is located in the repository's docs folder and is also available online https://theolvs.github.io/westworld .
Roadmap Planned features include: more classic simulations and tutorials (such as boids and sugarscape); better pathfinding; convenient reinforcement learning integration with Stable Baselines; other visualization features beyond PyGame for web integration.
Limitations and Status The library is explicitly marked as an experimental project and is in active development and alpha release stage. The official notice advises not to expect the documentation to remain up to date or all features to be tested; if there are issues, you can contact the author. In addition, the project has a JavaScript version under development, located at https://github.com/TheoLvs/westworldjs 。