A gym package for the 2d crafting multitask world
Project description
Gym Craftingworld
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 anAxe
and on a cell with aTree
toChopTree
and turn it intoLogs
.BuildHouse
-- The agent is required to be holding aHammer
and on a cell with someLogs
toBuildHouse
.MakeBread
-- The agent is required to be holding anAxe
and on a cell with someWheat
toMakeBread
and createBread
.EatBread
-- The agent is required to be on a cell withBread
toEatBread
.BreakRock
-- The agent is required to be holding aHammer
and on a cell with aRock
toBreakRock
.GoToHouse
-- The agent is required to be on a cell with aHouse
toGoToHouse
.MoveAxe
-- The agent is required toPickUp
anAxe
anddrop
it in another cell.MoveHammer
-- The agent is required toPickUp
aHammer
anddrop
it in another cell.MoveLogs
-- The agent is required toPickUp
someLogs
anddrop
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.
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
Hashes for gym_craftingworld-0.1.9.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87f0675710c2957c06e9fc9e457e9c4410e89130dbb31fb7077b709d979110a3 |
|
MD5 | ffe5bfe543c5ceb0224577df53d41787 |
|
BLAKE2b-256 | 7a5dc7c20166128dc9a0681db22587e90b49f8d258e4c6298b18244da3a5ea00 |
Hashes for gym_craftingworld-0.1.9.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b7040c3f1687859a4880c30f16965c4080584c31e350e7d235a3e5e257f60a4 |
|
MD5 | eea737a6f0ee0d9c1c45599b67bbbd36 |
|
BLAKE2b-256 | 696dfb827a21401c6df0359e8f767a6f0e42227cc57949ab2019ceadad01187e |