gym-multigrid is a Python library extending OpenAI Gym with multi-room gridworld environments. It enables researchers to benchmark and develop reinforcement learning agents on navigation, exploration, and semantic tasks. Users can choose from predefined layouts or create custom grid maps with objects, doors, and locks. The package supports full or partial observability, flexible action spaces, and seamless integration with popular RL frameworks like Stable Baselines.
gym-multigrid is a Python library extending OpenAI Gym with multi-room gridworld environments. It enables researchers to benchmark and develop reinforcement learning agents on navigation, exploration, and semantic tasks. Users can choose from predefined layouts or create custom grid maps with objects, doors, and locks. The package supports full or partial observability, flexible action spaces, and seamless integration with popular RL frameworks like Stable Baselines.
gym-multigrid provides a suite of customizable gridworld environments designed for multi-room navigation and exploration tasks in reinforcement learning. Each environment consists of interconnected rooms populated with objects, keys, doors, and obstacles. Users can adjust grid size, room configurations, and object placements programmatically. The library supports both full and partial observation modes, offering RGB or matrix state representations. Actions include movement, object interaction, and door manipulation. By integrating it as a Gym environment, researchers can leverage any Gym-compatible agent, seamlessly training and evaluating algorithms on tasks like key-door puzzles, object retrieval, and hierarchical planning. gym-multigrid’s modular design and minimal dependencies make it ideal for benchmarking new AI strategies.
Who will use gym-multigrid?
Reinforcement learning researchers
AI developers experimenting with navigation tasks
Academics teaching RL concepts
Students learning Gym environments
How to use the gym-multigrid?
Step1: Install gym-multigrid via pip: pip install gym-multigrid
Step2: Import Gym and gym_multigrid: import gym, gym_multigrid
Step3: Register or select an environment: env = gym.make('MiniGrid-MultiRoom-N2-v0')
Step4: Initialize the environment: obs = env.reset()
Step5: Execute actions in a loop: obs, reward, done, info = env.step(action)
Step6: Render the environment: env.render()
Step7: Close environment when finished: env.close()
Platform
mac
windows
linux
gym-multigrid's Core Features & Benefits
The Core Features
Multi-room gridworld environments
Customizable layouts and object placement
Full and partial observation spaces
OpenAI Gym compatibility
Flexible action and state representations
The Benefits
Standardized benchmarking for navigation and exploration
Easy integration with existing RL frameworks
High configurability for research experiments
Lightweight dependencies
Open-source extensibility
gym-multigrid's Main Use Cases & Applications
Benchmarking RL algorithms on multi-room navigation
Researching hierarchical planning and exploration strategies
Educational demos for reinforcement learning courses