Skip to main content

Lightweight Minecraft Environment for Reinforcement Learning

Project description

CraftGround - Reinforcement Learning Environment for Minecraft

Wheels (All)) Python package CMake Build Gradle Build

Static Badge Static Badge

CraftGround_Logo

Hits

CraftGround provides a lightweight and customizable environment for reinforcement learning experiments using Minecraft.



Installation

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

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

Gamma Utils

This project includes code licensed under the GNU Lesser General Public License v3.0:

Fabric-Carpet

This project includes code from the Fabric Carpet project, licensed under the MIT License:

Development / Customization

For detailed development and customization instructions, see Develop.

Star History

Star History Chart

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

craftground-2.6.24.tar.gz (18.8 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

craftground-2.6.24-cp313-cp313-win_amd64.whl (875.5 kB view details)

Uploaded CPython 3.13Windows x86-64

craftground-2.6.24-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

craftground-2.6.24-cp312-cp312-win_amd64.whl (875.6 kB view details)

Uploaded CPython 3.12Windows x86-64

craftground-2.6.24-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

craftground-2.6.24-cp311-cp311-win_amd64.whl (874.8 kB view details)

Uploaded CPython 3.11Windows x86-64

craftground-2.6.24-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

craftground-2.6.24-cp311-cp311-macosx_11_0_arm64.whl (851.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

craftground-2.6.24-cp310-cp310-win_amd64.whl (874.3 kB view details)

Uploaded CPython 3.10Windows x86-64

craftground-2.6.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

craftground-2.6.24-cp310-cp310-macosx_11_0_arm64.whl (850.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

craftground-2.6.24-cp39-cp39-win_amd64.whl (874.1 kB view details)

Uploaded CPython 3.9Windows x86-64

craftground-2.6.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

craftground-2.6.24-cp39-cp39-macosx_11_0_arm64.whl (850.7 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file craftground-2.6.24.tar.gz.

File metadata

  • Download URL: craftground-2.6.24.tar.gz
  • Upload date:
  • Size: 18.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for craftground-2.6.24.tar.gz
Algorithm Hash digest
SHA256 71006bf7fae4608a2e28e54a5069dd63ee8d2c3478879c040fbd3ce228594f8b
MD5 a1a9cb6256cb9efa24e1cd0a0206cec4
BLAKE2b-256 e2cebe2c42f9e8bd81b9a816c2d0d29b2a5cd4d1a4a44707c920c1407f6790c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.6.24.tar.gz:

Publisher: publish-upload.yml on yhs0602/CraftGround

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file craftground-2.6.24-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for craftground-2.6.24-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9fcf6d1af820f0eaba1e290be28f9eab1ba571729a41e322959535e8c6051b89
MD5 fc642e4a5f87442c86535c499542f287
BLAKE2b-256 14edc3e3cde7bdedf57a95393938244f77b27d99de47bd4a7cbf708b51d6d193

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.6.24-cp313-cp313-win_amd64.whl:

Publisher: publish-upload.yml on yhs0602/CraftGround

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file craftground-2.6.24-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for craftground-2.6.24-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 34ba7fb54614ea395535a694a8c4e29d2c4c928ffae84cff3b813cb7d36364e1
MD5 6a2e6029482abb4450731ea68d930e62
BLAKE2b-256 f7de501dd02ff68d2521219dacefbdfcb45c23851439ae94023eebb516152030

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.6.24-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-upload.yml on yhs0602/CraftGround

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file craftground-2.6.24-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for craftground-2.6.24-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e34ec1329efb5201cb0f1f161dc5414afbc7b03a2a43c1e8f22a64be9654c331
MD5 eca77684029169ef1bd42f087fc286f6
BLAKE2b-256 f5f9d632c0274f0df6a8a34d5965f5d1be0e2f29f20afb73aa128a22b4600f33

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.6.24-cp312-cp312-win_amd64.whl:

Publisher: publish-upload.yml on yhs0602/CraftGround

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file craftground-2.6.24-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for craftground-2.6.24-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f332456f81718254aea46998d91d994e41babdd321c436daa2194be0b6795a53
MD5 e78bbac9dac7957a8cdd3c54f0809b98
BLAKE2b-256 92fc80278512fa05439bf42ce2703e2e4791cc684f99271f9f4276d194c153ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.6.24-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-upload.yml on yhs0602/CraftGround

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file craftground-2.6.24-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for craftground-2.6.24-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5bafedc41bf4f3654a160c9d2e62d7dc6ef7c3429d3575e17a234d4d8c1dafca
MD5 eaaf6ac7599be8c4da3086c32e34bd3a
BLAKE2b-256 33f4164924cbfe07de6f6349c49e0fd341661413e057d5c1c107ebbc6da219bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.6.24-cp311-cp311-win_amd64.whl:

Publisher: publish-upload.yml on yhs0602/CraftGround

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file craftground-2.6.24-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for craftground-2.6.24-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 041b899f7b17410a81b5e9ce1b61c6db3565378e8b4edca0a64bb63c260e350d
MD5 f0c98fac55518c5a52b9f4eb20ef77bf
BLAKE2b-256 4f2f12b554ecf13cfeeba503a9ab0289522c7eeae9b3d4541cd54adf07327cac

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.6.24-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-upload.yml on yhs0602/CraftGround

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file craftground-2.6.24-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for craftground-2.6.24-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 61d34b1a2ff602dc163764b3d6390a6972bc1cf17d244a3799e144dbedd5c113
MD5 c579d022622fd9f2a4d6fa2024979cb8
BLAKE2b-256 d99973ec2fe12903173977c197356d5f5fc16c70e71b8a50d9df3bd4c699fb5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.6.24-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish-upload.yml on yhs0602/CraftGround

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file craftground-2.6.24-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for craftground-2.6.24-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f63f9c445cbf3bef9fcf9109fc8e91af297ee037b99e7763d1eaf490880eacf8
MD5 239650b8ab8df997e972b92bae061e09
BLAKE2b-256 40cc56def2deb246486f93aa2531b0cfb9bdbfde22a284675fc07d6368948855

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.6.24-cp310-cp310-win_amd64.whl:

Publisher: publish-upload.yml on yhs0602/CraftGround

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file craftground-2.6.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for craftground-2.6.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d5d27c69cffbceb195d8112a84d076bb611b7fb9b33eb4c4f92713eed949b79d
MD5 6fbd12fb96cfd66a54f4347b351c0b77
BLAKE2b-256 197c29e1fe0cfb0475a6dcc6fe5394036ab8f4b6af604f07b1e199e8bb21df0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.6.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-upload.yml on yhs0602/CraftGround

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file craftground-2.6.24-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for craftground-2.6.24-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 416e18e916a0a0480bc0b1451e62bc060335c3570396196f044a1d36944c08ff
MD5 737909fa4e51d10e7539227543df1de0
BLAKE2b-256 a82bccbe81a8c29cb0304577bd49fa61fcd9d46821376b06e5868928362dfd60

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.6.24-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish-upload.yml on yhs0602/CraftGround

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file craftground-2.6.24-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: craftground-2.6.24-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 874.1 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for craftground-2.6.24-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 195560d7ce4dada5c8c5b9c200b8f1826f0dd209b2175f75b99606f785f768b9
MD5 91fc7fa7f9c3c195acfc1ce5ab17fb31
BLAKE2b-256 acf331667eade3172a9eaca41a8c4070c4631018268cb0a2bef2e6ccaa126308

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.6.24-cp39-cp39-win_amd64.whl:

Publisher: publish-upload.yml on yhs0602/CraftGround

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file craftground-2.6.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for craftground-2.6.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2dbc8c4379abaff9776f3982751e657782fd1a1b78ee8514faa726ac995ed55c
MD5 5b29ee69172d63700d229fbda3de03b1
BLAKE2b-256 6430dd36d62608f1532394f0468eccbe4bdaf8d326fd896ba89c8bb4e04c9c61

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.6.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-upload.yml on yhs0602/CraftGround

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file craftground-2.6.24-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for craftground-2.6.24-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 db954fc934e4092ac49cd6bf391b1392a4057d20ca780ed66f406228872d3216
MD5 e5da13bc18e8f83f1f08633db378a122
BLAKE2b-256 1d6ba39ae7956222a76c77bcf5792ba96bf7bbd5bef57e53a24d22e0dec533a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.6.24-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: publish-upload.yml on yhs0602/CraftGround

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page