Questions tagged [programming]

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

Filter by
Sorted by
Tagged with
5
votes
1answer
1k views

Implementing Late Move Reduction (LMR) inside iterative deepening

Here I am trying to improve my engine, and the next feature on the list is LMR. I understood the general ideia, but since I don't want to introduce bugs and the CPW on the subject has no code, how do ...
4
votes
2answers
326 views

Compiling asmFish on macOS

I have been able to make a custom build of asmFish on Linux. However, I have been unable to do so on macOS. I've seen a Mac version of the FASM compiler on the Internet. But when I tried using it for ...
6
votes
2answers
1k 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
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 ...
5
votes
3answers
4k 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 ...
9
votes
3answers
879 views

Unit Testing a chess board representation

So this is a bit of outlier question. I am writing a chess library, essentially from scratch. You can find much of the code here, with the intention of using it for a GUI and/or an engine. (The game ...
1
vote
3answers
367 views

Make Arena send last move to chess engine

I am building a chess engine using AI and have succesfully connected it to the Arena Gui, by implementing the UCI protocol. My goal is to train my AI by facing other AIs that Arena offers. Everything ...
2
votes
1answer
244 views

Looking for SmallChess source code?

I'm currently looking for this chess engine: http://www.smallchess.com/ but the link to access it is dead. Can anyone help ?
3
votes
1answer
316 views

Gull engine : Which depth value to set 6 difficulty levels?

We are installing the Gull engine for some chess enthusiasts in an organization. We would like to set 6 difficulty levels from beginner to master using depth. Is there someone who can advice us about ...
8
votes
4answers
621 views

What is this battleship-style chess variant called?

So I've recently built and published a chess app, targeted at club chess player (like myself). The goal of the app is to educate and make chess more accessible. I'm working on an update. One of the ...
3
votes
1answer
147 views

Query for games where the difference of player ratings was big

I want to run a query on a chess games collection which would give me games played by strong players vs weak players, let's say games from the first round of Open tournaments (Swiss system) where ...
1
vote
1answer
105 views

Best programable chess game on the market

I would like to program famous chess matches into a chess program so I can watch the matches. Is there a chess program that allows this or is there already a program that has famous chess matches we ...
4
votes
1answer
344 views

Why am I getting different behaviour between using stockfish as a child node process and a CLI called process?

Copied this question from stackoverflow. Not 100% sure it belongs here but we'll see... I am building a web interface for the stockfish chess engine using Node, and I noticed that the behaviour of ...
4
votes
2answers
3k 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 ...
1
vote
1answer
459 views

Static Exchange Evaluation (SEE) without move undo

I read about a SEE without move/undo but they didn't share any simple pseudo code. If the next ply isn't calculated, cant see the recursive nature, Any speculators how this would work without move/...
7
votes
2answers
1k views

Is there an online chess evaluation engine with a REST API?

Is there an online chess evaluation engine with a REST API? I'd like to be able to send a game or position (with castling ability presumably) to a simple REST API and get back the positional ...
2
votes
0answers
69 views

Adding AI knowledge base [closed]

I've built a standard chess AI and trying to add a knowledge base. A rule based system beyond negascout and eval. It has all the standard parts, and now I want to dabble in novel directions. Tried ...
2
votes
1answer
326 views

Static exchange Evaluation (SEE) optimization

Implementing SEE extensively in my chess AI but can't seem to speed it up. Just using depth and MaxDepth. I'd like to add heuristics similar to negascout, quiescence, lazy eval. Maybe something like ...
2
votes
3answers
7k views

Check for checkmate

So I am implementing an intelligent chess agent but I can't get the checkmate working. I was wondering if there is a program that takes the chessboard notation and returns a result of yes or no to ...
3
votes
2answers
1k views

Is there an Android chess GUI library

I am looking for an open source chess gui library for Android that I can use in an app so that I don't need to take care of the GUI engine, but can focus on the logic behind it. I have searched for ...
13
votes
1answer
337 views

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 ...
5
votes
4answers
403 views

Coding chess engine

I have always wanted to start coding a simple chess engine. I do have basic understanding about the general architecture of such a program, but I would love to see some examples first. Anyone have ...
2
votes
1answer
425 views

What's the average piece density?

In a position, the piece density is equal to the total number of pieces on the board (Whites pieces + Black pieces) divided by the total number of squares (64). At the beginning of every game, the ...
4
votes
2answers
159 views

Is the TSCP chess engine able to run on a 32 bit processor?

I'm a beginner learning about chess engines and would like to find a chess engine written in C (like TSCP) that doesn't use bitboards for board representation because I want to test the engine on a 32 ...
1
vote
2answers
3k views

How to measure strength of my own chess engine? [duplicate]

I'm wondering how can I estimate ELO ranking of my own written engine. I figure out that I have to connect my engine with some well known engine (via UCI protocol?) to be able to play automatically ...
4
votes
1answer
594 views

How to use Stockfish to automatically analyze big DB of games

I would like to have Stockfish (or another strong engine) automatically analyze a very large database of games (>1M games), so that the analysis is as strong as possible while making the best use of ...
6
votes
1answer
6k views

Working with UCI protocol (coding)

I'm currently writing small application for a chess interested friend. The application is supposed to automatically annotate his chess games. When giving the engine a position to analyze, and a depth (...
3
votes
1answer
675 views

Reading UCI Engine output in Arena Chess

So for the most part I understand what I am looking at, but i have two questions about the first piece of data. Here is an example that I am looking at. Firstly, the first column has values 1/4, 1/8, ...
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, ...
5
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 ...
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.
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 ...
9
votes
1answer
1k views

Find magic numbers for bitboards

I am writing a C++ chess engine and I am looking for magic numbers for Little-Endian Rank-File Mapping bitboards to generate moves for sliding pieces. The rival chess website gives magic numbers but ...
2
votes
3answers
488 views

Duplicating the game analysis output on lichess

I'd like to automatically generate move by move analysis (based on my past games) like they have on lichess for imported games. My guess is that I need to run a full stockfish analysis for each move (...
3
votes
2answers
371 views

Is there a free downloadable mini-chess program or 'chess engine'?

The fascinating miniature chess or mini-chess ' that is chess on a 6 by 6 board. I know there are tons of decent chess programs but has anyone written a decent chess program for mini-chess. Is there ...
5
votes
1answer
794 views

Collecting principal variations during search and using them in ordering?

In an Alpha Beta search in that utilizes a Negamax framework, how does one collect principal variations to use in move ordering, and how does one use them, without using a transposition table? ...
4
votes
2answers
487 views

how to evaluate the position inside the search function

using PVS Algorithm with Quiet search and zero window search what should the range of the score be (-infinity, infinity ) could it be as small as (-16000,16000) and what should the search return if it'...
8
votes
2answers
2k views

Where can I find databases of tactical problems, categorized and ranked by difficulty?

I'm toying with the idea of building a tactical training tool. For my idea to work, I need positions that are categorized by motif and difficulty. A lot of tools seem to have this, and I doubt they'...
3
votes
2answers
799 views

Could you show me the code(s) of one or more simple chess program(s) written in C#?

I am a novice in C#. I am looking for the code(s) of one or more chess program(s) written in C#. Preferably, the code(s) should be short, clean, straightforward, very simple, and use only basic things ...
2
votes
3answers
336 views

Chess Psychology

I have a friend who is an improving chess player. He wants to progress in his game. The problem with him is that he plays really good with much stronger opponents but, often lose many games ...
0
votes
1answer
700 views

What fraction of a Pawn do the most powerful chess engines (Komodo, Stockfish, Houdini, Fritz, Hiarcs, Gull, …) use as their evaluation unit?

I've heard that the most common evaluation unit is 1/100 of a Pawn. But some engines use 1/1000 of a Pawn as their evaluation unit. I've also heard that Stockfish used 1/256 of a Pawn as its ...
2
votes
1answer
872 views

What is the number of “CPU” next to each engine's name in engines rating list? And is my computer 1CPU, 2CPU or 4CPU?

Look at this engine rating list which compares all the versions of Stockfish. After the name of each engine we can see one of these three things: 4CPU 2CPU Nothing, which probably means: 1CPU And ...
6
votes
2answers
1k views

What are the common mistakes make by chess engines at ELO range 1500 - 1800?

I'm a software developer and occasional chess player at elo rating 1500. Chess engines of different level play different type of games with some mistakes according to that given level. I'm ...
8
votes
3answers
2k views

Which interface protocol should I implement for my chess engine?

I am writing a chess engine in C++ https://github.com/RomainGoussault/Deepov. I know there are several interface protocols out there (UCI, Winboard protocol, etc) and I don't know which to implement. ...
1
vote
1answer
512 views

How do I use the “Mate Search” function of either Houdini 3 Pro x64 or Fritz 12? It doesn’t seem to work…

The “Mate Search” function of my two chess engines, Houdini 3 Pro x64 and Fritz 12, does not work. I click on “Levels” and then on “Mate Search”. Then a small “Mate Search” window pops up. When I ...
2
votes
5answers
3k views

How do I check if a move is legal using Stockfish?

Let us say that I input a wrong move in Stockfish. What answer will Stockfish send me back? Or is there a function to check if a move is bad? People, I found a solution by myself.
4
votes
1answer
3k 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 ...
2
votes
2answers
167 views

Automatically annotating the beginning of my games

I play chess online and use an engine to review the game afterwards. This works well when I get out of the opening, but under my current configuration (Raptor GUI running StockFish) I don't get great ...
6
votes
4answers
4k views

Javascript based Chess engine

In one of my previous questions I asked about comparison of the strongest chess engines and got a really good answer. While there are little or no doubts that chess engines are stronger than humans, I ...
11
votes
5answers
15k views

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 ...