Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ordering of multiPV lines. #1718

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hans-ekbrand
Copy link
Contributor

When multiPV is above 1, several lines are send by SendUciInfo(), and they are order by how good Leela thinks they are, so that the first line has the move that will be played. When chess GUI:s like cutechess display these UCI-info lines, they treat them atomistically, and every subsequent line pushes the previous line down the display, which make the most important line drop to the bottom of the list. To work around this problem, this patch reverses the order of the uci_infos vector before it is handled over to OutputThinkingInfo(), if multiPV is above 1. See the two screen-shots that illustrate the effect.

This is without the patch
bar

This is how it looks with the patch applied
foo

@mooskagh
Copy link
Member

Could you check what other chess engines (e.g. stockfish) do with multipv on?

If they output it in reverse order (that's likely), then it's our bug, and it's not really cutechess specific.
Otherwise, I think it would make sense to fix it on the cutechess side instead.

@Naphthalin
Copy link
Contributor

Naphthalin commented Nov 3, 2022

I think this is yet another issue which ideally will be solved/modified easily with #1734, as move ordering/PV calculation is one of the parts. Also, do all GUIs behave the same way, and is there any specification in UCI in which order the lines are supposed to be displayed?

@borg323 borg323 self-assigned this Nov 17, 2022
@borg323
Copy link
Member

borg323 commented Nov 18, 2022

This is a cutechess issue: cutechess/cutechess#76 Moreover, I checked with SF and it seems to use the same order we do.

@tissatussa
Copy link

I remember you should set MPV to 1 in CuteChess. It's not useful to set it higher. CuteChess just shows the best move at each depth. If you want to see MPV lines, use a tool like SCID. In general an engine performs best when setting MPV 1, although i like to see multi-PV lines also, but not in CuteChess.

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.

5 participants