# Questions tagged [chess-algorithms]

For questions about algorithms used in computer chess software.

36 questions
Filter by
Sorted by
Tagged with
1 vote
109 views

### Why is my negamax/quiescence search slow?

I'm currently making a chess engine in Java and my search function is extremely slow to the point that it's slower than my perft function. My search function is currently a negamax search that uses ...
• 90
312 views

### A different hashing algorithm for chess positions

This is not a question, it is a curious discovery I wanted to share The most common hashing algorithm in chess programming is, I believe, Zobrist hashing. However, I may have found a different way of ...
1 vote
209 views

### Help with Negamax using transposition table

I've recently been improving my Negamax algorithm for chess, adding a transposition table. The algorithm was working well before this addition. After this addition I can't see no big improvements in ...
• 11
1 vote
105 views

### Does a reinforcement learning style model actually need to be combined with a search algo to produce the best moves?

I have recently been studying up on Machine Learning based chess engines and have begun to develop one of my own. I was wondering, realistically, doesn't the board technically contain all of the data ...
• 19
4k views

### Which methods can be used to prove that a position is illegal?

Given a board position, there are programs that try to find a series of legal moves that lead to it. Are there algorithms that can do the opposite - prove that the position is not reachable by a ...
• 916
776 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 ...
7k views

### Given a legal chess position, is there an algorithm that generates a series of moves that lead to it?

Given a FEN board position, is there an algorithm that can return a PGN move list that evaluates to it from the standard initial position?
• 916
2k views

### Why does a chess engine not get excited about a piece exchange at the end of its analysis depth?

I read about the chess engine algorithms and came up with a question. If, for example roughly all (disregarding alpha-beta pruning) possible 20 moves variations are calculated, why does a chess ...
• 121
501 views

### Comparison of tactics trainers

I've noticed that the nature of the tactics differ from one website to another. For instance, on lichess.org/training (the website which I train tactics the most on), I have noticed that tactics ...
478 views

### How to make a chess engine that can identify tactics in the position?

I want to make a program that can identify chess tactics in the position, while searching moves according to given heuristics. but I am not sure exactly how to go about this. Related to this Is there ...
• 473
3k views

### How do chess engines decide which best line to play when the game outcome is within their horizon?

Inspired by the Hot Network Question "In this puzzle, why does white play dxe5?", when a chess engine is in a position that it can definitively call lost, drawn, or won, what policy is used to decide ...
• 336
33k views

### Average centipawn loss

I had no inacurracies, blunders or mistakes then also my centipawn loss was 48, or 50. What is the problem here or I have misunderstood average centipawn loss. You can have a look at that game at ...
• 239
802 views

### How does Allie's search algorithm work?

Allie is a strong engine that's looking competitive with the top ones (Leela Chess Zero and Stockfish). It's supposedly based off AlphaZero, but works differently. As far as I understand it, the most ...
• 27.9k
2k views

### Is the dead position problem solvable?

In chess, there are some dead positions (FIDE Laws of Chess). 5.2.2 The game is drawn when a position has arisen in which neither player can checkmate the opponent’s king with any series of legal ...
6k views

### Swiss Pairing Algorithm

I am building a simple Android application for hosting Chess tournaments, I am having some difficulty implementing a Swiss paring algorithm, I need link to an article or a paper that explains how I ...
• 517
2k views

### When checkmate is impossible in a position

The laws of chess say 1.5. If the position is such that neither player can possibly checkmate the opponent’s king, the game is drawn (see Article 5.2.2). 5.2.2. The game is drawn when a position has ...
• 347
2k views

### How can minimax chess engines do alpha-beta pruning without reaching the final positions?

In order to calculate far ahead, minimax chess engines must perform alpha-beta pruning, where they don't calculate positions that are obviously winning or obviously losing. Without doing pruning, ...
• 19.9k
4k views

### Is Deep Blue outdated?

I bought a laptop, a Dell, model XPS 13. I found a technical review which mentioned the Fritz test: Fritz is a chess benchmark that tests the computing capabilities of the CPU with various chess ...
• 169
18k views

### If given infinite processing power, is there an algorithm that would play chess perfectly?

Does there exist such an algorithm where, if given infinite processing power, a computer could play chess perfectly, i.e., it can generate perfect moves from any position? If so, where can I find the ...
• 457
1k views

### Lecture/Book on AlphaGo/AlphaZero

I am very interested in how AlphaGo resp. AlphaZero works. It seems to me, the related Google Papers are very dense and not easy to read. Is there any textbook or lecture that explains on a technical ...
• 539
921 views

### Calculation for game phase

What is the best or alternative ways to detect game phase by a chess AI? What is a good algorithm to use? Chess programming wiki says to count material or pieces? What would be the expected piece or ...
119 views

### What does the sign of the score represent in chess engines?

I am trying to code a small chess engine, but I am confused with what the sign of the score means. This is my current minimax algorithm: INFINITY = 999999 def minimax(self, depth, color): if ...
2k views

### How did the engines improve since Deep Blue?

Computer chess engines have gotten better since Deep Blue beat Kasparov in 1997. Did the algorithms get better, or were the improvements mostly due to the same algorithms running faster thanks to ...
• 475
2k views

### What is alternative to Zobrist hashing?

Zobrist hashing is very good method save position but it is not good to read position - is any good alternative to this algorithm which allow to store and restore position with minimum of bits. For ...
• 515
6k views

### How do I learn Chess Programming?

Basically I have seen that people write a lot of chess algorithms, and ask questions in this forum, which I fumble to answer appropriately. I see the code, but unable to make out whether it is correct ...
• 2,013
3k views

### My chess AI makes the same repeated moves

I've built a chess game engine using Minimax and when I play AI against the AI, everything goes fine(for sometime) until both the AI players make the same set of moves again and again. Observe the ...
158 views

### How do you implement Alpha-Beta search when you can only compare 2 positions to each other?

In their paper about DeepChess, http://www.cs.tau.ac.il/~wolf/papers/deepchess.pdf, David et al show a cool way to train a net to play chess. I've trained my net to some degree of success and I want ...
• 31
1k views

### Search Algorithms used by top engines?

what are the top parallel search algorithms used by top engines ,and which one is the best ? And is there a reference implementation of them in any programming language ? I know most of the top ...
• 21
1k views

### Chess Statistics How to?

I am a graduate student studying statistics and I play chess once in a while for fun. I was thinking (just for the fun of it) -- applying some of what I've learned in statistics to chess games: I ...
• 151
756 views

### How does timeseal work? [closed]

I know the the fics (free internet chess server: www.freechess.org/) does use a program called timeseal to measure the time that a user needed to take a move. This timeseal is some time measurement on ...
• 213
5k views

### Is there a chess engine that does NOT use brute-force search?

Every chess engine I've ever heard of (including all I found listed on Wikipedia) uses brute-force search with an evaluation function (minmax algorithm) to decide on its move. This is not how most ...
407 views

### Alpha-beta safe on incomplete tree?

I'm writing a simple chess program from scratch on a hobbyist basis. I think there is something fundamental I'm overlooking or don't understand. I read the following http://chessprogramming....
2k views

### What is the highest known lower bound for mate in N from starting position?

Edit: It seems my question was not clear enough. Let me rephrase: What is the largest N for which we can knowingly say "chess, from the starting position, is not a forced mate in N moves"? Chess is ...
• 341
31k views

### How do chess engines "think"?

What I want to know is how engines are programmed to find moves. I'm sure they first calculate the most forcing lines such as captures and checks. But what about subtle, deep positional moves? They ...
• 4,626
21k views

### What is an accurate way to evaluate chess positions?

I've been interested for a while about a computer chess AI algorithms (and got the chance to work on one at some point) like Minimax, and as the core component of these algorithms is the so-called ...
• 1,193