项目作者: TheoLvs

项目描述 :
Multi-agent simulation library in Python
高级语言: Jupyter Notebook
项目地址: git://github.com/TheoLvs/westworld.git
创建时间: 2020-04-01T09:34:31Z
项目社区:https://github.com/TheoLvs/westworld

开源协议:MIT License

下载


Westworld

Description

Westworld is a multi-agent simulation library, its goal to simulate and optimize systems and environments with multiple agents interacting. Its inspiration is drawn from Unity software and Unity ML Agents, adapted in Python.

The goal is to be able to simulate environments in logistics, retail, epidemiology, providing pre-coded spatial environments and communication between agents. Optimization can be included using heuristics as well as Reinforcement Learning.

!!! warning “Experimental”
This library is extremely experimental, under active development and alpha-release
Don’t expect the documentation to be up-to-date or all features to be tested
Please contact us if you have any question

The name is of course inspired by the TV series Westworld, which is actually a gigantic multi-agent simulation system.

Documentation

Documentation is available locally in docs folder or online at https://theolvs.github.io/westworld

Features

Current features

  • Easy creation of Grid and non-grid environments
  • Objects (Agents, Obstacles, Collectibles, Triggers)
  • Subclassing of different objects to create custom objects
  • Spawner to generate objects randomly in the environment
  • Basic rigid body system for all objects
  • Simple agent behaviors (pathfinding, wandering, random walk, fleeing, vision range)
  • Automatic maze generation
  • Layer integration to convert image to obstacle and snap it to a grid
  • Sample simulations and sample agents for classic simulations
  • Simulation visualization, replay and export (gif or video)

Roadmap features

  • More classic simulations and tutorials (boids, sugarscape)
  • Better pathfinding
  • Easy Reinforcement Learning integration with Stable Baselines
  • Other visualization functions than PyGame for web integration

Installation

Install from PyPi

The library is available on PyPi via

  1. pip install westworld

For developers

  • You can clone the github repo / fork and develop locally
  • Poetry is used for environment management, dependencies and publishing, after clone you can run
  1. # To setup the environment
  2. poetry install
  3. # To run Jupyter notebook or a python console
  4. poetry run jupyter notebook
  5. poetry run python

Contributors

Javascript version

A javascript version is being developed at https://github.com/TheoLvs/westworldjs