A heavily optimized and flexible grid-world game engine for Game AI research.
Check out the full list of pre-built environments here
Design and build game mechanics using a simple YAML-based language: GDY
Fast execution speed environments can run up to 70k FPS on a single thread.
Don't worry about complex efficient rendering code, just define the images for each game object and Griddly passes this to the GPU.
Supports Single Agent, Multi Agent and RTS environment interfaces.
Multiple observervation modes:
Copyable Forward Models
Reinforcement Learning with RLLib
Join the Discord community for help and to talk about what you are doing with Griddly!
Full documentation can be found here: griddly.readthedocs.org
The most awesome part of Griddly is the ability to easily customize and build your own research environments. To make this extra easy we've written lots of tutorials:
Firstly you will need to configure the repo for the build.
You can do this using the configure.sh
script in the root directory.
Build a debug version of the web-assembly binaries.
You can run all the build commands manually
# Download the build requirements
conan install deps/wasm/conanfile_wasm.txt --profile:host deps/wasm/emscripten.profile --profile:build default -s build_type=Debug --build missing -if build_wasm
# Configure the cmake build
cmake . -B build_wasm -GNinja -DWASM=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
# Run the build
cmake --build build_wasm --config Debug
We provide two presets for CMake to use to develop locally using your IDE (provided it supports CMakePresets)
# Download the build requirements
./configure.sh -p=WASM -b=Debug
# Configure build with preset
cmake --preset="Debug WASM"
# Build with preset
cmake --build build_wasm --config Debug
Build native griddly binaries:
# Download the build requirements
conan install deps/conanfile.txt --profile default --profile deps/build.profile -s build_type=Debug --build missing -if build
# Configure the cmake build
cmake . -B build -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
# Run the build
cmake --build build --config Debug
We provide two presets for CMake to use to develop locally using your IDE (provided it supports CMakePresets)
# Download the build requirements
./configure.sh -b=Debug
# Configure build with preset
cmake --preset="Debug Native"
# Build with preset
cmake --build build --config Debug
Test can be run with:
ctest .
To install the built libraries with python you need to do one of the following (depending if your built the binaries with Debug
or Release
)
The installer should copy the following files into the python/griddly
directory:
resources/*
-> python/griddly/resources
{Release|Debug}/python_griddly.cpython*
-> python/griddly/libs
cd python
python setup.py develop
OR
cd python
pip install -e .
cd python
python setup.py install
We use Conan to install all build dependencies and libraries used to compile Griddly.
You will need to set up a python environment of your choice and then install conan using:
pip install conan
When compiling using Debug, you will need the install vulkan validation layers which are part of the vulkan sdk. Otherwise you will run into errors like:
[2023-01-04 15:21:54.412] [warning] Required vulkan layer unavailable: VK_LAYER_KHRONOS_validation
[2023-01-04 15:21:54.412] [error] Missing vulkan extensions in driver. Please upgrade your vulkan drivers.
1. Install [cmake](https://cmake.org/download/)
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install cmake