Hot answers tagged

17

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 library (licensed under GPL3, note that I'm using the version 0.14.0). In short, the script will first load up the engine, we will stick to free and open ...


12

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 Costalba and Joona Kiiski position fen 4k3/4p3/8/8/8/8/8/3KP3 go depth 14 Segmentation fault: 11 But you could use a Python library such as Chessnut to validate ...


12

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 copy-and-paste my commands to experience yourself. Load the position by "position fen ..." and then use "d" to print the position. Please note that "d" is a ...


11

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 and please provide a working compiled binary. Announce your engine, upload a compiled binary to somewhere like Dropbox. You'll hear feedback. EDIT cutechess ...


7

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 universe UCI support.


7

Because Black is to move, and for Black the position is evaluated as being 42.76 pawns behind.


7

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 different time formats!! I must warn you that most of the BOTs on lichess some version of StockFish or other strong engine but you can find ample other BOTs. ...


6

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 using Stockfish (which is also free) and/or similar engines (mostly not free) A lot of good free PGN reader apps that are able to call Stockfish can be ...


6

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. Hundreds of games at least. Feed the resulting PGN output file into Ordo and it'll give you an ELO (for the time control you used). Try different time controls etc ...


6

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 the engine can actually ponder whatever move(s) it wants, but UCI tried to make it simple for basic implementations. From the protocol ponder start searching in ...


6

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 tree, and applying the minimax algorithm and alpha-beta pruning. A cp-score of 6000 does indeed mean the engine thinks White is 60 pawns (centi means 1/100) = ...


5

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 describe the complete position and append your moves all in one command string then press ENTER on the keyboard. The engine does not remember the current position ...


5

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 your math exam and hope it'll give out answers magically. Please rethink why you would want to do this.


5

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.flip(); else if (token == "bench") bench(pos, is, states); else if (token == "d") sync_cout << pos << sync_endl; else if (...


5

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 doesn't have any best move in it. Stockfish needs time to give you a move. Your program will need to filter out those principal variation lines. Please don't ...


4

At the end of the line Remove Kibitzer, there is "UCI" written in red. Click on that.


4

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/expect spawn ~/stockfish_8_x64_modern expect -timeout 1000 Linscott send "setoption name Ponder value false \r isready \r" expect -timeout 1000 readyok send ...


4

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 board representation such that you can update the engine. For example, you would need to do: position startpos moves e4c5 position startpos


4

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 Click the new button Point it at the executable Select Ok If you want it to play itself from a certain position you can set up an engine tournament using an epd ...


4

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 bishop on f8. Stockfish can't play the move, so it just skip it. To Stockfish, the diagram position is the position it's thinking. The best move is ...cxd4.


4

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


4

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://github.com/official-stockfish/Stockfish/blob/46ce245763705c89dba60dcfda549dc1f64eb48b/src/timeman.cpp#L131-L132: if (Options["Ponder"]) optimumTime += ...


4

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 still be valuable for move ordering and evaluation, because the same positions might be encountered somewhere in the search tree again. If you switch to a new ...


4

From reading various chess source codes, mostly before 2005, I can state that most don't a FEN output. Any that would allow for a non-starting position should accept FEN, as it's just a special form of PGN. Crafty and san_kit both have a "fen" command.


3

Follow my instructions in the screenshot.


3

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


3

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 & !abuser set notakeback 1 set tolerance 0 set autoflag 1 set style 12


3

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 to Winboard or icsDrone.


3

Fist things first, I put the position into another chess program (Chessmaster, because I find it has the most reliable mate-search function) and told it to brute-force search for a mate. This is what it found: So to answer one part of your question, no, there isn't a mate in 7 here. That leaves the question of why you are getting the lines: engine: info ...


3

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 pv b5c4 d3c4 d5b4 a1e1 h8e8 g3d6 d7b6 c4b4 e7d6 b4d6 e8e1 f3e1 c8b7 d6e 7 b6d7 e1d3 a8c8 e7g7 c8c7 g7h6 c6b5 d3e1 c7c8 h6e6 c8c1 e6d5 b7b6 d5d6 uci protocol ...


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