Hot answers tagged

17 votes
Accepted

Returning scores for all possible moves from a chess engine

Of course there's a way: I'm going to show you one way of doing it on your own, using only free software. We'll write a small script in Python (I'm using v2.7) and only use the wonderful python-chess ...
user avatar
  • 11.8k
12 votes

How do I check if a move is legal using Stockfish?

Stockfish assumes that all FEN positions you feed it are legal positions. If you feed it an illegal position and ask it to evaluate it, it will likely crash: Stockfish 5 64 by Tord Romstad, Marco ...
user avatar
  • 1,847
12 votes
Accepted

Working with UCI protocol (coding)

Let's use Stockfish to find out the moves for this position [fen "N7/P3pk1p/3p2p1/r4p2/8/4b2B/4P1KP/1R6 w - - 0 34"] The FEN string is: "N7/P3pk1p/3p2p1/r4p2/8/4b2B/4P1KP/1R6 w - - 0 34". You should ...
user avatar
  • 21.4k
11 votes
Accepted

How can I know the Elo rating of my chess engine?

Easy question. Announce your engine on the chess programming forum (http://talkchess.com/forum/index.php). There'll be engine testers adding your engine to their rating list, such as CCRL. But please ...
user avatar
  • 21.4k
7 votes
Accepted

how does a uci engine draw or resign?

UCI chess engines don't offer/accept a draw, nor resign a position. This is the GUI's responsibility. You are welcome to add new uci options (setoption and option) for your engine, but don't expect ...
user avatar
  • 21.4k
7 votes
Accepted

Why does Stockfish give a negative score in a theoretical win for white?

Because Black is to move, and for Black the position is evaluated as being 42.76 pawns behind.
user avatar
  • 23.8k
7 votes
Accepted

Reasonable engines to test against (Not StockFish)

Since your engine supports UCI, I would suggest checking out lichess.org. You can make a BOT account there and test against several other BOTs and people as well! Also, you can get your BOT rated in ...
user avatar
6 votes

Reading PGN files using thr Stockfish engine

Stockfish is an engine that's called by apps that read PGN files, it doesn't read the PGN data itself. There are many very good free apps that can read PGN files and analyse the games they contain ...
user avatar
6 votes

How to measure strength of my own chess engine?

Implement UCI or Winboard protocol (just enough to play games). Download some engines (e.g. via CCRL) stronger than your estimate and run a Gauntlet tournament in Arena/Winboard/Cutechess etc. ...
user avatar
6 votes
Accepted

I'm confused by UCI Pondering and Time Control

First the GUI sends the position string with the ponder move as the last move in this string. Then the GUI sends "go ponder". This makes little sense to me, but UCI is very much a kludge. Note that ...
user avatar
6 votes
Accepted

What exactly means centipawns field in stockfish/uci output?

It's the score of the current position, but it is computed by static evaluation (i.e. counting pieces, pawns, pawn structure, king safety, mobility, etc.) of positions arising in the program's search ...
user avatar
  • 23.8k
5 votes

Reading PGN files using thr Stockfish engine

The answer is NO. The stockfish engine does not have a concept of a chessboard state. Each position should be completely described through FEN notation. If you want to make a move, you then again ...
user avatar
5 votes

Reading PGN files using thr Stockfish engine

No. Stockfish is an engine not GUI, it doesn't know or understand PGN. The bigger problem is why would you do that? Why would you want to use an engine on a PGN game? This is like giving a calculator ...
user avatar
  • 21.4k
5 votes
Accepted

Is there a list of hidden/deleted Stockfish commands?

Look at the source code: https://github.com/official-stockfish/Stockfish/blob/master/src/uci.cpp // Additional custom non-UCI commands, mainly for debugging else if (token == "flip") pos....
user avatar
  • 21.4k
4 votes
Accepted

Chessbase 13 How to install UCI Engine when menu item is missing?

At the end of the line Remove Kibitzer, there is "UCI" written in red. Click on that.
user avatar
  • 1,247
4 votes

How to get position evaluation with UCI?

lines info depth with score have something begining with pv, whereis the move. cp is centipawn, so evaluation is -4.82 info depth 16 seldepth 3 score cp -529 nodes 3409 nps 10299 time 331 multipv 1 ...
user avatar
4 votes

Piping Stockfish input

Solution: Use 'expect' script as shown below. Tested with stockfish_8_x64_modern. BlindKungFuMaster: "I think the main problem is that the uci protocol is a dialog." I agree! #!/usr/bin/...
user avatar
4 votes
Accepted

Reading UCI Engine output in Arena Chess

http://www.chessforums.org/general-chess-discussion/9079-chess-engine-output.html It’s the “search depth.” It tells you how deep the search has gone. The value is in “ply” or half-moves. The ...
user avatar
  • 21.4k
4 votes

UCI undo move command?

Unfortunately the UCI protocol is stateless, there is no way to ask the engine to undo a move. The protocol is designed for communication between GUI and engine, you are supposed to have your own ...
user avatar
  • 21.4k
4 votes
Accepted

How to setup a chess engine to play itself?

Yes, Arena can do what you want. Download Arena 3.5 http://www.playwitharena.com/?Download Adding Komodo (or any other engine) to Arena: On the menu select Engines -> Manage Open the Details tab ...
user avatar
4 votes
Accepted

Stockfish: Engine suddenly changed the side?

The reason is very simple: position startpos moves e2e4 d7d6 d2d4 e7e6 g1f3 c8d7 f1d3 h7h6 e1g1 c7c5 f1e1 e8f8 This is invalid. The position before e8f8 is: e8f8 is invalid because Black has a ...
user avatar
  • 21.4k
4 votes

Is there a list of hidden/deleted Stockfish commands?

I have created this gist which is the best documentation I could find - most links I found where dead https://gist.github.com/aliostad/f4470274f39d29b788c1b09519e67372
user avatar
  • 141
4 votes
Accepted

How to use the Ponder option in stockfish / UCI

The only purpose of the "Ponder" UCI option in Stockfish is to inform the engine about that you will use pondering so that it can consider this fact in its time management, as can be seen in https://...
user avatar
4 votes
Accepted

When to use Clear Hash

If your goal is to get the highest quality of analysis, then the short answer is "never". The reason is that if you analyze similar positions within a game, then the existing hash table entries can ...
user avatar
4 votes
Accepted

Unable To Communicate with UCI through Java Program

info depth 1 seldepth 1 multipv 1 score cp 539 nodes 83 nps 41500 tbhits 0 time 2 pv e5f6 info depth 2 seldepth 2 multipv 1 score cp 790 nodes 182 nps 91000 tbhits 0 time 2 pv e4d5 b7b6 e5f6 obviously ...
user avatar
  • 21.4k
3 votes

Syzygy tablebases in xboard

xboard is not a UCI user interface, so you'll need to install the Polyglot adapter to make it work. Once you have the Polyglot installed, you'll need to edit the polyglot.ini file. Read here for ...
user avatar
  • 21.4k
3 votes

How can I know the Elo rating of my chess engine?

Lichess.org has a bot API and allows bot accounts to play rated games against human players. See this article.
user avatar
3 votes

Reading PGN files using thr Stockfish engine

You can use 2 programs to do that. Use pgn-extract to format the pgn files in a good format. This pgn-extract is available at this url: download pgn-extract You need this CLI tool: UCI analyzer ...
user avatar
3 votes

How to connect a UCI chess engine play on FICS?

I use ChessPartner 6.0.4.3 r.click in the Internet Console and choose Properties Autoseek Cmd: getgame\n Login script: set chanoff 1 set silence 1 set tell 0 set formula !computer & !...
user avatar
  • 31
3 votes
Accepted

How to connect a UCI chess engine play on FICS?

You can use icsDrone or Zippy with Winboard to connect an engine using the Winboard protocol to FICS. You can use PolyGlot as an adapter between Winboard and UCI protocols to connect your UCI engine ...
user avatar
  • 3,425

Only top scored, non community-wiki answers of a minimum length are eligible