Skip to main content

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
cmaze 7x7 cmaze 15x15
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"]: 1 on the step the goal is reached, 0 otherwise
  • info["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_image provides 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 keys
  • examples/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.

Metadata

Release files for color-memory-maze 1.1.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 color-memory-maze 1.1.0
File Size Uploaded Provenance Actions
color_memory_maze-1.1.0.tar.gz 18.4 kB With provenance Details for color_memory_maze-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for color-memory-maze 1.1.0
File Interpreter ABI Platform Actions
color_memory_maze-1.1.0-py3-none-any.whl Python 3 none any Details for color_memory_maze-1.1.0-py3-none-any.whl

Total release size: 36.4 kB

Release files / color_memory_maze-1.1.0.tar.gz

Download URL color_memory_maze-1.1.0.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
55a29eefe67407afe31f540ae052988da2d3727ac9161ca41e10bb26059780d3
BLAKE2b-256 checksum
How to use checksums
4b12cb41acd5aa1d675511f1fdc8084cbf763caf0cb1a39370f59cf546371897
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 20, 2026.

Transparency log

Release files / color_memory_maze-1.1.0-py3-none-any.whl

Download URL color_memory_maze-1.1.0-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de0ce2772e27c9a49738a06c22b77e2bf4091fe35065e62992b383de9c1a4857
BLAKE2b-256 checksum
How to use checksums
c7d7119a173b150e083aae46f015eba4765c32c37c927ee7cb160d1a94a0779d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 20, 2026.

Transparency log

Security for color-memory-maze 1.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for color_memory_maze-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 20, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files Full provenance

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