Questions tagged [programming]

Questions related to all aspects of writing software related to chess.

This includes discussion of algorithms, techniques, and architecture for writing or augmenting a chess engine, or the results and efficiency of these things. It also includes similar for user interfaces or any other tools that enhance the chess playing experience.

269 questions
27
votes
3 answers

What is the worst opening move in Chess960 for White?

Is there a first move for white in Chess960 in which white can immediately blunder a piece or lose a significant advantage (say -2.0 or so)?
kevin jumbo
  • 305
  • 3
  • 5
24
votes
3 answers

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?
24
votes
4 answers

Creating chess engine, machine learning vs. traditional engine?

I am both an avid chess player and computer programmer. I would say that playing chess and programming are the two things I spend the most time doing. Naturally, I am wanting to create my own engine and, ultimately, Lichess bot. In wake of…
David Chopin
  • 469
  • 1
  • 3
  • 11
21
votes
6 answers

What prevents chess engines from being undetectable?

I see accounts of people getting banned from sites like chess.com for using engines like Stockfish and Komodo (I admit I have used these engines before, but never in an actual match). Now, I believe there are certain characteristics of these engines…
Apoqlite
  • 337
  • 1
  • 2
  • 5
19
votes
1 answer

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 opening, black plays the worst possible response,…
Jacob Hoffman
  • 309
  • 2
  • 5
19
votes
5 answers

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 faster hardware, etc.? If the former, are these…
MWB
  • 430
  • 2
  • 13
17
votes
3 answers

Alternative approaches to chess engine programming

As far as I understand, roughly speaking, chess engines work by: calculating all possible variations (game tree) up to some depth evaluating the final position based on some criteria (material, piece activity...) based on this evaluation decide for…
user1583209
  • 20,665
  • 3
  • 40
  • 95
16
votes
3 answers

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

I built an uci compatible chess engine, and I would like to know its Elo rating. What is the easiest way to get it? I would like something that works both on Linux and Windows.
Romain
  • 667
  • 8
  • 15
16
votes
3 answers

Open source chess playing or pgn viewing libraries

Is anyone familiar with any open source chess libraries in any language that can do any of the following: parse PGNs and/or FENs calculate valid chess moves based on position process an entire chess game EDIT: Sorry, I should be more clear. I'm…
James Tomasino
  • 2,265
  • 19
  • 20
15
votes
7 answers

Chess engine with API

I am looking for a chess engine which provides a normal API which I can use with some high level programming language like C# or python. I went through the list of leaders (Houdini, Komodo, Stockfish and Rybka) and was not able to find any signs…
Salvador Dali
  • 4,848
  • 6
  • 30
  • 48
15
votes
2 answers

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 series of legal moves? Proof by exhaustion doesn't…
15
votes
6 answers

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 moves. The game is said to end in a ‘dead position’.…
user17439
14
votes
2 answers

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 among lines that lead to the same outcome? In a…
which-line
  • 316
  • 2
  • 6
14
votes
1 answer

How to convert PGN moves to long algebraic notation (in python)?

I want to read a PGN file and then advance to a certain move number, and feed that to an UCI engine. Turns out engines work using long algebraic notation, and PGNs are in short algebraic. What is an easy way to make the conversion? i.e. from SAN…
14
votes
1 answer

What features can I add to this FIDE chess application? (edits made 2/25)

EDIT: Most of the app is completed. Now all I have to complete is implementation of FIDE arbiters, a dynamic 3d plot (right now it only has 3 variables being plotted, no inputs affect it), adding more FIDE data (based on months) and perhaps…
InfiniteFlash
  • 572
  • 2
  • 11
1
2 3
17 18