Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CrazyAra Going To Infinite Analysis Mode On 1 Position (Can't Be Stopped) In Liground After Making Two Moves On The Board #81

Closed
CrazeZh opened this issue Apr 9, 2021 · 3 comments
Labels
LiGround Issue related to the LiGround GUI

Comments

@CrazeZh
Copy link

CrazeZh commented Apr 9, 2021

Hey CrazyAra/Liground team,

I'm really excited to see that there is now a program that supports analysis with CrazyAra, outside of using the command line!

The first image is what I get when I load the initial position, and I imagine it's how things are meant to look:

image

From this setup, I am able to stop the engine analysis and it switches automatically to the next move when I make 1.e4 on the board - all good so far.

Then I try playing 1...e5, and this happens:

image

As you can see, the engine in the command line automatically switches to 'go infinite' mode, and is stuck on this position after 1.e4, no matter what moves I play or what I do on the board. My attempts to type 'stop' and any other commands are completely ignored, as you can see here:

image

I even tried uploading a new PGN, and that also didn't work (the PGN moves didn't load from Lichess).

Hopefully there is some simple fix (e.g. in the Settings) I'm missing, as otherwise this is quite a significant bug that stops CrazyAra being used in the way I assume it's intended on Liground.

Update: It seems that inputting the FEN from the Lichess Study each time, instead of making moves on the board, avoids this problem. That's still a lot better than the alternatives (like the command line), as you can see 5 options in the analysis, and it's a bit faster to copy and paste. But I believe this software (with some technical fixes) is capable of dominating the crazyhouse database/analysis scene the way ChessBase did with standard chess.

@QueensGambit
Copy link
Owner

QueensGambit commented Apr 10, 2021

Thank you @CrazeZh for the detailed bug report. I was able to reproduce this problem.
It looks to me as if there is some sort of racing condition and LiGround tries to apply the move of the last position to the new position. This results in an error and bugs the engine communication.
This should be fixed if LiGround waits for the bestmove keyword after calling stop.

In the meantime you can manually deactivate the engine before changing the board position.

Additionally, I created an issue to avoid displaying the virtual loss during analysis (CrazyAra#82).
This is mainly visible on the CPU back-end and results that every position is evaluated as worse for the current players turn to move.

@tsoj
Copy link

tsoj commented Feb 8, 2022

@QueensGambit
I noticed myself that with a different engine, the following commands, when executed immediately after each other, in some scenarios cause the engine to be in a corrupted state because of race conditions involving the stop command.
So something like this:

position startpos
go infinite
stop
position startpos
go infinite

When I copied this (including the last \n) and pasted it into the engine, the engine became unresponsive. Maybe this is a similar issue for CrazyAra, depending on how stop commands are implemented.

@QueensGambit
Copy link
Owner

@tsoj Thanks for the info. 👍
You are right about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LiGround Issue related to the LiGround GUI
Projects
None yet
Development

No branches or pull requests

3 participants