Skip to main content

OpenAI Gym Environments for Sorting based

Project description

Sorting Gym

OpenAI Gym Environments for Sorting based on the 2020 paper Strong Generalization and Efficiency in Neural Programs by Yujia Li, Felix Gimeno, Pushmeet Kohli, Oriol Vinyals.

This repository includes implementations of the basic neural environment for sorting.

Install from pypi (recommended) with:

pip install sorting-gym

Environments:

  • SortTapeAlgorithmicEnv-v0
  • BasicNeuralSortInterfaceEnv-v0

In the tests module we implement the manual agents from the paper.

Agents may want to consider supporting parametric/auto-regressive actions:

Goals:

  • Implement bubblesort/insertion sort environment.
  • Implement bubblesort/insertion sort agents as tests.
  • Implement function stack environment
  • Implement quick sort agent to test function environment
  • Include an example solution to train an agent via RL
  • Environment rendering

Ideas to take it further:

  • Open PR to gym for a discrete parametric space
  • Abstract out a Neural Controller Mixin/Environment Wrapper?
  • Consider a different/enhanced instruction set.

Run test with pytest

pytest

Building/Packaging

poetry update
poetry build
poetry package

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sorting-gym-0.0.2.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

sorting_gym-0.0.2-py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page