Skip to main content

gym-sapientino

PyPI PyPI - Python Version PyPI - Status PyPI - Implementation PyPI - Wheel GitHub

test lint docs codecov

black

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}
}

Metadata

Release files for gym-sapientino 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gym-sapientino 0.2.0
File Size Uploaded Provenance
gym_sapientino-0.2.0.tar.gz 26.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for gym-sapientino 0.2.0
File Interpreter ABI Platform
gym_sapientino-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 61.6 kB

Release files / gym_sapientino-0.2.0.tar.gz

Download URL gym_sapientino-0.2.0.tar.gz
Size 26.4 kB
Tags Source
SHA-256 checksum
How to use checksums
040e253c3572bc4027b98a79d69ada15c35c8cfd8ee1c8cc60949f02ec60180b
BLAKE2b-256 checksum
How to use checksums
2a03c582044ce54bae5c1045a66ad2e1b5ac6029e2377700096a5464aed1459e
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / gym_sapientino-0.2.0-py3-none-any.whl

Download URL gym_sapientino-0.2.0-py3-none-any.whl
Size 35.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5902e5b63825f08c305eaa9c14abc63220a5334ae4f6d0e25db47e3bbba6fb2f
BLAKE2b-256 checksum
How to use checksums
b688f3c9d956a9081240fda54c711027cabbc59fe668ee6b665743936559832f
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for gym-sapientino 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page