Rules DSL
Every Arbitas game is one rules file, written in the Arbitas rules DSL: YAML for the game’s structure (its players, boards, pieces, turns, moves and scoring), with short C#-like expressions in quotes for its conditions and values. When you publish, Arbitas compiles the file into a deterministic engine that runs on the server and in every player’s browser.
actions: mark: choose: - at: { from: "board.cells()", where: "pieceAt(at) == null" } effect: - create: { type: mark, props: { owner: self }, into: at }That’s tic-tac-toe’s one move: choose an empty square, and put your mark on it.
Versions
Section titled “Versions”The language is versioned, and each rules file says which version it’s written in, on its first line:
dsl: "1.1"DSL 1.0 is frozen: what it accepts will keep working. Later 1.x versions only add to it. DSL 1.1 adds the
bot heuristic and limits on how deep rules may nest and how much work one move may take.
Files written for the drafts before 1.0 ("0.1" to "0.4") still load.
Where you write rules
Section titled “Where you write rules”You write rules on your game’s Rules tab in the builder portal. The editor colors and completes expressions as you type, with each function’s documentation, and checks the file as you go, linking each problem to its line. A Visual mode beside the text edits the same rules through forms. You can also import a rulebook and let AI write a first draft for you to review.
This section
Section titled “This section”The guide explains the language a step at a time:
- How rules work: state, zones and components, actions, the flow of turns, effects and expressions.
- Build tic-tac-toe: a complete game from an empty file, then extended into a match.
- Hidden information and randomness: hands, decks, secret choices, shuffles and dice.
- Scoring and game end: how a game ends and who wins.
- Hooks: the escape hatch for rules the language can’t express.
- Variants, options and expansions: one game, played several ways.
- The bot heuristic: game knowledge that makes the bots play better.
The reference is generated from the language’s own definitions each time this site is built, so it always matches what the checker accepts:
- Rules file: every section and field.
- Standard library: every function and method expressions may call.
- Expansion manifest: every field of an expansion file.
Every complete example in this guide passes the checker and plays to the end on the engine.