I'm working on a chess UI and am trying to implement a game analysis feature by calling UCI engines. For showing analysis of a specific position two things are needed:
- get the cp value for the move actually played in a particular position
- get the next best
n
moves with their cp score
I was wondering if it can me done in one command. To my understanding this would take two calls to the engine (after setting the position -- let's say this is startpos
now, and white started the analyzed game with a2a4) :
go depth 20 searchmoves a2a4
- to get the value for the actual movego depth 20
- to get the actual best move(s) with cp value
I was hoping that if I setoption name MultiPv value 4
and after that call go
with providing a single searchmoves X
it would return the cp value for X
and the next 3 moves. That doesn't happen though (with Stockfish at least) but searchvalue
restricts the search to the move list provided, even if it is only 1 move -- so I only get the value for that move.
Is it possible to get both 1/
and 2/
in one UCI call per design?