Stockfish is a free and open-source chess engine, available for various desktop and mobile platforms.
Questions tagged [stockfish]
44 questions
4
votes
4 answers
Multiplication of two packed signed integers in one
The Stockfish chess engine needs to store, for its evaluation, both an endgame score and a middlegame score.
Instead of storing them separately, it packs them into one int. The middlegame score is stored in the lower 16 bits. The endgame score is…

Chayim Friedman
- 47,971
- 5
- 48
- 77
3
votes
1 answer
How to retrieve Stockfish evaluation score with NNUE by itself using the Stockfish CLI
I'm using Stockfish in R via https://github.com/curso-r/stockfish.
I can execute anything that I could in the CLI using engine$run(command). For example,
engine <- fish$new()
engine$position("rnbqkbnr/pp2pp1p/2p3p1/3p4/4P3/2NB4/PPPP1PPP/R1BQK1NR w…

CubicInfinity
- 163
- 1
- 10
2
votes
0 answers
Cross Compiling for x64 on ARM (Apple Silicon)
It is definitely possible to target Intel when compiling on an Apple Silicon (ARM64) system, as Xcode does that all the time when building universal bundles of an app. However, I am unable to replicate this compiling a C program with make…

CryptoAlgorithm
- 838
- 5
- 15
2
votes
1 answer
Python Chess Data (FEN) into Stockfish for Python
I am trying to use stockfish to evaluate a chess position using FEN notation all in Python. I am mainly using two libraries (pgnToFen I found on github here: https://github.com/SindreSvendby/pgnToFen and Stockfish the MIT licensed one here:…

Lachlan Moore
- 53
- 7
2
votes
1 answer
executable exits early when using io.WriteString
I'm using the io package to work with an executable defined in my PATH.
The executable is called "Stockfish" (Chess Engine) and obviously usable via command line tools.
In order to let the engine search for the best move, you use "go depth n" - the…

Robert
- 78
- 1
- 8
2
votes
1 answer
Setting stockfish skill level (UCI / Javascript)
I can't for the life of me seem to be able to set stockfish to do anything except deliver crushing blows at level 20. Provided below is the code set up to configure the Skill Level and Depth for stockfish as well as the order of UCI commands…

Justian Meyer
- 3,623
- 9
- 35
- 53
2
votes
2 answers
limiting stockfish evaluation time
I am trying to get the evaluations for a series of fen positions using the Python stockfish library. When the solution is mate in x, my code runs quickly. When the solution is x centipawns it runs for a very long time. How do I get stockfish to…

Tim Rauen
- 21
- 1
1
vote
0 answers
Referencing Simple JS/WASM files inside React Native?
I’m trying to get the Stockfish chess engine that uses a .wasm file to work on mobile devices offline in React Native (Expo). So far I have gotten Stockfish working as a simple html/js file that references the .wasm file and works offline doing…

Muhammad Hamza Latif
- 11
- 2
1
vote
0 answers
Make tree structure for chessGames
I want to make a Tree structure that shows my data from a number of chessGames. I dont want to use any libraries
The Node class is who has the turn and which move number it is. So there will be one node that is 1 White, and one that is 1 Black.
The…

marfin
- 21
- 1
1
vote
1 answer
Worker thread postMessage() vs command line command
I recently learned about Worker threads in Node JS. I was trying to create a worker thread to run Stockfish chess engine in node js.
The npm package I am using for this is called stockfish. I tried using node-stockfish before this but it was not…

Chandrachur Mukherjee
- 154
- 8
1
vote
0 answers
Google Cloud Run - Stockfish causes deploy failure
recently been trying to get Stockfish to run and receive HTTP requests on a web server and ran into an issue. importing and initilizing stockfish causes the deploy to fail, when locally ran it runs perfectictly fine but as soon as I go to deploy it…

Liam Foss
- 11
- 2
1
vote
0 answers
Generating special magic numbers
For context: https://www.chessprogramming.org/Looking_for_Magics are the magic numbers I am talking about
Hey, I would like to map availabilty of king attacks to low order 8 bits. For example, king's attack's on A1 would be (B1, A2, B2). Suppose I…
user16009754
1
vote
1 answer
How to find illegal moves in move generator using Stockfish perft funtion?
I'm making a chess program in Unity and I've made a perft function to find the bugs in my move generator. I've downloaded Stockfish to compare the results.
From the starting chess position, with a depth of 3, my results match with Stockfish's for…

Elia Giaccardi Old
- 262
- 1
- 13
1
vote
1 answer
Adding headers to http response for Stockfishjs to work
I am trying to write a html page that includes stockfish.js. (My goal is to create a site where yoy can play certain positions against stockfish.)
The problem is that stockfish.js uses SharedArrayBuffer, so when i load the html Firefox-console…

Patzer
- 25
- 4
1
vote
1 answer
Pyinstaller opens Stockfish in console
I have made a GUI (using PySimpleGUI) where you can play against Stockfish (I used python-chess module). I make an .exe-file using Pyinstaller --noconsole, but when i run it, it opens Stockfish in a console. When I run it form source, in PyCharm,…

Patzer
- 25
- 4