Rulebook Documentation

The Rulebook language lets you write complex interactive systems with the simplicity of synchronous code, while retaining all the advantages and none of the disadvantages of asynchronous code. Projects that benefit from Rulebook include reinforcement-learning environments, video games, sophisticated UIs, and more.

4hammer (our flagship demo) shows Rulebook in action.

Why Rulebook?

Under the hood

Rulebook’s defining idea is the notion of Action functions with SPIN properties, a unique blend of uncommon and new language features that allow all of the above features.

Integration

Rulebook compiles to one shared library (or WebAssembly module) with a C-compatible ABI and generated bindings for C, C++, C#, Python, and Godot Script. Use it the way SQL complements those languages—drop it in wherever interactive logic is the hard part.

Reinforcement Learning Docs:

UI, Controller and Gameplay Programming

UI, controller and gameplay programming are among the sections that benefit the most from using Rulebook. Beside automatically fuzz , prove correct and run reinforcement learning on your program, write self-configuring UIs , Rulebook automatically provides a sharp division between UI concerns and Controllers or Gameplay.