Verifying Turn Based Games logo

Verifying Turn Based Games

Community
abagames
verifying-turn-based-games

Verifies two-player strict-alternating-turn games via a pure-function engine contract and bot-ladder / WP-tension metrics. Use when designing or implementing board/card games that need replay, search, bot ladders, win-rate analysis, tension metrics, or decision-density evaluation. Skip for real-time, simultaneous-action, 3+ player, or single-player puzzle games.

Overview

Publisherabagames
Repositoryagentic-gamedev-skills
Skill nameverifying-turn-based-games
Stars
39
Forks
6
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by abagames on GitHub. Read the source before you install it.

Installation

Install the Verifying Turn Based Games AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/abagames/agentic-gamedev-skills/tree/main/.agents/skills/verifying-turn-based-games
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/abagames/agentic-gamedev-skills.git /tmp/agentic-gamedev-skills
mkdir -p .claude/skills
cp -r /tmp/agentic-gamedev-skills/.agents/skills/verifying-turn-based-games .claude/skills/verifying-turn-based-games
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Verifying Turn Based Games in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Verifying Turn Based Games on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Verifying Turn Based Games is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Turn-Based Game Verification

A reusable contract + measurement methodology for two-player turn-based games.

Two parts:

  1. Engine Interface Contract — pure-function shape any conforming engine must satisfy, enabling search, replay, and quality analysis to be written generically.
  2. Quality Measurement Methodology — vocabulary and metrics for judging game quality beyond raw win-rates.

This skill prescribes the what (contract and metric definitions). It does not prescribe language / runtime / file layout / build system / tooling commands, ideation or tag workflows, player-facing documentation format, or engine code generation — those are project-local choices.


Scope

In scope:

  • Two-player, strict alternating turns
  • Perfect or imperfect information
  • Finite turn cap
  • Deterministic RNG via explicit seed (no side-effect randomness)

Out of scope (do not apply):

  • Simultaneous actions, reaction/interrupt windows
  • 3+ players
  • Real-time / non-turn-based
  • Single-player puzzles

If the target game does not fit the in-scope list, stop and tell the user this skill does not apply rather than forcing the contract.


Part 1: Engine Interface Contract

The engine MUST expose these pure functions. Signatures shown in TypeScript-ish notation; translate to the host language as needed.

init(config?: Config, seed?: number): State
step(state: State, action: Action): { state: State, reward?: number, done: boolean, info: object }
getLegalActions(state: State): Action[]
getObservation(state: State, playerId: PlayerId): State
getResult(state: State): { done: boolean, winners: PlayerId[], reason: string, scores?: Record<PlayerId, number> }
scoreState(state: State, playerId: PlayerId): number
replayLog(state: State): string
cloneState?(state: State): State

Contract notes:

  • getLegalActions and step use state.currentPlayer implicitly. The contract assumes strict alternating turns; do not extend it to simultaneous play.
  • state.history: Event[] MUST exist and MUST be appended to inside step. replayLog is a pure formatter over state.history; no external collector.
  • state.rngSeed MUST exist; all randomness inside step derives from it deterministically. No Math.random(), clock reads, or other side-effect randomness.
  • getObservation returns the same State type with hidden fields nulled or masked, NOT a different observation type. This keeps bots type-compatible with the engine.
  • getResult replaces a simpler getWinner so callers can distinguish win-by-HP / win-by-deck-out / draw-by-turn-cap. The reason string is required.
  • scoreState is required by the measurement layer (Part 2). An engine that omits scoreState cannot be quality-evaluated by this skill.
  • cloneState is only required when State is not fully immutable. If the host language guarantees immutability (or you use structural sharing), omit it.

Required invariants

  • No global mutable state.
  • step does not mutate its input state. Branch search via step(cloneState(s), a) or rely on immutability.
  • Replay determinism: given a fixed seed and a fixed action sequence, init followed by repeated step produces byte-identical states across runs.
  • Single illegal-action policy: choose ONE and document it in the engine — throw, return { state: s, done: false, info: { illegal: true } } without state change, or auto-pass. Do not mix policies.
  • Action and State must be JSON-serializable (replay, persistence, search caching all depend on this).

Pre-implementation checklist

Before writing the engine, the rules document must specify:

  • Exact data model for State (turn, currentPlayer, public board, private state, rngSeed, history)
  • All terminal conditions in priority order, each with its reason string
  • Action schema and preconditions for each action type
  • Pass behavior when getLegalActions returns empty
  • Hidden information policy (which fields are nulled in getObservation)
  • Numeric caps that guarantee finite game length

If any item above is unspecified, do not start engine implementation — return to rule design first.


Part 2: Quality Measurement Methodology

Once the engine satisfies Part 1, evaluate quality on two layers.

Run Part 2 when quality itself is the question: a new or reworked rule set, an explicit balance or bot-strength assessment, or a change to scoreState, action legality, or bot logic. UI, wording, rendering, and pure serialization changes that leave the rule semantics untouched need the Part 1 contract checks only — do not re-run the ladder and metric suite for them.

Layer A: Win-rate ladder

Implement three bots over the contract:

  • Random — uniform sample from getLegalActions
  • Baseline — greedy 1-step argmax of scoreState
  • Strong — shallow search (1–2 ply lookahead) over scoreState

Measure with N ≥ 200 games per matchup, swapping seats to control for first-move advantage.

MetricDefinitionTarget
Baseline vs Random win rateFraction of games the Baseline bot wins against Random, averaged across swapped seats≥ 0.65
Strong vs Baseline win rateFraction of games the Strong bot wins against Baseline, averaged across swapped seats≥ 0.60
First-player advantagewin-rate gap between seats in the same matchup≤ 0.10
Action usage distributionper-action usage rate, per botno core action below 0.05

Layer B: Experience metrics

Per game, snapshot scoreState each turn. Derive WP (win probability) as WP = sigmoid((score0 − score1) / T). Calibrate temperature T per game so that Random-vs-Strong terminal WP for Strong averages ≈ 0.9.

MetricDefinitionTarget
Tension Scorestd-dev of the WP time-series0.15–0.35
Lead Change Counttimes WP crossed 0.5≥ 2 per game
Comeback Ratefraction of games won by a player who had WP ≤ 0.250.05–0.25
Flatness Ratiofraction of games with ≥ 5 consecutive turns of |ΔWP| ≤ 0.03≤ 0.20
Final-Stretch VolatilityWP std-dev in the last 25% of turns≥ 0.8 × Tension Score
Decision Densitymean count of distinct legal actions per turngame-dependent; report distribution

Failure-pattern checklist

When metrics miss targets, look for:

  • Degenerate strong play — Strong wins but uses only 1–2 distinct actions
  • Dead mechanic — a specific action never used by any bot (dominated or over-costed)
  • Seat-order flip — win/loss reverses entirely when seats swap (first-move balance broken)
  • Low-impact loop — long games dominated by repeated near-zero ΔWP turns

Improvement-loop discipline

  • Change either rules OR bots in a single experiment, never both. Attribution dies if both move.
  • Define pass/fail thresholds before the rerun, not after the numbers come back.
  • Keep a per-experiment changelog: hypothesis / changed files / before-after metrics / decision (adopt or revert).

Frequently asked questions

What does the Verifying Turn Based Games AI skill do?

Verifies two-player strict-alternating-turn games via a pure-function engine contract and bot-ladder / WP-tension metrics. Use when designing or implementing board/card games that need replay, search, bot ladders, win-rate analysis, tension metrics, or decision-density evaluation. Skip for real-time, simultaneous-action, 3+ player, or single-player puzzle games.

Why use Verifying Turn Based Games on TypingMind?

Because you install it once and use it with any model. Verifying Turn Based Games is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Verifying Turn Based Games in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/abagames/agentic-gamedev-skills/tree/main/.agents/skills/verifying-turn-based-games. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Verifying Turn Based Games?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Verifying Turn Based Games?

As many as you like. As long as a model supports skills, you can use Verifying Turn Based Games with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Verifying Turn Based Games AI skill free?

Yes. It is published on GitHub by abagames under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇