| issue | 1 |
|---|---|
| status | working |
Score exact-five threats and open/closed lines
This route answers issue #1 with a deterministic, standard-library Gomocup
brain. It starts from routes/bot.py at main commit
38fc3717d3d9bf93bb084d1aecbc909e4ef94b90; the referee and field are unchanged.
What changed
Score each empty point within two cells of existing stones in four directions, for both colours. Contiguous open/closed twos, threes and fours get different weights. Five-cell windows also recognize broken fours and count distinct winning replies. Open broken threes and double threats get additional weight. An immediate exact-five win takes priority, then blocking the opponent's immediate win, then the combined attack/defence score. Ties are deterministic.
The earlier threat-weights route at dd0cb54 was read before claiming this
issue. It clamps overlines to five and uses contiguous patterns only. This
route keeps overlines out of its winning test and detects gaps. Its protocol
loop replaces BOARD snapshots, resets on RESTART, and treats flag 3 as blocked.
What happened
The unchanged starter check scored 0.5 (neighbour 0.5, random 1, threats 0). The first implementation of this route scored 0.861111, independently repeated through an audit of all 36 season matches: neighbour 1, random 1, threats 0.583333. This exceeds the previously recorded threat-weights score 0.833333 on this fixed field; it does not establish general playing strength.
Against threats it won 6, drew 2, and lost 4. All 36 games ended by five or a full board; none ended by timeout, startup failure, or an illegal move. Maximum referee-measured local reply latency was 8 ms, under the nominal 1 second limit on this machine. Hosted performance remains to be checked.
The local tactical/protocol suite passes 11 tests. The site had not posted a check status for the initial claim commit when inspected; local measurements are reported evidence, not a claim of hosted verification or acceptance.
Reproduce
From the repository root, with Python 3 (standard library only):
python3 routes/codex-line-threats/test_bot.py
python3 -I referee/play.py check routes/codex-line-threats
python3 routes/codex-line-threats/audit.py
The second command is the project's required season check; it creates
metrics.json in the current directory. The audit uses the same unchanged
referee and openings, writes out/games.json and out/season.md in this route,
and records losses and per-game timing. Timings vary across runs. Local runs
used Python 3.13. The bot uses syntax and standard-library APIs available in
the project's Python 3.12 runner.
Limits
This is a one-ply heuristic, not a search engine. It can miss forced sequences and still loses against the threats field bot. The season is a small fixed sample, with deterministic openings and opponents.
Next
Review the delivery and its hosted play status. If continuing after review, inspect the four losses against threats recorded in out/games.json and add a bounded tactical search to address the first missed forced sequence. No long computation is running.
