All Projects → gaorkl → simple-playgrounds

gaorkl / simple-playgrounds

Licence: MIT license
Simulator for Reinforcement Learning and AI. 2D environments with physics and interactive entities. Agents with rich sensors and actuators.

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to simple-playgrounds

bark-ml
Gym environments and agents for autonomous driving.
Stars: ✭ 68 (+277.78%)
Mutual labels:  agents, reinforcement-learning-environments
Physics
experimenting with physics simulation
Stars: ✭ 53 (+194.44%)
Mutual labels:  simulator
client-java
Asynchronous client for Java-based agents
Stars: ✭ 17 (-5.56%)
Mutual labels:  agents
magical
The MAGICAL benchmark suite for robust imitation learning (NeurIPS 2020)
Stars: ✭ 60 (+233.33%)
Mutual labels:  reinforcement-learning-environments
open-simulator
K8s cluster simulator for capacity planning
Stars: ✭ 158 (+777.78%)
Mutual labels:  simulator
showdown-battle-bot
Socket Battle Bot for Pokemon Showdown (http://pokemonshowdown.com/)
Stars: ✭ 19 (+5.56%)
Mutual labels:  simulator
NaturalLanguageProcessing
A Quick Demo for NLP in Swift 4
Stars: ✭ 22 (+22.22%)
Mutual labels:  playgrounds
iBeacon-Android
iBeacon scanner and simulator - Android application example
Stars: ✭ 28 (+55.56%)
Mutual labels:  simulator
XWorld
A C++/Python simulator package for reinforcement learning
Stars: ✭ 82 (+355.56%)
Mutual labels:  simulator
coord-sim
Lightweight flow-level simulator for inter-node network and service coordination (e.g., in cloud/edge computing or NFV).
Stars: ✭ 33 (+83.33%)
Mutual labels:  simulator
Moonwards-Virtual-Moon
Development continues on Unreal, in the MoonwardsUE repository
Stars: ✭ 97 (+438.89%)
Mutual labels:  simulator
ravel
A RISC-V simulator
Stars: ✭ 24 (+33.33%)
Mutual labels:  simulator
Python-2D-Simulation-of-Schrodinger-Equation
Une simulation de l'évolution d'un paquet d'onde gaussien
Stars: ✭ 39 (+116.67%)
Mutual labels:  simulator
typescript-eslint-demo
typescript eslint playground
Stars: ✭ 25 (+38.89%)
Mutual labels:  playgrounds
continuous Bernoulli
There are C language computer programs about the simulator, transformation, and test statistic of continuous Bernoulli distribution. More than that, the book contains continuous Binomial distribution and continuous Trinomial distribution.
Stars: ✭ 22 (+22.22%)
Mutual labels:  simulator
mima
MIninmal MAchine Assembler and Simulator
Stars: ✭ 19 (+5.56%)
Mutual labels:  simulator
xefis
Qt-based EFIS and EICAS
Stars: ✭ 19 (+5.56%)
Mutual labels:  simulator
device-simulator
基于netty的设备模拟器,模拟设备消息收发,压力测试。
Stars: ✭ 35 (+94.44%)
Mutual labels:  simulator
name-needed
🕹 A one man effort to produce an open source, intuitive and high performance Dwarf Fortress-esque game. Needs a name.
Stars: ✭ 87 (+383.33%)
Mutual labels:  simulator
8800-simulator
A JavaScript simulator to demonstrate the front panel operations of Altair 8800.
Stars: ✭ 65 (+261.11%)
Mutual labels:  simulator

Welcome to simple-playgrounds

Simple-Playgrounds (SPG) is an easy-to-use, fast and flexible simulation environment for research in Deep Reinforcement Learning and Artificial Intelligence. This simulator proposes a huge diversity of environments for embodied agents learning through physical interactions. It bridges the gap between simple and efficient grid environments, and complex and challenging 3D environments.

The playgrounds are 2D environments where agents can move around and interact with scene elements. The game engine, based on Pymunk and Pygame, deals with simple physics, such as collision and friction. Agents can act through continuous movements and discrete interactive actions. They perceive the scene with realistic first-person view sensors, top-down view sensors, and semantic sensors.

Alt Text

This simulator is easy to handle, and very flexible. It allows very fast design of AI experiments and runs experiments very quickly.

We hope that you can make use of this simulator for your research. If you publish your work based on this simulator, please use the following reference:

@misc{Simple-Playgrounds,
  author = {Garcia Ortiz, Michael and Jankovics, Vince and Caselles-Dupre, Hugo and Annabi, Louis},
  title = {Simple-Playgrounds},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/mgarciaortiz/simple-playgrounds}},
}

Installation

Before installing Simple-Playgrounds, you might need to install libsdl1.2-dev and Pygame manually.

Once these dependencies are installed, you can install simple-playgrounds using pip. A pip package is available and regularly updated:

pip3 install simple-playgrounds

Tutorials

We provide a series of small tutorials to illustrate the capabilities of Simple-Playgrounds. We suggest running them locally to benefit from the keyboard control of the agents.

01 - Welcome to simple-playgrounds

02 - Learn to build playgrounds

03 - Add elements to your playground

04 - Modify the appearance of elements

05 - Spawners elements

06 - Using agents and sensors

We advise to run the notebook locally, so that more advanced display options are available.

Structure of the simulator

Agents

Agents are composed of different body parts attached to a Base. Different bases are available, each of them with different actuators.

The actuators controlling the base and body parts are managed by a controller. The controller can be:

  • Random: each actuator is set randomly at every timestep.
  • Keyboard: the agent is controlled by pressing keys on the Keyboard.
  • External: used to set the actions from outside of the simulators (used in RL)

Agents perceive their surroundings through a large collection of first-person view sensors:

  • RGB Camera / Grey Level Camera
  • Lidar
  • Touch Sensor
  • Top-down view
  • Semantic Sensors (Rays or Cones)

Any number of sensors can be added to the agent. The sensors are parameterizable in terms of field of view, range, and resolution.

Noise

Sensors as well as Actuators can be noisy.

Playground

Agents act and perceive in a Playground. A playground is composed of scene elements, which can be fixed or movable. An agent can grasp, eat, activate or absorb certain scene elements. Depending on their nature, particular scene elements will provide reward to the agent interacting with them.

Coordinate System

A playground is described using a Cartesian coordinate system. Each element has a position (x,y, &theta), with x along the horizontal axis, y along the vertical axis, and theta the orientation, aligned on the horizontal axis.

A playground has a size [width, length], with the width along x-axis, and length along y-axis

When applicable, the length of a scene element follows the element's x-axis.

A playground is a collection of scene elements, and therefore can be very easily scripted.

Game Engine

Agents enter a Playground, and start acting and perceiving within this environment. The perception/action loop is managed by a Game Engine.

Application of SPG in different Research fields

The classical use of SPG is Reinforcement Learning. You can build simple to very complex environments that look into classical challenges of RL. The diversity and speed of SPG allows to experiment on:

  • Continual learning and Transfer Learning: Move the agent from Playground to Playground.
  • Exploration: Get the key to open the door to get the other key to open the chess that will give you the reward.

SPG allows you to address the problematics of other fields related to RL:

  • MARL: why not put several agents in the environments?
  • Curriculum learning: Send agents to Playgrounds of increasing difficulty
  • Procedural Generation: Automatically create just the right Playground.
  • Representation learning and commonsense knowledge.

Because of its flexibility, and the numerous sensors and actuators, SPG allows to test for:

  • generalization of your approach
  • resistance to noise, and variations of sensor types
  • reproducibility

Acknowledgements

The first version of the simulator was called Flatland, and was designed by Hugo Caselles-Dupre, Louis Annabi, Oksana Hagen and Michael Garcia Ortiz.

The new version was developed by Vince Jankovics, Hugo Caselles-Dupre, Louis Annabi and Michael Garcia Ortiz.

We would like to thank Clement Moulin-Frier and Younes Rabii for their helpful suggestions and their contributions to the new version of the simulator.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].