skills/tabular/phase-based-strategy-cycling/SKILL.md
Divide a game into repeating phases (attack, mine, spawn) with turn-modular gating so the agent cycles between aggressive and economic behavior
npx skillsauth add wenmin-wu/ds-skills tabular-phase-based-strategy-cyclingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
In multi-phase game AI, a single static strategy loses to adaptive play. Dividing the game into repeating cycles — e.g., attack (turns 0-20), mine (20-90), idle/spawn (90-100) within each 100-turn block — lets a heuristic agent alternate between aggression and economy. Each phase has different action priorities and ship allocation rules.
def agent(obs, config):
board = Board(obs, config)
me = board.current_player
turn = board.step
cycle_pos = turn % 100
for shipyard in me.shipyards:
if cycle_pos < 20 and shipyard.ship_count >= 50:
launch_attack(shipyard, board)
elif 20 <= cycle_pos < 90 and shipyard.ship_count >= 10 and turn % 7 == 0:
launch_mining_fleet(shipyard, turn)
elif me.kore >= board.configuration.spawn_cost * shipyard.max_spawn:
shipyard.next_action = ShipyardAction.spawn_ships(shipyard.max_spawn)
return me.next_actions
data-ai
Scaled Pinball Loss (SPL) metric for evaluating quantile forecasts, normalized by mean absolute successive differences of training data
data-ai
Walk backward through a time series and multiplicatively rescale segments when jumps exceed a fraction of the running mean to correct data collection anomalies
testing
Transform forecasting target to next/current ratio minus one so that optimizing MAE or squared error implicitly minimizes SMAPE
tools
Convert point forecasts to prediction intervals by scaling with logit-transformed quantile ratios passed through a Normal CDF