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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

craftground-2.7.3-cp313-cp313-win_amd64.whl (401.4 kB view details)

Uploaded CPython 3.13Windows x86-64

craftground-2.7.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (618.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

craftground-2.7.3-cp312-cp312-win_amd64.whl (401.5 kB view details)

Uploaded CPython 3.12Windows x86-64

craftground-2.7.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (618.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

craftground-2.7.3-cp311-cp311-win_amd64.whl (400.6 kB view details)

Uploaded CPython 3.11Windows x86-64

craftground-2.7.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (618.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

craftground-2.7.3-cp311-cp311-macosx_11_0_arm64.whl (380.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

craftground-2.7.3-cp310-cp310-win_amd64.whl (400.2 kB view details)

Uploaded CPython 3.10Windows x86-64

craftground-2.7.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (617.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

craftground-2.7.3-cp310-cp310-macosx_11_0_arm64.whl (379.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

craftground-2.7.3-cp39-cp39-win_amd64.whl (400.0 kB view details)

Uploaded CPython 3.9Windows x86-64

craftground-2.7.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (617.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

craftground-2.7.3-cp39-cp39-macosx_11_0_arm64.whl (379.1 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: craftground-2.7.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 401.4 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.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 555e12cb1e2f6e47d211e2272dff00b203a5987620f88b0a23be6f0d8192824d
MD5 f246ff5ebc608d9a903af81d6b639e35
BLAKE2b-256 0e163626a90c5febee54415e32ee1deae27d520c5f8ce01fa615ce0bf35e158e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 05a3ab366765876c40dbb84c51bb18479e068b0f9a5b6831ec160844e6bd95b2
MD5 99e0efb351278b6663782a15931f444d
BLAKE2b-256 a2701d10337738caa616ca290597f0cdd2179313cd8c67a1b2297ad67796ecd7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: craftground-2.7.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 401.5 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.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a32781fd0f0be23131a71b2004c43f5b283b4485c54e47ee5b56b2308f7e90f7
MD5 acc113b25e05eea0f829329fa3a613e9
BLAKE2b-256 a17cda233adb95b3781a1169d4de9519169897a8fd9df1d259bc1880ffe7a435

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ef8663c4cf237e632bbf9861311e95e46b0b8c1986fb98fa526c7aa13b887616
MD5 ea3d4cad31a4d2211a28fb249e762747
BLAKE2b-256 537d34f01cbe90bdead3bea3897038176b536d1f2588126232b5f81358e950a7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: craftground-2.7.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 400.6 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.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 83b6ad1cac50685613e14c5d0898186c87b85ec6ce51544de1d30d3e37acb86a
MD5 6a672dab94f7972d1ee3d739c26649b0
BLAKE2b-256 a25dd53aaf554e62875ba08c0330f2cf083c4596a3c36124d0660bc2019ec85c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0db7fc7092865b83e6c717c8fd9eb38d34d9afb8b7ed70dd5d72a7f20a18437a
MD5 36c68c344c60e6ea486a0bb1c870261b
BLAKE2b-256 4890a94e6efb5b75c08f29115a841389d6d6392a5a25d679af0b9bec0da4db1d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9505c89af8c35fdee76bb4fd7e24ff9c8b972caecb632048f5ecd7a7e1602b9d
MD5 70d8c7cb21063591590b19308052e0ba
BLAKE2b-256 e4bd0be60d447ade565bf9aa4534aa6043789e24a34f58545a8518c6b0abe860

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: craftground-2.7.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 400.2 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.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cba5c72581c7b455da5ac79d4cb747a9adf8d53cddfb39914084747711c2c431
MD5 cd4a10855c94b13bcb480c78198d1805
BLAKE2b-256 5f0c6bf9c695b5d85687c6a557d3a188b48cd03d628b0607431ed3e4d283ac94

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4e582c6f47e42def4c27b6435162695334b4005a92307466562996e603c2d41e
MD5 1b27a4746951c3cb282b2081791150c7
BLAKE2b-256 20015895c3d7b84fc99dc36ee6b15a738983440aeee7e2b16b5f34194af7809a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5d301aaff843114fd0ab9e8e0de8752a37ede5decb16d096ee657bbe17f510fb
MD5 4ea782d847740ec997d4346885e1b2f7
BLAKE2b-256 2ffac8a96304bad3fc2943939b5a243d75ddde52a176f69559ae1d0621ca0a86

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: craftground-2.7.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 400.0 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.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ae0ac471702d57ae56e7466bfe388d0663c726f3d30a8abac9e820d2a8091043
MD5 dd6da6bf45aa354ad61414943067abdc
BLAKE2b-256 e50128909e13a93bcc1227270f8d16e5f8ce624b3a4c1a65288ec0ca8f1f0d33

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 465cf1f2d332d61103ea6bfb991ae7b96a7778c215cfa5a8149aff79d7ec47f5
MD5 dbef7d372bd2989ed6a969bca37483be
BLAKE2b-256 9bf48426276725dee46730b0019f2d6d9df455b53b2eb88e3d2f83bc0f0336d9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d02e65d5324587fcf5d8056a7a0cd6179c8782da4a08b77f01340314f89cbd02
MD5 3a1c561f749e646fd9ca084d2f2f6f04
BLAKE2b-256 b17e234073c753d28ccc06a38c918dc1bcd05393a4f117b266753c349f22e51a

See more details on using hashes here.

Provenance

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