Comments (4)
I have just seen that the issue #1 is related to this. The position in the picture is a checkmate for white.
No, there was no checkmate message.
In the case of checkmate (and of stalemate), the player has no legal move. I don't know what the engine attempts to do in this case, but from your comment in issue #1, it sounds like the engine attempts an illegal move instead. If this is the case, I would suggest you handle it this way:
- Don't play the illegal move, because it is just the engine assuming that the game is over
- If the engine is in a check position (and has no legal moves), it is a checkmate
- If the engine is not in a check position (and has no legal moves), it is a stalemate (draw)
from chessmarkable.
I had some struggle with that already. The things is that the bot tends to make non-moving moves (just moves from src to dest) when the king is cornered. As far as I understand it, this is not legal at all. Some check (gives_check(...)
or similar) does a assert against that which is why I replaced it with a null move. But this is also a quite hacky solution. I need to look up better ways on that.
Did the "Checkmate!" appear before the crash?
from chessmarkable.
Good idea. I could reproduce the bug on checkmating the bot as well. I'll try to fix that in the evening (in about 6 hours) since I have lectures atm. I'll also probably add the possibility to import/export the board as FEN to speed up testing your suggested fix which sounds promising.
from chessmarkable.
I think that I have sorted it out now. It now recognized a stalemate and check even before the bot tries to pull as "null move".
Here is a FEN that can easily result in a stalemate: 8/8/2Q5/4k3/1R6/8/6K1/8 w - - 0 46
(start with this state by setting -i
to it).
This one can be used to checkmate the black: 1R7/8/2Q5/4k3/1R6/8/6K1/8 w - - 0 46
(just added another rook to the mix).
Seems to work fine now. Let me know if you still manage to crash it.
from chessmarkable.
Related Issues (12)
- Invalid move by bot HOT 1
- Save game as file HOT 5
- Clicking on your own piece after already having one of your own pieces selected should select that piece HOT 4
- unable to parse pgns file HOT 32
- PGN Export HOT 26
- RUSTSEC-2021-0140: rusttype is Unmaintained HOT 1
- Menu doesn't always render properly on rM2
- The board is using the wrong colours. HOT 4
- installation problems HOT 12
- Over the board orientation for black pieces HOT 5
- Not being able to restart remarkabe HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chessmarkable.