GymCraft is a NeoForge mod for reinforcement learning, LLM agents, and game automation experiments. It wraps Minecraft mobs—or its built-in simulated player entity—as Gymnasium-style environments, allowing external Python programs to observe the world, take actions, and receive rewards over gRPC.
Whether you want to train a mob to move and build upward, ask a language model to gather and craft resources, or create your own Minecraft agent benchmark, GymCraft provides an extensible foundation for the job.
GymCraft is an agent development and research tool rather than a traditional content mod. A typical setup runs both the Minecraft mod and an external Python agent.
reset() and step() workflow.PlayerSimEntity, a player-shaped controllable entity with player-like attributes.| Environment | Description |
|---|---|
gymcraft:simple_mob |
A general-purpose base environment for testing actions, observations, and custom agents. |
gymcraft:parkour_mob |
Learn to jump and place blocks underneath the agent to reach a target height. |
gymcraft:iron_mining |
Start empty-handed, gather wood, craft tools, and obtain raw iron. |
gymcraft:iron_golem_warden |
Build and heal an iron golem to complete a long-horizon Warden encounter. |
gymcraft:general |
A broad open-task environment with a comprehensive action and observation set. |
localhost:50051 by default.pip install -U gymcraft
Run the Q-learning parkour demo:
gymcraft-demo parkour <entity_uuid> --episodes 200
Or connect any Chat Completions compatible model:
gymcraft-demo llm-chat <entity_uuid> --task "Find the nearest chest and inspect its contents"
Run gymcraft-demo --help to list all bundled demos and options.
| Minecraft | NeoForge | Java | GymCraft |
|---|---|---|---|
| 26.1.2 | 26.1.2.95 | 25 | 1.2.1 |
| 1.21.1 | 21.1.250 | 21 | 1.2.1+mc1.21.1 |
The Python client requires Python 3.11 or newer.