agentleFS
KonHKonH/GlobalStrategy/.claude/skills/end-game-score-calibration/SKILL.md

end-game-score-calibration

Skill3 starsChanged 2 months agoMITView on GitHub

Run the calibrate-end-game console-runner CLI verb to derive the end-game comparison score thresholds for Assets/Configs/game_settings.json's endGameComparisons, and to re-derive them when config or score rules change.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run both scenarios with the fixed seed/org above.

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

End-game score calibration

calibrate-end-game is a Game.ConsoleRunner CLI verb (src/Game.ConsoleRunner/CalibrationRunner.cs, src/Game.ConsoleRunner/CalibrationOptions.cs) that drives a full headless game to completion and records the scored organization's final org_score resource value. It exists to produce a reproducible "calibration maximum" score, which the nine endGameComparisons entries in game_settings.json are scaled against via the threshold formula below.

Command

dotnet run --project src/Game.ConsoleRunner -- calibrate-end-game --config <dir> --scenario win|lose --org <id> --seed <n> --output <path>
  • --config: config directory, e.g. Assets/Configs (the same directory HeadlessRunner/Program.BuildContext reads).
  • --scenario: win drives --org itself to a total-control victory; lose drives a different organization to victory while --org stays a losing participant for the whole run — the score is always read from --org, so lose measures how high a losing org's score can climb.
  • --org: the organization id whose org_score is recorded. Fixed calibration org: Illuminati (see Assets/Configs/organizations.json; the only other organization is Masons, which is used automatically as the winner for the lose scenario since it's the only other participant).
  • --seed: fixed calibration seed: 12345. Same config + same seed reproduces the same score bit-for-bit (GameLogicContext.rngSeed seeds a single System.Random used for all non-deterministic systems).
  • --output: JSON result path, conventionally under .claude/skills/end-game-score-calibration/references/.

Optional flags (defaults match HeadlessOptions's pattern): --max-ticks (default 20000), --timeout-seconds (default 300), --hours-per-tick (default 24).

What it does

  1. Loads organizations.json, resolves the winner org (--org for win, the other participating org for lose), and builds a GameLogicContext via Program.BuildContext with all organizations participating, initialOrganizationId = --org.
  2. Runs one GameLogic.Update(0f) to initialize, then pushes a ChangeControlCommand giving the winner org MaxControlPool control of every country in countries.json (the same pattern GameCompletionLogicTests.GiveTotalControl uses in src/Game.Tests).
  3. Calls GameLogic.Update(deltaTime) once per tick until GameLogic.IsCompleted, or until it hits --max-ticks or --timeout-seconds (checked every 256 ticks, same cadence as HeadlessRunner).
  4. Reads the final score, settling it first rather than trusting a plain ResourceQuery.GetValue read: GameCompletionSystem can complete the game the same tick ChangeControlCommand is applied, one step after ResourceSystem.Update already ran with the pre-command control state, which would otherwise leave org_score one tick stale forever (Update short-circuits once IsCompleted). It reads the stale value via ResourceQuery.GetValue(logic.World, --org, ResourceDefinitions.OrgScore) and settles it via new OrgScoreCollector().Compute(--org, staleValue, logic.World) — the same collector formula ResourceSystem would have applied on the next, never-run tick — then writes a CalibrationResult JSON (scenario, orgId, winnerOrgId, seed, completed, tickCount, finalDate, score) to --output.

Calibration maximum and threshold formula

Run both scenarios with the fixed seed/org above. The calibration maximum is the higher of the two scenarios' recorded score values. The nine endGameComparisons entries are scaled off that maximum using:

factor(i) = 0.05 + i * (1.20 - 0.05) / 8   for i = 0..8
threshold(i) = Math.Round(factor(i) * calibrationMaximum, MidpointRounding.AwayFromZero)

This produces nine ascending thresholds spanning 5% to 120% of the calibration maximum.

Rerun / update procedure

Re-run both scenarios (and update references/calibration_results.md) whenever game_settings.json's score-affecting fields (CountryScoreCoefficient, MaxControlPool, CompletionCondition, resource collector coefficients) or countries.json's country list change — any of those can shift the calibration maximum:

dotnet run --project src/Game.ConsoleRunner -- calibrate-end-game --config Assets/Configs --scenario win --org Illuminati --seed 12345 --output .claude/skills/end-game-score-calibration/references/win_result.json
dotnet run --project src/Game.ConsoleRunner -- calibrate-end-game --config Assets/Configs --scenario lose --org Illuminati --seed 12345 --output .claude/skills/end-game-score-calibration/references/lose_result.json

Confirm both runs report "completed": true within the timeout ceiling, confirm re-running each scenario reproduces the same score bit-for-bit, then update the calibration maximum and the nine computed thresholds recorded in references/calibration_results.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.