ContextLab / ContextLab/risk-analysis

Add a game simulator for generating synthetic games

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Deferred from the initial scoping of #1, which is analysis-only. Filing so we don't lose it.

## Idea

Implement a D12-rules game engine that can play games start to finish with configurable agents,
producing logs in the same schema the scraper emits. Since the rules are the same whether a human
or a bot plays, board-dynamics findings from simulated games transfer to real ones.

## Why it's worth doing

- **Null models.** Most of the interesting claims in #1 are comparative: is this map unbalanced,
is this position-strength trajectory unusual, do these games cluster more than chance? Each of
those needs a generative null to compare against, and a simulator is the principled way to get
one.
- **Counterfactuals.** Replay a real game from turn *k* with a different move and measure the
swing in position strength. Turns descriptive metrics into causal ones.
- **Metric validation.** A position-strength metric should predict wins in simulation. If it
doesn't, it's wrong, and we'd rather learn that from cheap simulated games than from the paper.
- **Coverage.** Real data will be thin for rare configurations (unusual maps, player counts,
drop-out patterns). Simulation fills gaps.

## Scope sketch

- Rules engine: territory placement, reinforcement/bonus calculation, attack resolution, fortify,
card sets, elimination, turn order
- Agent interface with a few baselines (random-legal, greedy-expansion, bonus-completion,
border-minimizing), plus a hook for learned agents
- Emits logs conforming to the same schema as scraped games, so the whole analysis stack runs on
simulated and real games interchangeably
- Validation: agent strength ordering is stable, games terminate, distributions are sane

## Explicitly out of scope here

Negotiation between agents. LLM agents talking to each other is a different project answering a
different question — see the companion issue on external conversation corpora. Board play only.

## Depends on

#1 — needs the log schema, map/graph representation, and position-strength metrics to exist first,
since the whole point is to plug into them.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with issue #1 to understand the log schema, map/graph representation, and position-strength metrics this simulator must consume. Define completion against the listed validation goals: games terminate, agent strength ordering is stable, distributions are sane, and simulated logs work with the existing analysis stack.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.