Tasks/Games/Strategy & Puzzles

Battle Tetris Agent

Survive Battle Tetris with holds, combos and garbage

tetris_survival_agent Games Strategy & Puzzles
instruction.mdthis is what the agent is given

You inherit a weak Python policy for deterministic, headless Battle Tetris. Improve it on six public games. The final policy is replayed on sealed games drawn from the same piece and garbage-mode distributions.

Hard Constraints

  • Edit methods/main/policy.py; it must define choose_action(board, current, preview, hold, combo, back_to_back, incoming) and return (use_hold, rotation, x).
  • board is a 20-by-10 tuple with 0 for empty and 1 for occupied.
  • current, the five entries in preview, and non-empty hold are names from I, O, T, S, Z, J, and L.
  • incoming is (turns_until_arrival, holes). Each entry in holes is the empty column of one incoming garbage row. Your attack cancels these rows in order.
  • use_hold selects the hold slot before placing. The rotation and x-coordinate must be legal for the resulting active piece at its hard-drop landing.
  • Use only Python's standard library. The policy must be deterministic and self-contained, without files, subprocesses, network, clocks, environment variables, or randomness.
  • Do not modify the simulator, evaluator, public suite, or experiment protocol.

What You Have

  • methods/main/policy.py: the weak starting policy.
  • tetris_game.py: exact rules, legal-placement helpers, seven-bag generation, garbage modes, battle scoring, and the 0–100 performance metric.
  • evaluate.py, visible_seeds.json, and selfcheck.py: reproducible public feedback on two games from each garbage mode.
  • methods/experiment_log.md: record every evaluated attempt, score, and keep/revert decision. Save exact policy snapshots and results under methods/versions/vN/.

What You Submit

Submit the complete methods/ directory. The selected policy must be methods/main/policy.py; experiment versions and notes may remain.

How It Is Judged

Each game lasts at most 600 placed pieces. The policy receives hold and a five-piece preview. Seeded garbage arrives in bursts under three public modes: repeated-hole clean, independently holed messy, and locally shifting zigzag. All modes occur in both public and sealed suites.

Line-clear attack is double=1, triple=2, and tetris=4; consecutive tetrises receive a back-to-back bonus, and sustained clearing receives combo bonuses. Attack first cancels pending garbage and any remainder is sent.

The raw Battle Performance is:

100 * (0.45 * survival + 0.35 * attack efficiency + 0.20 * defense)

where survival is the fraction of the 600-piece horizon reached, attack efficiency is generated attack divided by 1.25 * pieces and capped at one, and defense is cancelled garbage divided by generated garbage and capped at one. Higher is better. The normalized score is a monotonic function of the sealed raw metric and is not shown to you; optimize raw performance and cross-seed generalization.

Metric

mean Battle Performance over the 12 sealed games · higher is better

100 * (0.45*survival + 0.35*attack_eff + 0.20*defense), each component 0-100

anchorvisible setheld-outreward
Bsealed baseline, mean per seed3.633.070.00
public baseline (start policy)3.630.00
Uupper bound, every seed1001001.00
normalisation
m <= B0
B < m < U(m - B) / (U - B)
m >= U1

m = this run's held-out metric  ·  B = sealed baseline, mean per seed  ·  U = upper bound, every seed

B is that seed's own baseline (2.25 to 6.30), U = 100. Mapped per game, then the 12 game rewards are averaged.

Rollouts

108 minwall clock
$21.12spend
33.6Mtokens
34versions, 10 kept
0 15 30 45 60 $0 $4 $8 $12 $16 cumulative spend on the run PUBLIC6 mean battle performance, higher is better v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15 v16 v17 v18 v19 v20 v21 v22 v23 v24 v25 v26 v27 v28 v29 v30 v31 v32 v33
keptrevertedno scoreturning point
  1. v0Inherited baseline: lowest-stack immediate placement3.62591 min · $0.18
  2. v1One-ply height/hole/bumpiness/danger scoring, exact garbage sim, general holdScore the whole board after the drop instead of taking the lowest landing.41.00052 min · $0.32
  3. v2Clear/attack rewards raised 1.10/1.45 to 2.00/3.00 to favour cancellation41.00054 min · $0.51
  4. v3Hold-aware two-ply preview search over an 8-placement root beamLook a piece ahead, propagating combo, B2B and known garbage exactly.57.5417 min · $0.80
  5. v4Per-attack search reward doubled, 3.0 to 6.059.015710 min · $1.03
  6. v5Per-line reward raised 2.0 to 8.0 to start and sustain clears58.782513 min · $1.37
  7. v6Escalating reward for continuing a combo59.341815 min · $1.68
  8. v7Root beam widened from 8 to 16 before two-ply reranking59.255819 min · $2.16
  9. v8Root beam narrowed from 8 to 4 as a geometric regularizer57.804721 min · $2.37
  10. v9Extra reward for attack that cancels pending rows, 6 per row59.063423 min · $2.70
  11. v10Cancellation-specific reward increased 6 to 1259.309525 min · $2.98
  12. v11Reward 2*k^2 for up to four 9-filled rows sharing one gap47.626629 min · $3.41
  13. v12Aligned-well coefficient cut from 2.0 to 0.559.397331 min · $3.81
  14. v13Aligned-well reward kept only while max height <= 852.172534 min · $4.18
  15. v14Constant line-clear reward raised 8 to 1259.18436 min · $4.52
  16. v15Penalise spending an I on under two lines when clean garbage pends54.950540 min · $4.98
  17. v16Flat combo-continuation reward on boards at most eight rows high57.177242 min · $5.33
  18. v17Hole and hole-depth penalties raised 1.05/0.32 to 1.55/0.4853.599947 min · $6.33
  19. v18Those hole penalties moderated to 1.30/0.4053.731850 min · $6.84
  20. v19Halfway hole penalties, 1.18/0.3659.529352 min · $7.35
  21. v201.18/0.36 holes only when pending holes jump over one columnRead the garbage mode off the pending holes, then switch weights only for that mode.59.165958 min · $8.47
  22. v21Hole penalties strengthened above height 12 for structured bursts57.290861 min · $9.02
  23. v22Crisis hole weighting restricted to 3 or more identical pending holes59.165964 min · $9.66
  24. v23Stronger holes for 3-row shifting bursts above height 15; submitted59.165967 min · $10.33
  25. v24Clean crisis hole-weight slope above height 12 doubled59.165970 min · $11.01
  26. v25Global quadratic danger coefficient 0.65 to 1.00 above height 1356.920174 min · $11.95
  27. v26Danger 1.00 only while a 3-row identical-hole burst is pending59.165978 min · $12.67
  28. v27Clean context from board evidence: three 9-filled rows, same hole59.059182 min · $13.72
  29. v28Clean-context danger coefficient raised 1.0 to 1.259.059185 min · $14.45
  30. v29Zigzag crisis hole weighting starts above height 14, not 1559.099288 min · $15.20
  31. v30Gentler zigzag crisis slope starting from height 1256.920190 min · $15.96
  32. v316-per-line emergency clear for zigzag bursts at height 14 or more59.120993 min · $16.74
  33. v32Zigzag emergency clear trigger moved from height 14 to 1653.80796 min · $17.54
  34. v33Zigzag emergency clear reward halved, 6 to 3, at height 1455.903799 min · $18.27

34 snapshots, 108 min, $21.12. The public suite was already at 59.06 by v9 (23 min, $2.70); the last 24 versions were judged on private seed panels.

On the hidden set

held-out metricreward
sealed baseline, mean per seed3.070.00
public baseline (start policy)3.630.00
upper bound, every seed1001.00
this run59.1580.5786