diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2026-08-23 16:06:42 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2026-08-23 16:06:42 +0530 |
| commit | 99de764d1d1b936594643e34ae4d2c4a239f69db (patch) | |
| tree | f45884164774e760e9ae37d3c37ccfe80dbbc836 /PLAN.md | |
| parent | 54afeb6dd89fffae92274cb6fe2e9a86fd57c6e3 (diff) | |
phase C, D & E
Diffstat (limited to 'PLAN.md')
| -rw-r--r-- | PLAN.md | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -322,26 +322,26 @@ build (`just test`) green before the next. Rewrote the piece loop to iterate occupied bitboards (castling/turn/en-passant tail unchanged). No existing test asserts on zobrist_hash output, so nothing regressed. -- [ ] **C1.** Rewrite `root_thread` in `src/engine/thread.c` to run iterative +- [x] **C1.** Rewrite `root_thread` in `src/engine/thread.c` to run iterative deepening using `search()`, populating the `engine_message` each depth and respecting `args->stop` + `should_continue`. -- [ ] **C2.** Verify a manual `./build uci run` loop prints `info depth ...` +- [x] **C2.** Verify a manual `./build uci run` loop prints `info depth ...` lines and a `bestmove` before `quit`. ### Phase D — Parallel primitives -- [ ] **D1.** Add `split_point_alloc`/`split_point_free` + pool wiring in +- [x] **D1.** Add `split_point_alloc`/`split_point_free` + pool wiring in `threads.c` (back `handler->split_point_pool`). -- [ ] **D2.** Implement `split_point_claim_move` (atomic `next_move_idx`), +- [x] **D2.** Implement `split_point_claim_move` (atomic `next_move_idx`), `split_point_merge` (atomic `workers--`, last-owns), `split_point_share` (atomic `best_score`/`alpha`/`beta` store). Add tests. -- [ ] **D3.** Implement `HELP` publish/scan over the pool; `threads_go_loop` +- [x] **D3.** Implement `HELP` publish/scan over the pool; `threads_go_loop` returns true when all children `finished`. Build green. ### Phase E — Child worker loop -- [ ] **E1.** Rewrite `child_thread` as a DTS worker: scan pool for an +- [x] **E1.** Rewrite `child_thread` as a DTS worker: scan pool for an `ACTIVE` split point; claim via `split_point_claim_move`; run `search()`; `split_point_share`; on exhaustion `split_point_merge`; bail on `*stop`. -- [ ] **E2.** `just test` green (threaded search shouldn't break perft/ttable +- [x] **E2.** `just test` green (threaded search shouldn't break perft/ttable unit tests since they don't use threads). ### Phase F — Root move-list splitting |
