Imagine the features of Minecraft: open world, procedural generation, fully destructible voxel environments... but open source, without Java, easily extensible in Lua, and with the modern Gymnasium API designed for RL... This is Craftium!

Craftium logo

Craftium is a fully open-source platform for creating Reinforcement Learning (RL) environents and tasks that provides a Gymnasium wrapper for the Minetest voxel game engine.

Check the installation instructions and the getting started pages to start using craftium!

Features ✨

  • Super extensible 🧩: Minetest is built with modding in mind! The game engine is completely extensible using the Lua programming language. Easily create mods to implement the environment that suits the needs of your research! See environments for a showcase of what is possible with craftium.

  • Extensive documentation 📚: Craftium extensively documents how to use existing environments and create new ones. The documentation also includes a low-level reference of the exported Python classes and gymnasium Wrappers, extensions to the Lua API, and code examples. Moreover, Craftium greatly benefits from existing Minetest documentation like the wiki, reference, and modding book.

  • Modern RL API 🤖: Craftium slightly modifies Mintest to communicate with Python, and implements the well-known Gymnasium's Env API. This opens the door to a huge number of existing tools and libraries compatible with this API, such as stable-baselines3 or CleanRL.

  • Fully open source 🤠: Craftium is based on the Minetest and Gymnasium, both open-source projects.

  • No more Java ⚡: The Minecraft game is written in Java, not a very friendly language for clusters and high-performance applications. Contrarily, Minetest is written in C++, much more friendly for clusters, and highly performant!

Citing Craftium

To cite Craftium in publications:

@article{malagon2024craftium,
  title={Craftium: An Extensible Framework for Creating Reinforcement Learning Environments},
  author={Mikel Malag{\'o}n and Josu Ceberio and Jose A. Lozano},
  journal={arXiv preprint arXiv:2407.03969},
  year={2024}
}

Contributing 🏋️

We appreciate contributions to craftium! craftium is in early development, so many possible improvements and bugs are expected. If you have found a bug or have a suggestion, please consider opening an issue if it isn't already covered. In case you want to submit a fix or an improvement to the library, pull requests are also very welcome!