Farama-Foundation/Metaworld

Collections of robotics environments geared towards benchmarking multi-task and meta reinforcement learning

What it is

Meta-World is an open-source benchmark for building and testing multi-task and meta reinforcement learning algorithms. It focuses on continuous control robotic manipulation — think robot arms learning to reach, push, pick up, etc. It provides several ready-made benchmark setups to evaluate different aspects of such algorithms.

Installation

Install with pip: pip install metaworld

API

Meta-World follows the Gymnasium API (the standard Python interface for reinforcement learning environments). You create an environment with gym.make(...), then loop: reset → sample an action → step → get observation/reward/done flags.

Example from the README:

import gymnasium as gym
import metaworld

env = gym.make("Meta-World/MT1", env_name="reach-v3")
observation, info = env.reset()
for _ in range(500):
    action = env.action_space.sample()
    observation, reward, terminated, truncated, info = env.step(action)
env.close()

Available benchmarks

Multi-task benchmarks (MT1, MT10, MT50)

  • MT1: trains a single policy on 1 task (you pick any of the 50 available tasks).
  • MT10: trains a policy on 10 tasks simultaneously.
  • MT50: trains a policy on 50 tasks simultaneously.
  • In MT10 and MT50, the observation returned to the agent includes a one-hot task ID appended to the state, so the agent knows which task it's facing.
  • MT10 and MT50 come in two execution modes:
    • Synchronous (vector_strategy='sync'): all environments run in the same process — lowest resource usage.
    • Asynchronous (vector_strategy='async'): each environment runs in its own process, communicating via pipes — for users with more compute.

Meta-learning benchmarks (ML1, ML10, ML45)

These test few-shot adaptation — the agent must quickly adapt to new situations after seeing only a few examples.

  • ML1: tests few-shot adaptation to goal variations within a single task (you pick any of the 50 tasks).
  • ML10: 10 training tasks + 5 test tasks — tests adaptation to new tasks.
  • ML45: 45 training tasks + 5 test tasks — also tests adaptation to new tasks.

Each meta-learning benchmark has separate train and test environments, created with names like Meta-World/ML1-train and Meta-World/ML1-test. ML10 and ML45 also support sync/async modes.

Custom benchmarks

You can combine any number of Meta-World environments into your own benchmark by passing a list of environment names (each ending in -v3):

  • Prefix mt → environments are goal-observable (for multi-task RL).
  • Prefix ml → environments are partially observable (for meta-RL).

Both support sync and async modes.

Resources

Related

  • Project
  • Project
  • Dispatch
  • Project
  • Project