Rules v0.8: Fatica on crossing, no Kumite in round 1, board draft 2
- Fatica costs a stripe for every Fatica walked onto; a route whose Fatica drops a Brown player below 15 no longer enters the Dojo - No Kumite in the first round: opponents are treated like meditating pawns - Board draft 2: two Fatica tolls per quadrant, Allenamento moved to the ring - Casual bot, --summary-csv, per-seat breakdown and move-options metric - Out of contention measured at 3 belts - Plan: Phase 6 baselines, decisions D34-D43 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import csv
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
@@ -74,6 +75,22 @@ def test_sim_prints_a_summary_per_scenario_and_writes_games(
|
||||
assert len(rows) == 1 + 4
|
||||
|
||||
|
||||
def test_sim_writes_one_summary_row_per_scenario(tmp_path: Path) -> None:
|
||||
path = tmp_path / "summary.csv"
|
||||
argv = ["sim", "--games", "2", "--players", "3", "4", "--lineup", "casual", "--jobs", "1"]
|
||||
|
||||
assert main([*argv, "--summary-csv", str(path)]) == EXIT_OK
|
||||
|
||||
with path.open(encoding="utf-8", newline="") as file:
|
||||
rows = list(csv.DictReader(file))
|
||||
assert [row["scenario"] for row in rows] == [
|
||||
"exam:c p3 kiai+2 start0 casual",
|
||||
"exam:c p4 kiai+2 start0 casual",
|
||||
]
|
||||
assert {"rounds_mean", "square_gain_per_turn", "win_rate_casual"} <= rows[0].keys()
|
||||
assert (rows[0]["seat3_win_rate"], rows[1]["seat3_win_rate"] != "") == ("", True)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"bad", [["--lineup", "balanced,cheater"], ["--games", "0"], ["--exam", "b"]]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user