Documentation logo

Documentation

Free

Multi-agent simulation library for Python

FreeFree tier
Type
Open Source

About Documentation

Westworld is a multi-agent simulation library for Python, designed to simulate and optimize systems with multiple interacting agents. Inspired by Unity and Unity ML-Agents, it provides pre-coded spatial environments (grid and non-grid), communication between agents, and support for logistics, retail, and epidemiology simulations. The library includes features such as easy environment creation, object types (agents, obstacles, collectibles, triggers), subclassing for custom objects, random spawning, rigid body physics, basic agent behaviors (pathfinding, wandering, random walk, fleeing, vision range), automatic maze generation, image-to-obstacle layer conversion, sample simulations, and simulation visualization with replay export (GIF or video). It is highly experimental and under active development.

Key Features

Easy creation of grid and non-grid environments
Pre-defined object types: Agents, Obstacles, Collectibles, Triggers
Subclassing of objects to create custom agents and items
Random object spawning using spawner functions
Basic rigid body system for object collisions
Agent behaviors: pathfinding, wandering, random walk, fleeing, vision range
Automatic maze generation
Layer integration to convert images into obstacles and snap to grid
Sample simulations and sample agents for classic scenarios
Simulation visualization with replay and export (GIF or video)

Pros & Cons

Pros
  • Open source and free to use
  • Python-based, easy to integrate with existing ML and data science workflows
  • Provides pre-coded spatial environments and agent behaviors out of the box
  • Includes visualization and export for simulation replay
  • Roadmap includes reinforcement learning integration with Stable Baselines
  • Modular design with subclassing for extensibility
Cons
  • Highly experimental, alpha release with incomplete documentation and untested features
  • Requires familiarity with Python and basic simulation concepts
  • Limited to 2D grid environments currently; no 3D support
  • Reinforcement learning integration is still on the roadmap, not yet implemented
  • Community and support are minimal due to early development stage

Best For

Modeling logistics and supply chain systemsSimulating retail environments and customer behaviorEpidemiology and disease spread modelingEcosystem simulations with competing agents (e.g., rabbits and food)Multi-agent reinforcement learning research and training

FAQ

What is Westworld?
Westworld is a multi-agent simulation library for Python, inspired by Unity and Unity ML-Agents. It allows users to simulate environments with multiple interacting agents, such as logistics systems, retail spaces, or ecosystems.
How do I install Westworld?
Westworld can be installed via pip: 'pip install westworld'. For developers, clone the GitHub repository and use Poetry to manage dependencies.
Is Westworld suitable for production use?
No, it is highly experimental and in alpha release. The documentation may not be up-to-date and not all features are tested. It is intended for research and prototyping.
What kind of environments can I simulate?
You can create both grid and non-grid environments. Examples include ecosystems (rabbits and food), logistics chains, retail simulations, and epidemiological models.
Does Westworld support reinforcement learning?
Reinforcement learning integration is on the roadmap but not yet implemented. The library currently focuses on heuristic-based optimization and basic agent behaviors.