CraftGround provides a lightweight and customizable environment for reinforcement learning experiments using Minecraft.
- Installation
- Run your first experiment
- Environment Specifications
- Technical Details
- License and Acknowledgements
- Development / Customization
conda create -n my_experiment_env python=3.11
conda activate my_experiment_env
conda install conda-forge::openjdk=21 cmake
sudo apt install libglew-dev
pip install craftground
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
Refer to Headless Environment Setup for setting up a headless environment.
pip install git+https://github.com/yhs0602/CraftGround.git@dev
- Check the demo repository for detailed examples.
- Check the example repository for benchmarking experiments.
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")
For detailed specifications, refer to the following documents:
See Technical Details for detailed technical information.
This project is licensed under the LGPL v3.0 license. The project includes code from the following sources:
- Source: Dejavu Fonts
This project includes code licensed under the GNU Lesser General Public License v3.0:
- Source: Gamma Utils project
This project includes code from the Fabric Carpet project, licensed under the MIT License:
- Source: Fabric-Carpet Project
For detailed development and customization instructions, see Develop.