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.1-cp313-cp313-win_amd64.whl (401.4 kB view details)

Uploaded CPython 3.13Windows x86-64

craftground-2.7.1-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.1-cp312-cp312-win_amd64.whl (401.5 kB view details)

Uploaded CPython 3.12Windows x86-64

craftground-2.7.1-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.1-cp311-cp311-win_amd64.whl (400.6 kB view details)

Uploaded CPython 3.11Windows x86-64

craftground-2.7.1-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.1-cp311-cp311-macosx_11_0_arm64.whl (380.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

craftground-2.7.1-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.1-cp310-cp310-macosx_11_0_arm64.whl (379.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

craftground-2.7.1-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.1-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.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: craftground-2.7.1-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.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 59859ecfa122284479b6bfbca834ed24c5a9b9a3574a780ed4cea59455a5fc70
MD5 28a2ac1962b2a186f4c906d14663009a
BLAKE2b-256 70c0fbb76ef9a6681ce1042abcd021150f203fd6946cdac1ec97fba36860690a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e56ebe1156ad3bfb65788c6ad735b901900af056574d40d548ec2d42d23382cc
MD5 c8685d7acf5ce0bd4c44e781103b2016
BLAKE2b-256 c42039c95260e4a40a9482825049460ada995f7a3eb55cdf9c07b5ca1463a45a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: craftground-2.7.1-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.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6d8d628f04fdb78a4dce59869ec5779bb82fd271f1e7af2ed7bb74896f76154d
MD5 837f211bc03f6dedb33a9151ba4919ba
BLAKE2b-256 8cd0864332d922d787d3aae4fba43ad710bb9a17d1760b37732e6fe207c029e9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c59549e36137d160ffc00ffbf53d7ad595a18f3f43362195806de079b98441c1
MD5 69da0064b321f8c6eace9d49e80ed9c4
BLAKE2b-256 14351389c2890268a0c12e6c132652734ea7a0315e3da48abf03d0e2c35c98ff

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: craftground-2.7.1-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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 06c19106dab1c6b75430f44cb0abaa32a94634e4d3b4fba9cdd2d234275bb318
MD5 b574b48259941f549f140b70442270e5
BLAKE2b-256 2a07443ca36a3a981c9ade70816987bfa33fc8b70c1be240cb0a00c4705e60ee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5fcc8adb326c83b47bd87deda85a9b5a10fb7be368c34f9f559d15f4508f2077
MD5 0ad45864f74af5b66cc93bd194f8f364
BLAKE2b-256 1aa3c488bc52082a41192e20ccd906d19171079d5590c2b22c73efeaa7c9ce1b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 49b7f122c43b991e298ea6c22039ed865d921f3d4d0c4e7b531f523cb0e31ef8
MD5 8b0c9f72556ed6db4e2fe66993886075
BLAKE2b-256 7a96e94dc1a2d6d092713bed69fce55ab4dad606dc9447038b50391791c2f5d6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: craftground-2.7.1-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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cefd25de21390a461469823ddf334c362ae36705774d6b6e9623eb0755549359
MD5 77564fa5ff96cad9047bf4b34f8c291c
BLAKE2b-256 8560548fd73bfd74f60f1bd4cbff57709fd8249a3c4ba734aedff8e5ef013c08

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3549a7911b9fc3bdae7294fb963db38ed870f564eac82b97b05d1f0cbc09391f
MD5 271ba2146c82000e05870ebf56a4c5c0
BLAKE2b-256 969867b53d0b85f87fab44baa1c4708037a6cffe47e369d14c95a8ddc397dcf2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 07ca8d809a582b94381b3571a2627778c31e13d732b6a7badd12fff531ba4d9c
MD5 e95c0427f8b48dac5e548c50825ac16b
BLAKE2b-256 41165f7c51f2a6c801e47b11032421f11924a7218540f4da917351b58b31205a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: craftground-2.7.1-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.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 56cc29e1b0bc2e5146ecc3aa79ecbe90f03e52558ed44239ce2f5033c3e36eed
MD5 1d45c2a5c477705301dd44c83b620a05
BLAKE2b-256 300da65612d04f768585428f5d5500645fb5db66e9030f4722f4d90151754d55

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 26fa353a51658cba0268bb0d0849423c9694c4523eb29a5d9be07aae5f29fa9b
MD5 388cc078300ae44dedd546b25591153e
BLAKE2b-256 4ee8a0ef9567ffa0279d797543b83b5117ddc94f385c6e41ce3d99d469c82e4d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.7.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 319added0cc99d6dfc8a5555f91ff4209142d59f2f743d5e817922546339925f
MD5 0a35bbdeb572d449896bfc66bfe772fa
BLAKE2b-256 4f46827dda224d34f8670f023ee665697fecb0133e7936295085383e5e93b9ef

See more details on using hashes here.

Provenance

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