How to build a computer analysis, using either a CECP or a UCI engine

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Roland Chastain
Posts: 685
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

How to build a computer analysis, using either a CECP or a UCI engine

Post by Roland Chastain »

Hello everybody.

I would like to create a GUI displaying a computer analysis for a game, like the one provided by lichess (for example).

Image

Which commands could I send to an engine, in order to get informations like relative advantage of each player?

Would be interested both by CECP and UCI solutions.

Regards.

Roland
Qui trop embrasse mal étreint.

Author of Eschecs, a simple UCI chess GUI written in Pascal.
User avatar
hgm
Posts: 28395
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: How to build a computer analysis, using either a CECP or a UCI engine

Post by hgm »

In UCI you would send a comment 'go infinite' after setting up the position to analyse with the usual 'position ... moves ...' command. Terminate with 'stop' before sending any other commands.

In CECP the command is 'analyze', and you terminate that with 'exit' (which brings you back into force mode). In CECP it is allowed to send 'setup' commands, moves and 'undo' during the analysis, after which the engine starts searching the new position.

In both cases the 'thinking output' is as usual. Meaning that in CECP you might need to send a 'post' command to make sure it will be given.