Memory Maze environments with DrStrategy enhancements for reinforcement learning research
Project description
Memory Maze DrStrategy Environments
Goal-conditioned maze navigation environments adapted from Memory-Maze with visual enhancements from DrStrategy.
Environments
| 7×7 Complex Maze | 15×15 Complex Maze |
|---|---|
| Environment ID | Grid | Episode Steps | Description |
|---|---|---|---|
MemoryMaze-cmaze-7x7-drstrategy-v0 |
7×7 | 500 | Compact complex maze with colorful textures |
MemoryMaze-cmaze-15x15-drstrategy-v0 |
15×15 | 1000 | Large complex maze with colorful textures |
API
Observation Space (Dict)
The observation is a gymnasium.spaces.Dict with five keys:
| Key | Shape | Dtype | Description |
|---|---|---|---|
image |
(64, 64, 3) | uint8 | First-person egocentric camera (HWC) |
goal_image |
(64, 64, 3) | uint8 | Pre-rendered image of the current goal location |
target_color |
(3,) | float64 | Goal sphere colour, RGB in [0, 1] |
position |
(2,) | float64 | Agent position in maze coordinates |
direction |
(2,) | float64 | Agent heading unit vector |
Action Space
Continuous gymnasium.spaces.Box(shape=(2,)):
| Index | Meaning |
|---|---|
action[0] |
Forward (negative) / Backward (positive) |
action[1] |
Turn left (negative) / Turn right (positive) |
Reward and Info
- Reward: 1.0 when the goal is reached, 0.0 otherwise (sparse)
info["success"]:1on the step the goal is reached,0otherwiseinfo["distance"]: L1 distance to the current goal
Features
- Colorful wall textures using the tab20 colormap, unique per maze section
- Colorful floor textures using block-based tab20 colours
- Goal-conditioned navigation:
goal_imageprovides a pre-rendered first-person view from the target location - 20 distinct target sphere colours
- Physics-based agent (rolling ball with friction)
- Fixed maze layouts for reproducible experiments
Usage
Basic Example
import gymnasium as gym
import memory_maze
env = gym.make("MemoryMaze-cmaze-7x7-drstrategy-v0")
obs, info = env.reset()
for _ in range(500):
action = env.action_space.sample()
obs, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
obs, info = env.reset()
env.close()
Rendering Backend
Set the MUJOCO_GL environment variable before running:
export MUJOCO_GL=egl # Hardware-accelerated (recommended)
export MUJOCO_GL=osmesa # Software rendering for headless servers
Examples
examples/keyboard_control.py— Interactive 3-panel matplotlib window (obs / goal_image / top-down view), controlled with WASD keysexamples/save_observations_with_goals.py— Saves observations, all pre-rendered goal images, and the top-down view to disk
Installation
From Source
pip install -e .
Rendering Setup
export MUJOCO_GL=egl # GPU systems
export MUJOCO_GL=osmesa # Headless / CPU-only
Verify
import gymnasium as gym
import memory_maze
env = gym.make("MemoryMaze-cmaze-7x7-drstrategy-v0")
obs, info = env.reset()
print(obs["image"].shape) # (64, 64, 3)
print(env.action_space) # Box(-inf, inf, (2,), float64)
env.close()
Development
Code formatting uses black, isort, and ruff (configured in pyproject.toml). Run tests with pytest.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file color_memory_maze-1.1.0.tar.gz.
File metadata
- Download URL: color_memory_maze-1.1.0.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55a29eefe67407afe31f540ae052988da2d3727ac9161ca41e10bb26059780d3
|
|
| MD5 |
7eb623acfd951d5eddb92efd3d4aea90
|
|
| BLAKE2b-256 |
4b12cb41acd5aa1d675511f1fdc8084cbf763caf0cb1a39370f59cf546371897
|
Provenance
The following attestation bundles were made for color_memory_maze-1.1.0.tar.gz:
Publisher:
publish.yml on mctigger/color-memory-maze
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
color_memory_maze-1.1.0.tar.gz -
Subject digest:
55a29eefe67407afe31f540ae052988da2d3727ac9161ca41e10bb26059780d3 - Sigstore transparency entry: 973186145
- Sigstore integration time:
-
Permalink:
mctigger/color-memory-maze@761f587c5006f6484c9ca6f1598eb025bd226908 -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/mctigger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@761f587c5006f6484c9ca6f1598eb025bd226908 -
Trigger Event:
release
-
Statement type:
File details
Details for the file color_memory_maze-1.1.0-py3-none-any.whl.
File metadata
- Download URL: color_memory_maze-1.1.0-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de0ce2772e27c9a49738a06c22b77e2bf4091fe35065e62992b383de9c1a4857
|
|
| MD5 |
a68574a712755fb5db8fcb04aeebc9bd
|
|
| BLAKE2b-256 |
c7d7119a173b150e083aae46f015eba4765c32c37c927ee7cb160d1a94a0779d
|
Provenance
The following attestation bundles were made for color_memory_maze-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on mctigger/color-memory-maze
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
color_memory_maze-1.1.0-py3-none-any.whl -
Subject digest:
de0ce2772e27c9a49738a06c22b77e2bf4091fe35065e62992b383de9c1a4857 - Sigstore transparency entry: 973186147
- Sigstore integration time:
-
Permalink:
mctigger/color-memory-maze@761f587c5006f6484c9ca6f1598eb025bd226908 -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/mctigger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@761f587c5006f6484c9ca6f1598eb025bd226908 -
Trigger Event:
release
-
Statement type: