Skip to main content

Gym Craftingworld

Downloads Lines Documentation Status

This is a (work-in-progress) gym package for a 2D crafting environment. This environment is based off one first described in Plan Arithmetic: Compositional Plan Vectors for Multi-Task Control, published in NeurIPS 2019, and the mechanics are adapted from the corresponding code at code.

You can read the documentation here.

Environment description

This environment consists of a two-dimensional top-down, grid-based world consisting of 4x4 pixel cells. The environment contains seven object types of object: Tree, Rock, Logs, Wheat, Bread, Hammer, and Axe.

Different objects are represented by differently coloured 4x4 blocks, while the agent is represented by a 2x2 white pixel block centered within the 4x4 cell.

The agent's actions are descrete and consist of six possible choices: Up, Down, Left, Right, PickUp, and Drop.

Logs, hammers, and axes can be picked up by agent. Trees and rocks block the agent's movement.

When an agent picks up an object, its block changes to a square block with 2x1 white pixels on top and 2x1 pixels below in the color of the object.

The environment consists of nine skills:

  • ChopTree -- The agent is required to be holding an Axe and on a cell with a Tree to ChopTree and turn it into Logs.
  • BuildHouse -- The agent is required to be holding a Hammer and on a cell with some Logs to BuildHouse.
  • MakeBread -- The agent is required to be holding an Axe and on a cell with some Wheat to MakeBread and create Bread.
  • EatBread -- The agent is required to be on a cell with Bread to EatBread.
  • BreakRock -- The agent is required to be holding a Hammer and on a cell with a Rock to BreakRock.
  • GoToHouse -- The agent is required to be on a cell with a House to GoToHouse.
  • MoveAxe -- The agent is required to PickUp an Axe and drop it in another cell.
  • MoveHammer -- The agent is required to PickUp a Hammer and drop it in another cell.
  • MoveLogs -- The agent is required to PickUp some Logs and drop it in another cell.

A task is defined by a list of skills. For example, [ChopTree, BuildHouse].

The quantities and positions of each object are randomly selected at each reset, which occurs between episodes.

Rendering

To store each episode as a gif, call env.allow_gif_storage(), which will store each episode in the /renders/ subdirectory.

Download files

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

Source Distribution

gym_craftingworld-0.1.9.8.tar.gz (32.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gym_craftingworld-0.1.9.8-py3-none-any.whl (66.9 kB view details)

Uploaded Python 3

File details

Details for the file gym_craftingworld-0.1.9.8.tar.gz.

File metadata

  • Download URL: gym_craftingworld-0.1.9.8.tar.gz
  • Upload date:
  • Size: 32.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.2

File hashes

Hashes for gym_craftingworld-0.1.9.8.tar.gz
Algorithm Hash digest
SHA256 c2618aa273274229bf4099ad5527ebeaed7d8ef7a9385e0cd4369a8d0a1db56f
MD5 3625a80711e16b300e6d9524b7feee42
BLAKE2b-256 3719253d2805355632783cdc984cae1258991a96332229403a26a1e49d2bc9b2

See more details on using hashes here.

File details

Details for the file gym_craftingworld-0.1.9.8-py3-none-any.whl.

File metadata

  • Download URL: gym_craftingworld-0.1.9.8-py3-none-any.whl
  • Upload date:
  • Size: 66.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.2

File hashes

Hashes for gym_craftingworld-0.1.9.8-py3-none-any.whl
Algorithm Hash digest
SHA256 656820611ab7cc0d3cf663c2ed372930eea48cf74328df9eb69be17bdb98c046
MD5 8de1c2cda2c3e64e0ddef6db2dd147cb
BLAKE2b-256 0017f38da0f9592d25f660ddc9c1a77f2e2a1dd06669f033eb37ccfd48bd8900

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.9.8 This release

2 files

0.1.9.7

2 files

0.1.9.6

2 files

0.1.9.5

2 files

0.1.9.4

2 files

0.1.9.3

2 files

0.1.9.2

2 files

0.1.9.1

2 files

0.1.9.0

2 files

0.1.8.9

2 files

0.1.8.8

2 files

0.1.8.7

2 files

0.1.8.6

2 files

0.1.8.5

2 files

0.1.8.4

2 files

0.1.8.3

2 files

0.1.8.2

2 files

0.1.8.1

2 files

0.1.8.0

2 files

0.1.7.11

2 files

0.1.7.9

2 files

0.1.7.8

2 files

0.1.7.7

2 files

0.1.7.6

2 files

0.1.7.5

2 files

0.1.7.4

2 files

0.1.7.3

2 files

0.1.7.2

2 files

0.1.7.1

2 files

0.1.7

2 files

0.1.6.3

2 files

0.1.6.2

2 files

0.1.6.1

2 files

0.1.6.0

2 files

0.1.5.9

2 files

0.1.5.8

2 files

0.1.5.7

2 files

0.1.5.6

2 files

0.1.5.5

2 files

0.1.5.4

2 files

0.1.5.3

2 files

0.1.5.2

2 files

0.1.5.1

2 files

0.1.5.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page