We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [programming]

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

Filter by
Sorted by
Tagged with
11
votes
1answer
3k views

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 ...
10
votes
2answers
2k views

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.
5
votes
3answers
3k views

What is the optimal way to use Stockfish programmatically?

I have Stockfish compiled on my machine. Instead of just running the Stockfish program in the terminal, is it possible to interact with it in a separate program? For example, some basic things I ...
4
votes
3answers
1k views

Piping Stockfish input

I'm trying to write a Linux command line UCI interface for Stockfish. My program writes a bunch of commands to a text file and then tries to pipe them to Stockfish via the command line. My problem is, ...
3
votes
4answers
2k views

Programming three-fold repetition for my chess engine

I'm making a chess engine that has to implement a three-fold repetition as my AI vs AI engine repeats the same moves over and over again (Have a look at my post here - My chess AI makes the same ...
1
vote
2answers
73 views

Changing UCI output to include piece names

UCI output from engines is generally raw in the form of g1f3 and e2e4 representing Nf3 and Pe4. One engine I saw (lozza) sends its PV output with the piece names. Others, like Stockfish, don't ...
0
votes
2answers
138 views

Testing an engine (UCI) against an older version of itself

I am making modifications to a chess engine. I want to get quick feedback on whether the modified version seems stronger than an unmodified version or not, by fighting the older version multiple ...
17
votes
4answers
5k views

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 ...
8
votes
1answer
3k views

Stockfish evaluation of a position from PGN

I am trying to get Stockfish's evaluation of a board position(which is in PGN format) using command line.I know it accepts board position in FEN format, but is there any way i can provide PGN format? ...
4
votes
1answer
2k views

How to create your own opening book for your own chess engine?

I am currently working on a chess engine in Java. I am using the minimax algorithm with alpha-beta pruning to select the best move. However, it is inefficient to use the algorithm for selecting ...
3
votes
2answers
2k views

I'm confused by UCI Pondering and Time Control

I'm trying to talk to a UCI engine (right now Stockfish, but more generally to all UCI engines) to write my own computer-vs-computer program (I could use Fritz, but I really want to learn more about ...
16
votes
5answers
1k 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 ...
3
votes
2answers
2k views

Implement a chess app for Android with Stockfish [closed]

I want to implement a chess app for Android with Stockfish. I downloaded the Stockfish binary source code, but I don't know how to use engine Please tell me how to use Stockfish engine for ...
6
votes
3answers
2k views

Is it possible to download a big txt file containing many openings?

I am creating a small chess engine for a CS class, nothing serious, i need to read the openings from a txt file or any format, i can go to websites like chessgames.com and download individual games, ...
5
votes
2answers
930 views

Detect pinned pieces code

This post is a follow up of this one: C++ vs Java Engine move generation performance My goal here is to improve the performance of my move generator, which finishes perft (start_pos, 6) in 8.5 secs. ...
4
votes
1answer
145 views

Standard for receiving live chess broadcast

I was making live broadcast recent days and I'm quite surprised how it technically worked. We were downloading whole new PGN file every 5 seconds with format shown it the code below. Is this how ...
4
votes
3answers
3k views

Representing Moves found via BitBoards, applying them, and removing them

I understand how to find all valid moves for all pieces on the board. For example I know that a certain knight can hit all of the 1's in this board 01000000 00100000 N0000000 00100000 01000000 ...
3
votes
1answer
1k views

Converting square notation to algebraic notation programmatically

I'm not sure if this is the right place to put this question, but it requires a fair amount of chess background so I decided to post it here. Square notation describes moves by simply noting the ...
3
votes
2answers
342 views

AlphaZero and the revenge of the Artificial Intelligence

Answering this question, @SmallChess offered this answer: Before Google's chess journey, the chess engine community believed: AI chess will not beat classical programming because neural networks ...
2
votes
2answers
2k views

C++ vs Java Engine move generation performance

I've just finished translating my Java Engine to C++11, expecting great speed improvements in move generation. The code is very straightforward and uses a pre-generate bitboards approach. I also ...
1
vote
3answers
2k views

How do engines read PGN?

I'm writing a small chess engine in LISP. I was trying to read some PGN file, at first it seemed like a piece of cake. But then I realized something. Most of the PGN files, don't tell which is white ...
-2
votes
3answers
1k 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 ...