Replies: 2 comments 8 replies
-
Stockfish doesn’t respond to stop. What you implemented is a hack, stockfish just prints the info a final time after the stop. If search never starts there is no answer, which could be the case if the search startup takes more time on your raspberry pi than on your mac. If you want to know if stockfish is responsive again you send “stop” followed by an “isready” and wait for “readyok” |
Beta Was this translation helpful? Give feedback.
-
@Hardin22 What you want to do is this: Send the position to analyze to the engine. Important: If you send something like 'go nodes xxx' or 'go depth x' to start the search, check that the engine hasn't already finished its search and sent a bestmove response before sending a 'stop' command. Because if the engine has already finished its search there will be no response to the 'stop' command. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
I'm developing a software application designed to run on a Raspberry Pi as part of a smart chessboard project. The board will feature a touchscreen display. While my code is still a work in progress and somewhat poorly written (I apologize for that), it functions perfectly on my Mac, particularly in the Game Review section. This section is where multiple calculation commands are sent to Stockfish, depending on how quickly the user scrolls through the positions.
The main issue arises when I try to scroll quickly through the positions during Game Review. On my MacBook, the Stop Calculating function works flawlessly. No matter how quickly I click the forward and backward buttons to review the game, the software never crashes or freezes, and I consistently receive the log message "Stockfish has stopped calculating" as expected.
However, when I run the same software on a Raspberry Pi, the stop message frequently fails to appear, regardless of the maximum depth I set for calculations. I've tried various configurations, but nothing has worked so far.
My primary question is: at a high, production-ready level, how can I ensure that the stop command is sent reliably without errors, regardless of how quickly the commands are being issued?
Any insights or suggestions would be really really appreciated, I care a lot about this project and would like to complete it.
Thank you!
link to repo: https://github.com/Hardin22/JavaChessBoard.git
code for the stockfish class:
package org.example.javachess.Oggetti;
import com.github.bhlangonijr.chesslib.Board;
import com.github.bhlangonijr.chesslib.Square;
import com.github.bhlangonijr.chesslib.move.Move;
import com.github.bhlangonijr.chesslib.move.MoveException;
import javafx.application.Platform;
import javafx.scene.control.Label;
import java.io.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javafx.scene.paint.Color;
import org.example.javachess.Utils.ChessMoveConverter;
public class Stockfish {
}
Beta Was this translation helpful? Give feedback.
All reactions