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.7.4.tar.gz (18.4 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.7.4-cp313-cp313-win_amd64.whl (402.0 kB view details)

Uploaded CPython 3.13Windows x86-64

craftground-2.7.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (618.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

craftground-2.7.4-cp312-cp312-win_amd64.whl (402.0 kB view details)

Uploaded CPython 3.12Windows x86-64

craftground-2.7.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (618.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

craftground-2.7.4-cp311-cp311-win_amd64.whl (401.2 kB view details)

Uploaded CPython 3.11Windows x86-64

craftground-2.7.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (619.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

craftground-2.7.4-cp311-cp311-macosx_11_0_arm64.whl (380.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

craftground-2.7.4-cp310-cp310-win_amd64.whl (400.7 kB view details)

Uploaded CPython 3.10Windows x86-64

craftground-2.7.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (617.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

craftground-2.7.4-cp310-cp310-macosx_11_0_arm64.whl (379.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

craftground-2.7.4-cp39-cp39-win_amd64.whl (400.6 kB view details)

Uploaded CPython 3.9Windows x86-64

craftground-2.7.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (618.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

craftground-2.7.4-cp39-cp39-macosx_11_0_arm64.whl (379.6 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for craftground-2.7.4.tar.gz
Algorithm Hash digest
SHA256 1f3816f1b3019d5605d3621024a140d03fa3ca3d0a7fcb250a8b200cc1e0fbdd
MD5 728e934c2544bf60a6ba55664642efc5
BLAKE2b-256 2cad959c07836f3d957f6e2b2ac3f3a2436fec96d62f5f08f08d4882e7604c1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.7.4.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.7.4-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: craftground-2.7.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 402.0 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for craftground-2.7.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9be988f86a5f9f4fc26c7201b76f193486114065ce356a339e5397cb6caf7930
MD5 2f5196c9f6aaab6dc8a31bf9aa6b08df
BLAKE2b-256 364f157decdfab9c88cb059c92f0e342e6ba75f05896cc2fcbce8f3bbf086ece

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.7.4-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.7.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for craftground-2.7.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 695c4c43d9e5a4e6723a9024d8ea46696bc515d8eca802e998cfb3c9a4bf88b1
MD5 a73b1a8bdbd6fc150576e643d4efd9c3
BLAKE2b-256 4825e7e8833ac50a684a7cb369bc316642aa7f68d82327c803c501239e4414f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.7.4-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.7.4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: craftground-2.7.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 402.0 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for craftground-2.7.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dd878ba3ad800ff8634452ebba69f558703585a32208e05e92c6095df89f27fa
MD5 6e44e72cbba2bac6e6689e90058640aa
BLAKE2b-256 383caf516ed096b31cb28666da34def427aac45bc1826e91b04c3dea28451829

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.7.4-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.7.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for craftground-2.7.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e5b6b86d9bc40779a6c75e6d3f9b690e31998e93f5dce549c6cc9537ad4caea5
MD5 07c3891d0fcd2745b2cf597829182e80
BLAKE2b-256 0bb9df9c49345b747535013bf86726ba62a5782b0aea2821c32de4eeef7d285d

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.7.4-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.7.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: craftground-2.7.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 401.2 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for craftground-2.7.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 52bce2737920065ce35f3490b1f5bba0def08acd3c27ee9c2006a74dcc34a946
MD5 70c36740662156b7a480ef9306d9fc7f
BLAKE2b-256 23abaf3c3b92b894c6a095abc01e9a2534d9e62b6451b039b113ead4c866c7e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.7.4-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.7.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for craftground-2.7.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aeeb10de44dba266a6437a3da8a9e2b0799e4869fb8309ce470d959baa1c7304
MD5 ced1e56bad1207742ae86b82b2b1f538
BLAKE2b-256 3a44843f3c7ee5c62a18588d606e64c1f4636d887e6e8eda3c468b387dec348e

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.7.4-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.7.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for craftground-2.7.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6b990048c5074d09d90d0b807289888e5adc48e87131e9e38c16e81010736715
MD5 50238fbc5c772fa931612b5f8de95046
BLAKE2b-256 6917b3aec797d490dde1a5fa97ad0ca95d973dc55d8fe71684d286cce6c38b4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.7.4-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.7.4-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: craftground-2.7.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 400.7 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for craftground-2.7.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f0a702e002a292d190e184403212f2e3353fa0ba0efacf26ee50890af766f1b5
MD5 6dd48e8e61a2a03031f8e50e97779843
BLAKE2b-256 f0d9976202e8b044cb51ed2f41d5882a1e7e1891e4e5bd84a9adae48918ab7fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.7.4-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.7.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for craftground-2.7.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 199f800711da576621d89874787c33221b8dbc1c4c9a0b860a62a6900cd89663
MD5 c96266c02c2ba41a137437fa07ca2fa7
BLAKE2b-256 6b031bc699eaab3fe1c86d1426c6a7e9457e06095fee9ae65e989d575e8d30de

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.7.4-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.7.4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for craftground-2.7.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5e867b9d8753caff9bbf2071b3c7663b71f0defbd5ac4ebddae9e17d4b0cff5c
MD5 ee70528d5e12a2d9c6c577ece63aa21c
BLAKE2b-256 495e8726066193c1d59f01e81f07a62b68473dcba2605b227271d25e5946f87f

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.7.4-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.7.4-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: craftground-2.7.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 400.6 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.7.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cb2a6987ea1df981fb3e9ec344efa125cd3b5574748e2d4a33e66ad592f49b9e
MD5 c76fd456029a6654fe564403d9b149f4
BLAKE2b-256 568698179fb9a53b446f873fb0865aa36712f395dffeb4f0ff37facafdfd6f66

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.7.4-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.7.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for craftground-2.7.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 167f644a8d416264baf120b37961a6238d789147a084badeb6aa2690d084017f
MD5 5b955d30cf30e5220d4431a457308abe
BLAKE2b-256 3b46cae0d74c38b5741ea4df7c6915f8b67e000b887cfcba53c252455ee70325

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.7.4-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.7.4-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for craftground-2.7.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f8abd7b28648a890435a0118b5dc46262fc7e1f69b638caa5d0b5ed0f29aef0c
MD5 5c66f1b95e40dfe9bb275355c43884b9
BLAKE2b-256 ae1cd93b1ec9f1fa11b046f43aae7f8218c7120cad8b4c821bf9dafc5f666027

See more details on using hashes here.

Provenance

The following attestation bundles were made for craftground-2.7.4-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