CraftGround - Reinforcement Learning Environment for Minecraft
CraftGround provides a lightweight and customizable environment for reinforcement learning experiments using Minecraft.
CraftGround supports Minecraft 1.21.0 (default), 26.2, and 26.3. The newer versions have separate Fabric runtimes. See Minecraft 26.3 installation and capture modes and Minecraft 26.2 & Vulkan Support.
- Installation
- Run your first experiment
- Environment Specifications
- Technical Details
- License and Acknowledgements
- Development / Customization
Installation
Quick start (Pixi)
The Pixi environment supports Linux x86_64 and Apple Silicon Macs. On macOS,
install the Xcode Command Line Tools with xcode-select --install to provide
the compiler and SDK for the runtime's native build. With
Pixi installed, run these commands
from a CraftGround checkout.
pixi install --locked
pixi run python
The environment installs the CraftGround core (currently 2.8.0) and the 1.21
runtime from PyPI, plus the 26.2 and 26.3 runtimes from the checkout. Choose a
version in Python with craftground.make(mc_version="1.21"), "26.2", or "26.3".
Use a working graphics display to launch Minecraft. On a Mac with an active
desktop session, run pixi run --locked smoke-multiversion to check all three
versions. On a headless Ubuntu host with Xvfb and Mesa's OpenGL and Vulkan drivers
installed, use the following command. Minecraft 26.3 uses Vulkan under Xvfb.
LIBGL_ALWAYS_SOFTWARE=1 CRAFTGROUND_MC263_GRAPHICS_BACKEND=VULKAN \
xvfb-run -a pixi run --locked smoke-multiversion
First launch needs network access for Gradle and Minecraft downloads and can build native code. Gradle also downloads JDK 25 for 26.2 and 26.3 when a matching JDK is unavailable.
Quick start (conda / mamba)
conda create -n my_experiment_env python=3.11
conda activate my_experiment_env
conda install conda-forge::openjdk=21 conda-forge::cmake conda-forge::glew-dev conda-forge::libpng conda-forge::libzlib conda-forge::libopengl conda-forge::libflite
pip install craftground
Quick start (Ubuntu based systems)
Refer to the provided Dockerfile for a complete setup.
sudo apt-get update
sudo apt-get install -y openjdk-21-jdk python3-pip git \
libgl1-mesa-dev libegl1-mesa-dev libglew-dev \
libglu1-mesa-dev xorg-dev libglfw3-dev xvfb
apt-get clean
pip3 install --upgrade pip
pip3 install cmake # You need latest cmake, not the one provided by apt-get
pip3 install craftground
Windows Setup
Resolve Windows Path Length Limitation
Note: you may need to enable long file path due to windows limitation. You can enable it by editing registry as mentioned here
In the latest versions of Windows, this limitation can be expanded to approximately 32,000 characters. Your administrator will need to activate the “Enable Win32 long paths” group policy, or set LongPathsEnabled to 1 in the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem.
The following command does the same as the above instruction:
reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f
Resolve Conda Installation Issues
Using conda is recommended for Windows users. You can install conda from here. Make sure to execute
powershell -ExecutionPolicy Bypass
conda init powershell
if you are using PowerShell, in the anaconda powershell prompt.
Setup Headless Environment (Linux)
Refer to Headless Environment Setup for setting up a headless environment.
Install development version
pip install git+https://github.com/yhs0602/CraftGround.git@dev
Run your first experiment
Example repositories
- Check the example repository for benchmarking experiments.
Example code
from craftground import craftground
from stable_baselines3 import A2C
# Initialize environment
env = craftground.make(port=8023, isWorldFlat=True, ...)
# Train model
model = A2C("MlpPolicy", env, verbose=1)
model.learn(total_timesteps=10000)
model.save("a2c_craftground")
Environment Specifications
For detailed specifications, refer to the following documents:
Technical Details
See Technical Details for detailed technical information.
License and Acknowledgements
This project is licensed under the LGPL v3.0 license. The project includes code from the following sources:
Devaju fonts
- Source: Dejavu Fonts
Gamma Utils
This project includes code licensed under the GNU Lesser General Public License v3.0:
- Source: Gamma Utils project
Fabric-Carpet
This project includes code from the Fabric Carpet project, licensed under the MIT License:
- Source: Fabric-Carpet Project
Development / Customization
For detailed development and customization instructions, see Develop.
Star History
Metadata
Release files for craftground 2.8.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| craftground-2.8.2.tar.gz | 18.5 MB | With provenance | Details for craftground-2.8.2.tar.gz |
Built distributions (wheels)
Total release size: 25.3 MB
Release files / craftground-2.8.2.tar.gz
| Download URL | craftground-2.8.2.tar.gz |
|---|---|
| Size | 18.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
888862b5415b80d2a6633508f878934f7fbdc553f8d75a1dee9950df79edc3cd
|
|
BLAKE2b-256 checksum How to use checksums |
a3119336bc51713afd8015f7c2fd3b5396892efdbc4ab722a36f12b5ee2c9b8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / craftground-2.8.2-cp313-cp313-win_amd64.whl
| Download URL | craftground-2.8.2-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 411.8 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2868217dd4f207340838460a5ba441581ceeac91a15a81b424dc9def73a6c29a
|
|
BLAKE2b-256 checksum How to use checksums |
9d9562bfabf7e4e25169f3a3133be43e3208eb724b00d62266e907bee32d2b23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / craftground-2.8.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | craftground-2.8.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 633.9 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
522f5484d34fe5bd42dc9520bad63a541f33ea4d9e51c40448bb251c17bfecb6
|
|
BLAKE2b-256 checksum How to use checksums |
9f0c770c3f685def3e175eb1f8d558db6146fba8b8746b28c3bba0dae274097c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / craftground-2.8.2-cp312-cp312-win_amd64.whl
| Download URL | craftground-2.8.2-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 411.8 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
90eec1dcc9bbb323433dba7a0b1731f1b52d9c14a38942c3c3387ce6ea6e72ae
|
|
BLAKE2b-256 checksum How to use checksums |
f7a6d88de2afc37bd778491d49b63ea1f0b116d774df2f71dd638c00e837f883
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / craftground-2.8.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | craftground-2.8.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 633.9 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
029d169bbcd42b0668935f9829575e2e8c6ba556a2854e90f02e3aff2429762c
|
|
BLAKE2b-256 checksum How to use checksums |
74586fc492c7439c38e954a977bb41aed3a96b53978b493cfdc48b6d971c18e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / craftground-2.8.2-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | craftground-2.8.2-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 403.2 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e80448e5d8a90619cb4c96352be5d8aa42041e09751e2dcf351b9537b6f1fa7c
|
|
BLAKE2b-256 checksum How to use checksums |
a4a3125d3c5057a937678b2af6de2bc8342f41dc03063b0d0b280434270d56f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / craftground-2.8.2-cp311-cp311-win_amd64.whl
| Download URL | craftground-2.8.2-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 410.7 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2c3d7a57873cdd9a05ac426d2966f5eeed791b9be299af73fe89f31756b8be76
|
|
BLAKE2b-256 checksum How to use checksums |
fa19b54af407634c6d406f88ad71918699c4bafec49c6e94686cf39623b42b2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / craftground-2.8.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | craftground-2.8.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 634.9 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
d3a5664ff156f89c21fe48d0383273e2475db43a37625694a602217cd378f694
|
|
BLAKE2b-256 checksum How to use checksums |
af3874a954649ae1c17b575893f1b81d562956b95ee87299931ec9fd4b85ec9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / craftground-2.8.2-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | craftground-2.8.2-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 403.8 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
788538587f34514eeb1ff5f7df8928e100d460dc7fae5b1a6915fc4affb69868
|
|
BLAKE2b-256 checksum How to use checksums |
46cd6a35f845087a14b2d7ebc9bdc5f35134a1995651018ea215187ce05e0e62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / craftground-2.8.2-cp310-cp310-win_amd64.whl
| Download URL | craftground-2.8.2-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 409.6 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4f7d6e637311765d9567a1d021581f0fab70fa71c1e25f4ca6b4e5e070795132
|
|
BLAKE2b-256 checksum How to use checksums |
de62f3b98089a2d9a0865b61e6963fbeef06c36d13dbc24d80940d67f66fbbe8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / craftground-2.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | craftground-2.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 633.6 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
6d5fc4979842c580dad88753e439a20369ac0ef55f1d05065b39f38d73e15660
|
|
BLAKE2b-256 checksum How to use checksums |
9f138c3cf08eea1cdb2cbd4ac3e401b267f06acc2e211131a0ecab5fbeaa5479
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / craftground-2.8.2-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | craftground-2.8.2-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 402.6 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0e176b019675fcf7544af28c7ded0e554c8b734ab1207e8831ca0ad0e6ceac66
|
|
BLAKE2b-256 checksum How to use checksums |
86d674e20054313af24257eb1714e094b5ab384f9767ce18bc1a50f1277d0035
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / craftground-2.8.2-cp39-cp39-win_amd64.whl
| Download URL | craftground-2.8.2-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 409.7 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1f37600621a570cce9477aa61cde42019cab3b9037f20dc0496f1bea07baa0fb
|
|
BLAKE2b-256 checksum How to use checksums |
4d2fe6783ecc433037d0c71ce926d71a6f0a0b2a3441d380abc32bf355b80943
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / craftground-2.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | craftground-2.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 633.9 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
9b9164108ac25550be45a858737541d407982485c6d2ab451aaffcddbeeb7e08
|
|
BLAKE2b-256 checksum How to use checksums |
c945b57af00bf5cec836acc3935b793b8f8bec6990f916f8343a87847784a201
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / craftground-2.8.2-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | craftground-2.8.2-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 402.7 kB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
86f87cf43d9ee61c1daed27a41bccc7198982e23fa10adbf8dc9527f763b4a5b
|
|
BLAKE2b-256 checksum How to use checksums |
e6042dcaa016d789ea8ac1e755fd36fe1a8038353805eeeb53423d74f1bb0066
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logSecurity for craftground 2.8.2
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
All 15 files in this release have been uploaded with provenance metadata.
Attestation for craftground-2.8.2.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 Nov 30, 2026.
Transparency logA 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.