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.
In this repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/issue-clarification-questions.mdcCursor rule
- .cursor/rules/reset-font-assets.mdcCursor rule
- .cursor/rules/src-dotnet-build-release.mdcCursor rule
- .cursor/rules/unity-plugins-before-work.mdcCursor rule
- codex-issueSkill
- commitSkill
- complete-prdSkill
- dependency-docsSkill
- dotnet-buildSkill
- dotnet-testSkill
- generate-imageSkill
- implementSkill
- meeting-joinSkill
- meeting-scheduleSkill
- meeting-startSkill
- plan-reviewSkill
- planSkill
- prSkill
- specifySkill
- unity-e2e-runSkill
- unity-pluginsSkill
- add-terminal-commandSkill
- dependency-docsSkill
- dotnet-benchmarkSkill
- dotnet-buildSkill
- dotnet-testSkill
- flag-assetsSkill
- github-issue-automationSkill
- image-generationSkill
- localizationSkill
- meeting-joinSkill
- meeting-scheduleSkill
- meeting-startSkill
- milestone-completeSkill
- province-config-generatorSkill
- unity-e2e-runSkill
- unity-pluginsSkill
- unity-prefabsSkill
- unity-scenesSkill
- update-branchSkill
- cursor-meeting-joinSkill
- cursor-meeting-startSkill
- unity-pluginsSkill
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
- Very specific: line 56
Run both scenarios with the fixed seed/org above.
≈ “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.
Files
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 directoryHeadlessRunner/Program.BuildContextreads).--scenario:windrives--orgitself to a total-control victory;losedrives a different organization to victory while--orgstays a losing participant for the whole run — the score is always read from--org, solosemeasures how high a losing org's score can climb.--org: the organization id whoseorg_scoreis recorded. Fixed calibration org:Illuminati(seeAssets/Configs/organizations.json; the only other organization isMasons, which is used automatically as the winner for thelosescenario since it's the only other participant).--seed: fixed calibration seed:12345. Same config + same seed reproduces the same score bit-for-bit (GameLogicContext.rngSeedseeds a singleSystem.Randomused 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
- Loads
organizations.json, resolves the winner org (--orgforwin, the other participating org forlose), and builds aGameLogicContextviaProgram.BuildContextwith all organizations participating,initialOrganizationId = --org. - Runs one
GameLogic.Update(0f)to initialize, then pushes aChangeControlCommandgiving the winner orgMaxControlPoolcontrol of every country incountries.json(the same patternGameCompletionLogicTests.GiveTotalControluses insrc/Game.Tests). - Calls
GameLogic.Update(deltaTime)once per tick untilGameLogic.IsCompleted, or until it hits--max-ticksor--timeout-seconds(checked every 256 ticks, same cadence asHeadlessRunner). - Reads the final score, settling it first rather than trusting a plain
ResourceQuery.GetValueread:GameCompletionSystemcan complete the game the same tickChangeControlCommandis applied, one step afterResourceSystem.Updatealready ran with the pre-command control state, which would otherwise leaveorg_scoreone tick stale forever (Updateshort-circuits onceIsCompleted). It reads the stale value viaResourceQuery.GetValue(logic.World, --org, ResourceDefinitions.OrgScore)and settles it vianew OrgScoreCollector().Compute(--org, staleValue, logic.World)— the same collector formulaResourceSystemwould have applied on the next, never-run tick — then writes aCalibrationResultJSON (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.jsonConfirm 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.
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
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.

