Questions tagged [engines]
Questions relating to chess engines: any computer program that is able to play/analyze chess positions.
898
questions
6
votes
2
answers
552
views
Why don't engines show explicitly that a certain move takes to a threefold repetition (instead of just showing 0.00)?
I get that from the point of view of the engine there's no difference; equal is equal. But for a human analyzing with an engine, I find quite important to note that a move takes to a balanced position ...
4
votes
2
answers
478
views
Engine's 2nd best move
Especially for checking studies (maybe also for teaching), it would be helpful to have an engine finding the second best move and assess it (or even give refutations of all alternatives). For a ...
2
votes
1
answer
212
views
Bitboard chess engine design
What are the best approaches to designing a chess engine? What classes/structures should it have? How are they connected to each other? I'm building a chess engine but I often find myself overwhelmed. ...
7
votes
3
answers
436
views
What do chess engine evaluation scores (+1.3, -3.2) really mean?
I know that chess engine evaluations like +1.3 intuitively mean that White is evaluated to have an advantage equivalent to 1.3 pawns of material, or that -3.2 means that Black is evaluated to have an ...
19
votes
5
answers
5k
views
Making my own chess engine for a college project
I'm starting my college project to build my own chess engine. The problem is that I have no clue where to start or what to read. I found videos on YouTube but I don't want to be a copycat. I want to ...
4
votes
1
answer
223
views
Move generation for sliding pieces and Hyperbola Quintessence
I'm working on a bitboard-based chess engine at the moment and I have managed to generate pseudo-legal moves for knights, kings and pawns. However, I'm still trying to wrap my head around sliding ...
0
votes
1
answer
78
views
Search function for chess engines
I'm creating a bitboard based chess engine in c++ and I'm trying to write the search function. It currently looks something like this
double search(Position& pos, int depth, double alpha, double ...
1
vote
1
answer
111
views
Evaluation function in a bitboard based chess engine
How do you go about writing an evaluation function for a bitboard bases chess engine? I want to start of simple and only evaluate based on piece value, and where the pieces stand. For example a knight ...
2
votes
1
answer
228
views
What is the longest known 7-piece checkmate?
What is the longest known 7-piece checkmate?
0
votes
1
answer
104
views
Is it possible to manually input a command to Arena Chess GUI?
I want to manually input a single UCI command into my modded version of Stockfish to access my added functionality(a chat feature) and the incredibly useful eval command and then get the output. I'm ...
2
votes
0
answers
114
views
Understanding Null move pruning
I have trouble understanding null move pruning. I understand the concept of a free move for the side that just played a move, but what I don't understand is the code part:
int score = -negamax(-beta,-...
1
vote
0
answers
103
views
Is this a possibly faster way to find pinned pieces using magic hash?
Okay so this is something that I came up with while working on my own engine, but I am not sure if anyone has ever tried. Basically I am using a separate set of magic hashed longs to store pieces and ...
1
vote
0
answers
228
views
Magic bitboards not speeding up my engine
I'm new to writing chess engines but just recently finished my first program. It ran slowly however so I switched over to bitboards, and now to magic bitboards. I used the chess programming wiki a lot....
5
votes
1
answer
1k
views
Is there a resource for chess puzzles that are altered just enough to discourage easy engine use to solve?
I'm hosting a chess night and would like to post a few wallchart puzzles but would like to discourage folks from secretly whipping out their phone's chess app/engine and scoring points unfairly.
For ...
1
vote
0
answers
145
views
Clear Stockfish hash table after every move conveniently
When analyzing a game with Stockfish I sometimes find it confusing that evaluation of a given position changes depending on what positions I had analyzed previously. I understand that this is because ...
1
vote
3
answers
376
views
How good is 1. e4 c5 move for black? Why does Stockfish play it?
I've been running some engine vs engine games out of boredom and noticed Stockfish, when playing as black, 90% of the time played c7-c5 on white's e4. I've never actually seen a human play this, in ...
8
votes
1
answer
175
views
Reanalyzing old chess books
Computers were demolishing analyses way before they became God (see e.g. here), but latest at ELO 3000 or so it became humiliating. Do you know instances of chess books explicitly rewritten years ...
1
vote
0
answers
141
views
Why is futility pruning causing an Elo drop in my engine?
I'm getting weird results when introducing futility pruning into Blunder. On the one hand, I'm getting a pretty sizeable reduction in nodes, and I'm searching a full ply deeper for some positions (e.g....
24
votes
3
answers
9k
views
Why does chess.com consider this promotion a blunder?
I've just played a game on Chess.com, and I'm surprised that the engine considers a promotion that I made a huge blunder. Like, my position was rated -62.8 (basically a won game), and after I promoted ...
4
votes
1
answer
198
views
Computer repeating moves?
Where I observed it
[FEN "3k3r/pp1n2R1/2p1bp1p/6p1/2PP1p2/1PBB3P/P4KP1/8 w KQkq - 0 1"]
1.d5 cxd5 2.cxd5 Bxd5 3.Bf5 Nb6 4.Bxf6+ Ke8 5.Bg6+ Kf8 6.Re7 Bc6 7.Rf7+ Kg8
I was using Stockfish/...
2
votes
1
answer
254
views
is The following position a win or a draw?
In an engine match Leela zero vs Komodo 14 Dragon at hyper-long time 6 hours each engine) in an Alekhine Defense game, Modern variation, the following rook endgame appeared on the board.
[FEN "...
-1
votes
1
answer
132
views
Most difficult puzzles for chess engines [duplicate]
I know this type of question has been asked a few times but each of the puzzles in the answers are solved by engines. For example Plaskett’s puzzle and other common ones such as Mitrofanov deflection ...
5
votes
2
answers
242
views
Techniques used for Stockfish engine selectivity
Example puzzle (I'm sure there are numerous that fit this bill):
[FEN "rnbq3r/pppp4/3b1pkp/5p2/2BP4/4P3/PPP2PPP/RN1QK2R w KQ - 0 1"]
[Site "Earth"]
[White ""]
1. Qh5+ ...
1
vote
1
answer
678
views
How do you make NNUE neural network for the newest Stockfish chess engine?
How can I make, for example, Stockfish 13 or 14 with a NNUE neural network? What is the precise procedure for making a NNUE neural network for some chess engine? I noticed that lichess.org uses ...
3
votes
1
answer
146
views
Is there a way to classify a chess position using algorithms and data science?
Given a position, is there a way we can classify a it, such as if whether there is a pin, fork, or trap, or a mate a mate in 2 or 3? If it is possible, what would be a better approach, an algorithmic ...
1
vote
1
answer
66
views
Python-chess : How to make infinite analysis in multiPV mode?
I need to run infinite analysis in multiPV mode.
How to do it right? My code doesn't work.
original_fen = "7k/1b1r1pp1/3Bp1np/1p2P1q1/8/1PQB2P1/2R2P1P/6K1 b - - 3 23"
original_board = chess....
3
votes
0
answers
67
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
164
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
288
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
1
answer
88
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
259
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
122
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
236
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
364
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
169
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
226
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
153
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
111
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
1k
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 ...
23
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
139
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
789
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
836
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
541
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 ...
3
votes
1
answer
219
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
283
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
787
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 ...