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

Uploaded CPython 3.13Windows x86-64

craftground-2.6.23-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (617.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

craftground-2.6.23-cp312-cp312-win_amd64.whl (400.7 kB view details)

Uploaded CPython 3.12Windows x86-64

craftground-2.6.23-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (617.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

craftground-2.6.23-cp311-cp311-win_amd64.whl (399.9 kB view details)

Uploaded CPython 3.11Windows x86-64

craftground-2.6.23-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (618.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

craftground-2.6.23-cp311-cp311-macosx_11_0_arm64.whl (379.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

craftground-2.6.23-cp310-cp310-win_amd64.whl (399.4 kB view details)

Uploaded CPython 3.10Windows x86-64

craftground-2.6.23-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (616.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

craftground-2.6.23-cp310-cp310-macosx_11_0_arm64.whl (378.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

craftground-2.6.23-cp39-cp39-win_amd64.whl (399.2 kB view details)

Uploaded CPython 3.9Windows x86-64

craftground-2.6.23-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (616.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

craftground-2.6.23-cp39-cp39-macosx_11_0_arm64.whl (378.3 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: craftground-2.6.23.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.23.tar.gz
Algorithm Hash digest
SHA256 32eb17371585fc3952f39b44b5b5f5e63b6fb8894cabf74d06e6630d06c0eda3
MD5 b6b09757d05c708fbcfd15b86960ff04
BLAKE2b-256 8601e991f4894ac9c1db6b6fa9d5806174068f32bf816e08d4496d996bed844b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.6.23-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e7cce7cf1423e5a835ff954d67e6814eac3ef263e10cbd2323d2a339a949ff31
MD5 58d05588e4d5b69b94597955b6e1ae92
BLAKE2b-256 052f01649ead4c5ee7de5fdb33fe6c15484e06b4e523a40067c47ce15c81f76d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.6.23-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 774cae5e4aba5fbda3fc4144e3d9ed87d5a63321ccccdd99f8ed83e335b6b6a6
MD5 d281ac9b4724e383b4d4784ac04ad906
BLAKE2b-256 3abedda3fb18e0fc431b7a162fb6f377af0088e88993b0cf0153ade4b509bc51

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.6.23-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 de54a743e2bf18153a56d920a2ab9bdb951973979d27a63766fc6b9ef0fe8dbe
MD5 1a94d526c7faeb710c77932e24b7bc21
BLAKE2b-256 78d18a97756667d520593cb0ccae76999cb28f7462bc2472c0e2db05cc57e4cb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.6.23-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b60dd07a71dc8a1ddd52330547ebe0ea31a8ec0dc9eece87e38fed07570b2174
MD5 91fb334a8def02cf5a34353b2cb4555c
BLAKE2b-256 6414f346258e7eb6c618620e43dd6612ac78032b5ab60949a5493755d825f8d2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.6.23-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b9bc415030091b806a167bf04ca037e81b4cd213685bb76be51185014631eecc
MD5 9b6e64717a5f0cc0cbff9967ca05c9c3
BLAKE2b-256 2767dcf5ccb75c375441fbdefe9913c0d2f02214fe9791cafa741fbf1916a8ce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.6.23-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e683b1be3baefe92fe15eea8046b939abb1ee712bf54f6481e3a336defd16579
MD5 0469b18dccb5448ce4320015959951ce
BLAKE2b-256 cc64d5fe7935d3baec55e8b7386bc72effd5c46202b1a2c8e65cb60aefb77181

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.6.23-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 31c8241278382c4d90b0b99b4f9524d0d87b2c1ab9d5a96f90e4cd9442791837
MD5 70c43a934798c7b1a16ede8fe5d5cc94
BLAKE2b-256 3c5875d7361582a1acac814b96b2b8add6d89862090112cf64313d91d8484c61

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.6.23-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cafdac7788f8489ec8c9f10df3f15e253a1c8998be0e9bad640d514493bab3b7
MD5 adcaf6aac616a65c6490ec72ae0fa453
BLAKE2b-256 3a754e617bd7ecff59eb9bee5a6674650a99a06ecb9b7936b2c6ca248172d71b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.6.23-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 595c520196974e9b1fa19145be5886e03de11716c78b8a821849262c36221cf7
MD5 70571cf8c1ea48acbc277b5a530e34f4
BLAKE2b-256 7a43201e1c2368b91c2c3d611b1f328da06b20fe102dc539095ee2bdbfd05b89

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.6.23-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 da6c4751ca20cfaa2d071e199b38549867c43fe015e27b47dc00e710cfd9571e
MD5 39b56a9a9bcac630cb89565b6879fc21
BLAKE2b-256 a635e91bf6830a3f97270366b72d4c3efeda3900cd8ba08b7d51b640dd520c41

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: craftground-2.6.23-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 399.2 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.23-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6cfedcde5eb525e4a964b65ada845bba4bbaf22a4f988915f5dac6dfd3d1ccb9
MD5 bb2a91c69050cc5f8323e36e20f8ab09
BLAKE2b-256 ea27c04d8c61a66dec03b050bad490d15e3d7b80dcfc3b037e1eedab42e30ca4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.6.23-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4aabe5b13ec02c88e42e3396a5920762e50cce8482f7f458abbcdae02ab14d90
MD5 2d4fa3bd2c4a28b67e768bf7997efb87
BLAKE2b-256 cf6707ec85588a0d34102b817318d3410ace99fff27a449fc49ba6c8c35b5a6b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for craftground-2.6.23-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 67b5b36479995a41e0c65f5b2e489ef17a03eaea2f40870461cb336049f38243
MD5 dde07109251b11d1bf4522dbb6261e24
BLAKE2b-256 ce93aae3cc804ccd20a86e854bfca6dd20e6e8c3d5a276d8209fcdca0074426c

See more details on using hashes here.

Provenance

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