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.

references04-economy-retention.md

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

Phase 4 — Economy, Retention & Reward Cadence

Goal: Validate the player's economic life with the same rigor as session difficulty. A perfect difficulty matrix is still a broken game if the shop is unreachable, a farm exists, or reward cadence has a dead plateau.

Model every currency end-to-end

From the Phase 0 economy map:

  • In-run currency: earn formulas + sinks; styles spend via trap_budget_fraction, buys_upgrades, upgrade_cash_reserve.
  • Meta currency: first-clear, new-best vs replay (track coins_new_best and coins_replay separately — farm detection), mode payouts.
  • Conversion / unlock bookkeeping: reproduce the game's exact progression math (prefer extracted from save/progression Resources).

Career simulation (career)

simulate_careers(data, style, input_model, runs) chains full progressions into a CareerTimeline:

  1. Fresh save → frontier session with current loadout under style × input_model.
  2. On win: rewards + unlocks; on loss: style fallback (retry / grind earlier / secondary mode).
  3. Mobile careers apply the SessionModel chunking: total wall-clock time is split into sessions (e.g. 3–7 minutes per session). Interruption frequency and session length caps dictate play windows.
  4. Shopping policy against the price ladder before each attempt.
  5. Record: wall-clock minutes, sessions played to purchase, attempts/session, balances over time, purchase timestamps, mode episodes.

Hundreds of careers → distributions, not anecdotes. Report minutes-to-each-purchase, sessions-to-each-purchase, attempts-per-session, balance curve, time-to-complete per style × input model.

Career red flags

  • Unreachable shop tier — median career never affords an item before content ends.
  • Zero-grind completion — everything on first pass; meta-economy decorative.
  • Grind walls — purchases need many repeats of mastered content (vs Phase 0 minute targets).
  • Dominant farm — one session/mode >> currency/minute of everything else.
  • Session overflow — median level/run time exceeds the mobile session length cap → players quit mid-run; check whether progress/checkpoints are saved.
  • Session-boundary dead ends — a session routinely ends with no purchase, unlock, or star gained → mobile dopamine macro-loop broken (design target: ≥1 visible progress event per 3–7 min session).

Replay vs frontier

Healthy: new-best delta + modest flat replay. Check replay_cpm vs frontier income. Flat grade × N every clear is a farm. After nerfs, always re-run careers (over-nerf check).

Modes as economic organs

Per mode: currency_per_minute by style × input model; win/metric bands; career integration (grinder must actually route through better-paying modes). Cap unintended mode dominance (e.g. no mode > ~1.5× intended best unless designated grind mode).

Interest curve

Across session index, per style × input model: primary metric + grade; intensity proxies; new-content cadence (each session should introduce ≥1 new element unless intentional breather). Flag cliffs, inversions, and 3+ same-intensity plateaus.

Reward-cadence checkpoints (measurable)

Loop Check FAIL if
Micro (seconds) In-run spend for spending styles spend_avg ≈ 0 while cash_end high
Meso (session) Grade histogram has improvement room Everyone max grade or stuck at floor
Macro (days) Purchase timestamps from careers Gap > 3× median inter-purchase interval

Platform-specific meso targets:

  • Mobile meso loop: one session (3–7 min) → at least 1 clear / star / small shop purchase.
  • Desktop meso loop: one play block (20–40 min) → 3–5 clears / major upgrade / level unlock.

Deliverable

Economy report (text + JSON): currency/minute matrix (session & mode × style × input model), career timelines with purchase timestamps (minutes and sessions), replay-vs-frontier ratios, interest-curve table, PASS/WARN per red-flag and cadence rule.

<!-- 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