All skills
thedivergentai avatar

/godot-monte-carlo-balancer

@9d6e91e

Use when auditing or recalibrating game balance: build a source-driven Monte Carlo balance lab (Rust + rayon) that extracts live game data, simulates human playstyles (AFK→pro), emits win-rate/economy verdicts with confidence intervals, and bruteforce-tunes parameters. Trigger on unfair levels, unreachable shops, farm exploits, interest-curve cliffs, post-content recalibration, or CI balance JSON diffs. Keywords: balance lab, Monte Carlo, win rate, difficulty curve, economy career, playstyle simulation, Resource extraction, GDScript parser, bruteforce tuning.

Use this Skill: https://skilld.dev/gh/thedivergentai/gd-agentic-skills/godot-monte-carlo-balancer

This session only. Nothing lands on disk.

references07-godot-calibration.md

≈716 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Phase 7 — Godot Headless Calibration

Goal: The Rust abstract sim is a high-throughput lab, not ground truth for complex physics/AI. Calibrate a few golden cells against headless Godot before full-matrix sign-off.

Skill Chain: godot-testing-patterns (seeded RNG, N-frame gameplay sim) → godot-builder (GODOT_PATH, headless CLI).

When required

  • Any Godot project where threat/agency resolution depends on physics, navigation, AnimationTree, or non-trivial AI.
  • After large extract/sim refactors.
  • Optional skip only if Phase 0 declared the game fully formulaic (pure Resource math, no physics) — document the waiver in BALANCE_PLAN.md.

Procedure

  1. Pick 3–5 golden cells (session × style × loadout) spanning easy/mid/hard and weak/strong styles.
  2. Implement a headless Godot runner (GUT test or --script) that:
    • Seeds RNG the same way the game does in shipping builds.
    • Drives a bot approximating the cell's PlayStyle (reaction delay / miss rates as best-effort).
    • Emits win/grade/time JSON compatible with json-schema.md cell fields.
  3. Run the abstract sim on the same cells with the same --seed and ≥300 runs (1000 preferred).
  4. Compare win rates (and key texture metrics if available).

Pass criteria

Check Default tolerance
|p̂_sim − p̂_godot| ≤ 5–10 percentage points (lock in Phase 0)
Grade mean / fail-kind ranking Same ordinal story (not bit-identical)
Systematic bias all cells same direction FAIL — model bug, not noise

If outside tolerance: fix extract (missed coeff) or sim fidelity before trusting matrix-wide verdicts.

CLI shape

balance-lab calibrate --cells tools/balance_lab/golden_cells.json --runs 500
# Internally: rust matrix subset + invokes Godot headless; prints delta table + PASS/FAIL

NEVER

  • NEVER claim “mathematically balanced” from an uncalibrated abstract model of physics-heavy combat.
  • NEVER require bit-identical Godot vs Rust — require decision-same (bands/tolerance).
  • NEVER calibrate only the pro style — include a weak style cell.
<!-- GDSkills research links (agents) Official docs: - https://docs.godotengine.org/en/stable/tutorials/scripting/resources.html - https://docs.godotengine.org/en/stable/classes/class_json.html - https://docs.godotengine.org/en/stable/tutorials/editor/command_line_tutorial.html Related skills: - https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-resource-data-patterns/SKILL.md — Resource-first extract - https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-testing-patterns/SKILL.md — Phase 7 headless calibration Parent skill: https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-monte-carlo-balancer/SKILL.md -->

Source: SKILL.md on GitHub

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill provides a robust framework and Rust-based templates for creating Monte Carlo game balance simulations in Godot 4.7. It includes automated build scripts, source-driven data extraction patterns, and statistical analysis tools. Security analysis confirms the skill follows safe practices, utilizing trusted external resources and standard development workflows.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at 9d6e91e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 2 months ago

README badge

README badge for thedivergentai/gd-agentic-skills/godot-monte-carlo-balancer