Skip to content

MultiPV support#418

Merged
TheRealGioviok merged 4 commits into
official-clockwork:mainfrom
Ciekce:multipv
Jul 21, 2026
Merged

MultiPV support#418
TheRealGioviok merged 4 commits into
official-clockwork:mainfrom
Ciekce:multipv

Conversation

@Ciekce

@Ciekce Ciekce commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Design essentially ported from Stormphrax. Behaviour matches SP's exactly (barring any bugs I've missed).

Marked as draft because no test has been run, and there are implementation decisions from SP that I am unsure are wanted in CW:

  • when the UCI option MultiPV is set to 1 (i.e. multipv disabled), the multipv N output in info strings is suppressed
  • In the (ideally impossible) scenario that a root move could not be found, std::terminate() is called
Test  | multipv
Elo   | -1.43 +- 1.12 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=16MB
LLR   | -2.97 (-2.94, 2.94) [-3.00, 0.00]
Games | N: 123120 W: 31899 L: 32404 D: 58817
Penta | [1485, 14854, 29314, 14495, 1412]

https://ob.cwchess.org/test/1528/

Almost all the machinery for a future working TB implementation is also present. The root move implementation allows for some other cleanup (notably moving node counts from the enormous table into root moves), but that is out of the scope of this PR. "Verbose MultiPV" as I call it (printing info lines after every single PV is searched, after a delay) is also omitted, as it requires some somewhat involved refactoring of how/when info lines are printed.

A side effect of this implementation is that partial depths are now accepted (safely) if search stops mid-iteration.

Ciekce added 4 commits July 19, 2026 12:41
Bench: 12898941
Bench: 12898941
@TheRealGioviok

Copy link
Copy Markdown
Contributor
* when the UCI option `MultiPV` is set to 1 (i.e. multipv disabled), the `multipv N` output in info strings is suppressed

* In the (ideally impossible) scenario that a root move could not be found, `std::terminate()` is called

lgtm, first one probably good to avoid problems with some guis

@Ciekce
Ciekce marked this pull request as ready for review July 21, 2026 19:29
@Aethdv

Aethdv commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

lgtm

@TheRealGioviok
TheRealGioviok merged commit 58213c2 into official-clockwork:main Jul 21, 2026
28 checks passed
@Ciekce
Ciekce deleted the multipv branch July 21, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants