Gym Sapientino environment using Pygame.
Project description
gym-sapientino
OpenAI Gym Sapientino environment using Pygame.
Description
The environment is inspired by a game for kids called Sapientino.
A robot moves on a gridworld-like environment, where each cell can be coloured. When a robot is on a coloured cell, it can run a beep, meaning it has visited the cell.
The environment is compliant with the OpenAI Gym APIs. The idea is that the designer of the experiment should implement the actual reward by wrapping the environment.
Dependencies
The environment is implemented using Pygame.
On Ubuntu, you need the following libraries:
sudo apt-get install python3-dev \
libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev \
libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libfreetype6-dev
On MacOS (not tested):
brew install sdl sdl_ttf sdl_image sdl_mixer portmidi # brew or use equivalent means
conda install -c https://conda.binstar.org/quasiben pygame # using Anaconda
Install
Install with pip
:
pip install gym_sapientino
Or, install from source:
git clone https://github.com/whitemech/gym-sapientino.git
cd gym-sapientino
pip install .
Development
- clone the repo:
git clone https://github.com/whitemech/gym-sapientino.git
cd gym-sapientino
- Create/activate the virtual environment:
poetry shell --python=python3.7
- Install development dependencies:
poetry install
Tests
To run tests: tox
To run only the code tests: tox -e py3.7
To run only the linters:
tox -e flake8
tox -e mypy
tox -e black-check
tox -e isort-check
Please look at the tox.ini
file for the full list of supported commands.
Docs
To build the docs: mkdocs build
To view documentation in a browser: mkdocs serve
and then go to http://localhost:8000
License
gym-sapientino is released under the GNU General Public License v3.0 or later (GPLv3+).
Copyright 2019-2020 Marco Favorito, Luca Iocchi
Authors
Credits
The code is largely inspired by RLGames
If you want to use this environment in your research, please consider citing this conference paper:
@inproceedings{Giacomo2019FoundationsFR,
title={Foundations for Restraining Bolts: Reinforcement Learning with LTLf/LDLf Restraining Specifications},
author={Giuseppe De Giacomo and L. Iocchi and Marco Favorito and F. Patrizi},
booktitle={ICAPS},
year={2019}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gym_sapientino-0.2.0.tar.gz
.
File metadata
- Download URL: gym_sapientino-0.2.0.tar.gz
- Upload date:
- Size: 26.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 040e253c3572bc4027b98a79d69ada15c35c8cfd8ee1c8cc60949f02ec60180b |
|
MD5 | 529c59e7a4b82df070f1013158b685a2 |
|
BLAKE2b-256 | 2a03c582044ce54bae5c1045a66ad2e1b5ac6029e2377700096a5464aed1459e |
File details
Details for the file gym_sapientino-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: gym_sapientino-0.2.0-py3-none-any.whl
- Upload date:
- Size: 35.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5902e5b63825f08c305eaa9c14abc63220a5334ae4f6d0e25db47e3bbba6fb2f |
|
MD5 | 2d473e7d0ac123364fc562e4bb8e0e9f |
|
BLAKE2b-256 | b688f3c9d956a9081240fda54c711027cabbc59fe668ee6b665743936559832f |