Questions tagged [engines]
Questions relating to chess engines: any computer program that is able to play/analyze chess positions.
972
questions
4
votes
0
answers
163
views
Setting up Stockfish for Droidfish
I would like to set up Stockfish for the android app Droidfish. How do I set up a server for a Windows machine (my linux machine is too weak) using SF13?
3
votes
0
answers
213
views
How engines accomplish calculation speeds of 1000kN/s per Core and above?
I am developing a chess engine to improve my Cpp. It works, which means it generates legal moves and it can play them out. I optimized a bit and now achieve ~20k N / s, which is way better than my ...
2
votes
1
answer
533
views
How do I get Stockfish to write its analysis to a file using a batch file on Windows?
I can get this to work in a Windows Command Prompt window as follows:
stockfish_14_x64_modern.exe
uci
ucinewgame
position fen rnb1kbnr/ppp1pppp/8/3q4/8/8/PPPP1PPP/RNBQKBNR w KQkq - 0 1
go depth 17 ...
1
vote
2
answers
165
views
Example of "lowerbound" and "upperbound" in the UCI protocol
I am having trouble understanding how "upperbound` and "lowerbound" come into play in the UCI protocol.
The spec says:
lowerbound: the score is just a lower bound.
upperbound: the ...
5
votes
1
answer
325
views
Why does Stockfish evaluate this position as equal?
After solving the puzzle while I was analyzing this endgame, I was just surprised to see stockfish evaluates this position as equal.
After Ke4, Ke6 (Opposition); Kf4, and f5 -- I can't find out any ...
3
votes
0
answers
166
views
Debugging my PERFT coding
I'm stuck debugging my move generation and do move function. I noticed that the castling as actually the problem in my code, but I think I have implemented everything right. I installed some java ...
3
votes
1
answer
264
views
Was there a bug in Stockfish similar to the bug in Houdini 6.02?
This is a follow-up question to Is Houdini 6 a Stockfish clone?
Houdini 6.03 included a bugfix: "Correction for incorrect detection of stalemate in positions with white pawn capture moves."
...
5
votes
2
answers
380
views
Examples where top engines in a tournament match don't agree in evaluation
I'd like to know about computer games of some recent tournaments where two top engines diverge in evaluation of a position, in the sense that both think are winning the game (or both losing). I saw ...
1
vote
1
answer
196
views
Why not immediately force a draw when losing is possible but winning isn't?
In my last question, I asked why engines sometimes force a draw when they can still win. Now, I'm asking about the opposite situation:
[FEN "5K2/5n2/8/3n2k1/8/8/8/8 w - - 0 1"]
1. Ke8? (1. ...
8
votes
2
answers
2k
views
Is it normal for a chess engine to blunder material if its evaluation is only based on naive material evaluation?
For the past couple of weeks, I've been making a chess engine, and right now I'm working on creating its search and evaluation phases.
To start off with, I made the evaluation phase a simple count of ...
5
votes
1
answer
231
views
A classical Rook vs Bishop endgame (with pawns)
Karsten Müller and Lamprecht give the following ending as a win in Fundamental Chess Ending. However, Houdini 6.02 does not find a win as far as I analyzed.
[FEN "R7/5pkp/4b1p1/3p4/8/5P2/5KPP/8 b ...
7
votes
3
answers
5k
views
Why do chess engines cause immediate draws rather than giving the opponent the opportunity to blunder or run out of time?
Consider a chess position like this one:
[FEN "K7/4k1p1/8/8/3B4/8/8/8 w - - 0 1"]
1. Ka7 (1. Bxg7) 1... g5 2. Ka6 Kd6 3. Ka5 Kd5 4. Ba7 Kc4 5. Bb6 Kc3 6. Bc5 Kb2 7. Ka4 Ka1 8. Kb3 g4 9. Kc2 ...
1
vote
1
answer
184
views
How to avoid the same opening move in an engine built using Python chess
I created a chess engine using the Python chess library. It has an evaluation function (piece values, piece square values, and capture values) and minimax. Alpha-beta pruning is also implemented. At ...
-3
votes
1
answer
128
views
meaning of fractional depth in chessbase?
when I load fritz 17 in chessbase, it often shows depth as for e.g. 18/25. what does this mean?
19
votes
6
answers
6k
views
How difficult is it to win a winning endgame against an engine?
Consider an endgame like the one shown below (white to move):
[fen "5k2/5p2/r7/8/6R1/4b1PP/8/5R1K w - - 0 50"]
Stockfish gives white a solid +3 advantage here and that seems appropriate ...
8
votes
3
answers
2k
views
Why did Lichess annotate this as a blunder?
Lichess analysis annotated 4. Nf3?? as a blunder preferring (4. Nc3) (see on Lichess). I am trying to understand the ideas that make this a blunder. At depth 23 with Stockfish 13+ NNEU, both were ...
26
votes
2
answers
4k
views
Are there any moves that humans agree are best which engines cannot see?
Are there any moves from real, preferably reasonably well known games which humans agree are great moves, but which engines cannot see, or, at least, think are weak/average?
Here is an example that I ...
1
vote
0
answers
166
views
Did Black, my colleague, cheat in our Lichess game? [closed]
I recently played against a colleague of mine, who claimed to have a chess.com elo of about 1000. I am about 1700 on Lichess. We played 3 matches, where he won two. In these matches I got completely ...
4
votes
1
answer
892
views
Problems with computing the Zobrist hash for a chess position?
I'm attempting to use Zobrist hashing in my chess engine, but I'm running into some difficulties getting it to work correctly.
I'm using the random numbers from this site so I can test my results ...
8
votes
3
answers
886
views
Material vs positional advantage: does Stockfish give good advice?
This is from Yusupov's "Build up your chess" volume 1, chapter 11 (pins).
[Event "Munich"]
[Site "Build Up Your Chess"]
[Date "1994"]
[Round "Diagram 11.4&...
1
vote
2
answers
790
views
Where does Leela Zero stand (in terms of ELO / strength) when compared with other AI like Mu Zero / Alpha Zero?
I can break my puzzle down into the following:
How strong is Leela Zero today in terms of rating / strength, esp when compared with Alpha Zero / Mu Zero?
Does its rating get calculated as it ...
4
votes
1
answer
403
views
Chess Engine Using LazySMP
I was hoping to parallelize the chess engine I was currently working on. I have done some research on some of the various types of algorithms such as YBWC, ABDADA, and LazySMP which is currently used ...
3
votes
1
answer
422
views
How can a check evasion move generation algorithm be done efficiently?
In my chess engine, I'm attempting to create a strictly legal move generator, instead of generating pseduo-legal moves, then discarding them later in the search and evaluation phase.
So far, here is ...
6
votes
1
answer
1k
views
How is Stockfish so fast?
I'm currently developing a bitboard-based chess engine for fun and can generate around 5.5 million positions per second on perft tests. I ran the same tests on Stockfish, which can do around 130 ...
3
votes
3
answers
643
views
Does the Stockfish engine use past matches, or does it not need such a "database"?
I have a simple question. Does the Stockfish engine use, amongst the steps of its complicated algorithm, a library/database of past matches?
For such an algorithm to work, it would to need store many ...
7
votes
1
answer
390
views
How do computers end up blundering?
I’m trying some practice games against Stockfish level eight. I always lose but sometimes Stockfish makes obviously bad moves and I get ahead. Here for example, Stockfish makes an inaccuracy followed ...
0
votes
0
answers
112
views
How to validate chess moves with a server? Winboard and Unity 2020.3
I'm looking for advice on how to implement online chess move validation using a winboard chess engine. I am creating a mobile battle chess game in Unity 2020.3. Right now I have the possible moves for ...
19
votes
1
answer
3k
views
What if both players always play the worst engine move?
There are questions for the worst opening in chess and the worst opening in Chess960, but these only consider the very first move. I'm curious what a game would look like where white plays the worst ...
2
votes
1
answer
484
views
How can I make my chess engine more efficient?
First, here's some context. My chess engine uses bitboards and works like this: A single gameboard is created as a 2d array at the start of the program. Like this:
[[-4 -2 -3 -5 -6 -3 -2 -4]
[-1 -1 -...
-2
votes
1
answer
83
views
How to sept up a search engine?
One issue that has always been pulling my hair is how to configure different chess engines so that they compete with each other with maximum efficiency according to the speed of the processor that our ...
2
votes
2
answers
291
views
How can I load a position without kings into an engine?
I would like to be able to do load a position into a whatever possible (advanced) engine without kings. For example, the goal of the game would be to annihilate all the possible pieces instead of ...
5
votes
1
answer
488
views
Obtain information about a a position from Stockfish
I want to know from Stockfish:
All possible moves in a position, a.k.a. a depth 1 analysis with no score.
If the king is in check, is checkmated, or if there is a draw.
The current FEN string, after ...
6
votes
4
answers
681
views
Can a chess engine play like a particular famous player?
Different players have different personalities and different playing styles. Mikhail Tal's style is different from Tigran Petrosian, just as Kasparov is different from Karpov. I am wondering if there ...
4
votes
5
answers
515
views
Looking for a chess engine that instead of playing the best move randomly chooses among the best moves?
Of course this should be subjected to some rules; something like "play any move that's not bellow 0,70 the best move", or something similar.
My idea is to use such an engine in order to play ...
4
votes
2
answers
373
views
Why doesn't SimpleEval's eval change in multiples of 1?
SimpleEval is Stockfish with simple eval - it only counts the material in the position and ignores all other evaluation factors like king safety or mobility. It is currently playing at TCEC.
If ...
1
vote
1
answer
60
views
How to score a certain move in a PGN, for how well opening theory is followed
I am making a bot that plays opening moves from a PGN. When the player reaches a position out of PGN, I want to give a score to the player how well he followed the PGN. What kind of statistics can I ...
2
votes
1
answer
470
views
Fastest way to parse a bitboard
I am making a chess engine, and for now I’m working on the move generation. I’m using bitboards, and so for example my magic bit boards file for a knight on d4 is
00000000
00000000
00101000
01000100
...
1
vote
1
answer
792
views
How to install stockfish on winBoard 4.4.5?
I want to install stockfish to winBoard 4.4.5. But winBoard 4.4.5 doesn't seem to have the same protocol as stockfish. Is there a way to do it on windows 10? I would like to install the latest version ...
30
votes
9
answers
9k
views
How has chess managed to remain a competitive sport despite engine dominance?
As much as people fear losing their jobs to machines that can do them better, Chess has seen the exact opposite take shape. There have been extremely strong chess bots since Kasparov's time, and more ...
-4
votes
4
answers
294
views
Why won't elite players like Nakamura play a (fair) game against AlphaZero just to see how it goes? [closed]
You know, both for entertainment and to analyze what moves he made were blunders/sub-optimal?
Like, the handicap thing is not a real game, and also humiliating for the grandmaster.
Like how would a ...
5
votes
1
answer
1k
views
Using Stockfish in Commercial Apps
Stockfish uses a GPLv3 license, which requires you to release your source code if you use it. This then makes your own code GPLv3. However, chess.com, chessable and decodechess all use Stockfish.
So, ...
21
votes
3
answers
11k
views
Undetectable semi-cheating?
I bet I would play already 200 ELO better if I'd only check if my move isn't a complete tactical blunder. This obviously begs the question if engine cheating can be as easily detected if
I'd only use ...
10
votes
5
answers
10k
views
Why does the engine tell me to sacrifice a queen for bishop after a failed Scholar's mate?
I am a beginner. Recently I have looked at the computer-generated analysis of one of my games and I found a surprising recommendation. Why is it best to sacrifice my Queen in this situation, as the ...
3
votes
1
answer
358
views
What does an engine do if it has found the shortest mate?
For example, take this famous position from Kramnik vs. Deep Fritz, 2005:
[FEN "5N1k/6p1/7p/4P3/pp2Q3/4q3/1P4PP/2b4K w - - 0 1"]
Obviously White wins with Qh7#, and equally obviously, there ...
4
votes
1
answer
240
views
Transposition Tables Bug, implementation produces different results
I've been writing my chess engine for 2 months now, and I've come across this bug that I can't manage to solve. Basically, when I disable my transposition table, the engine plays fine and the minimax ...
2
votes
2
answers
160
views
Why is ...d5 the best move for Black?
I am learning chess and came across this position. Stockfish 11+ HCE (Depth 32/99) and Stockfish 13 (Depth 31/47) both says ...d5 is the best move for Black. But the next move is exd6 e.p., leaving ...
3
votes
1
answer
225
views
Hashtable decreases playstrength
I have implemented a simple variant of Zobrist keys to store and look up positional data, but whenever I let my engine play itself with either white or black using hashtables and the opponent doesn't, ...
1
vote
2
answers
232
views
Stockfish shows only 2 next moves
For Position 1r2k1r1/pq1b1p2/1p1Rp1p1/2p1P3/2B2P2/P1N1K1P1/1P2Q3/8 b - -
stockfish analysis ouput is like
info depth 12 seldepth 17 multipv 1 score cp 258 nodes 80180 nps 76874 hashfull 14 tbhits 0 ...
13
votes
2
answers
1k
views
Is there an engine evaluation technique that factors in 'time'?
An interesting game played out between Wesley So and Levon Aronion1:
[title "Wesley So vs Levon Aronian"]
[fen "rn4k1/p2bP1b1/2q5/1pp2p1Q/2p5/8/PP3PPP/3R1RK1 w - - 0 1"]
So was in ...
5
votes
1
answer
212
views
Computer being right and human being wrong
Of course, computers have changed the evaluation of more than one endgame position (BB vs N being the most known, I guess), which humans thought to be drawn.
Having read another question here, I'm ...