MiSTer Chess Core (Work In Progress)
- LamerDeluxe
- Top Contributor
- Posts: 1239
- Joined: Sun May 24, 2020 10:25 pm
- Has thanked: 887 times
- Been thanked: 284 times
Re: MiSTer Chess Core (Work In Progress)
This is fascinating. I wonder how it works. Does each piece have its own circuitry? Does the computer opponent think multiple steps in advance? How fast is it compared to regular chess games?
-
- Core Developer
- Posts: 547
- Joined: Sun May 24, 2020 9:30 pm
- Has thanked: 20 times
- Been thanked: 145 times
Re: MiSTer Chess Core (Work In Progress)
This looks great !
As I watched this, it seemed that the FPGA's move happened too quickly and I didn't realize where it came from and went to.
It might be nice to add an animation something like:
- complete the move of the player's piece
- roughly 0.5 second delay(*)
- highlight "from" location
- roughly 0.5 second delay(*)
- highlight "to" location
- roughly 0.5 second delay(*)
- move piece and complete move, return control to player 1
(*) - possibly adjustable
As I watched this, it seemed that the FPGA's move happened too quickly and I didn't realize where it came from and went to.
It might be nice to add an animation something like:
- complete the move of the player's piece
- roughly 0.5 second delay(*)
- highlight "from" location
- roughly 0.5 second delay(*)
- highlight "to" location
- roughly 0.5 second delay(*)
- move piece and complete move, return control to player 1
(*) - possibly adjustable
-
- Core Developer
- Posts: 385
- Joined: Sat May 23, 2020 12:55 pm
- Has thanked: 42 times
- Been thanked: 414 times
Re: MiSTer Chess Core (Work In Progress)
The last move is marked on the board, e.g. in screenshot above the black queen moved from F3 to D3, as can be seen by the black borders.
I may add real moving of the figures at some point.
Opponent "thinks" all possible steps for the next N turns, with N being the difficulty you set in the OSD.
It should be faster(=stronger with same real-think-time) than any core , e.g. Chess game on GBA on Mister, but cannot compete against modern multicore PC CPUs.
The pieces don't have logic itself, but all important functions have their own circuitry:
- find all legit moves for a given board (including history for en passant and castling)
- execute a move
- Opponents recursive Minimax algorithmn (unrolled for 7 layers)
- Opponents Evaluate board function (get score of whole board to judge if a move is good or bad)
Drawing is mainly 2 background layers (one for board, one for pieces) + some text overlay elements winning the priority.
I may add real moving of the figures at some point.
Opponent "thinks" all possible steps for the next N turns, with N being the difficulty you set in the OSD.
It should be faster(=stronger with same real-think-time) than any core , e.g. Chess game on GBA on Mister, but cannot compete against modern multicore PC CPUs.
The pieces don't have logic itself, but all important functions have their own circuitry:
- find all legit moves for a given board (including history for en passant and castling)
- execute a move
- Opponents recursive Minimax algorithmn (unrolled for 7 layers)
- Opponents Evaluate board function (get score of whole board to judge if a move is good or bad)
Drawing is mainly 2 background layers (one for board, one for pieces) + some text overlay elements winning the priority.
-
- Posts: 53
- Joined: Mon Jun 01, 2020 3:19 am
- Has thanked: 14 times
- Been thanked: 1 time
Re: MiSTer Chess Core (Work In Progress)
Another interesting unexpected MiSTer core!
Sounds like you enjoyed writing it!
Thanks!
Sounds like you enjoyed writing it!
Thanks!
-
- Core Developer
- Posts: 385
- Joined: Sat May 23, 2020 12:55 pm
- Has thanked: 42 times
- Been thanked: 414 times
Re: MiSTer Chess Core (Work In Progress)
Even Level 7 without any randomness should only take 10-30 seconds per turn on a full board, not 5 minutes.
With randomness even less.
But the more crucial question is: could you beat it on 6?
If you answer that with yes, i can improve the speed.
I just didn't feel anyone would really need it.
Stockfish is an engine nobody can beat, which is pointless for a chessgame, but great for analyzing.
The good horsey only jumps as high as it needs to
With randomness even less.
But the more crucial question is: could you beat it on 6?
If you answer that with yes, i can improve the speed.
I just didn't feel anyone would really need it.
Stockfish is an engine nobody can beat, which is pointless for a chessgame, but great for analyzing.
The good horsey only jumps as high as it needs to
Re: MiSTer Chess Core (Work In Progress)
Haha I beat it alright but not as a human player
Used a chess computer on web to play against mister. In the last 5 moves it said Stockfish and my moves until jack mate. Pretty ni ce
Used a chess computer on web to play against mister. In the last 5 moves it said Stockfish and my moves until jack mate. Pretty ni ce
-
- Core Developer
- Posts: 385
- Joined: Sat May 23, 2020 12:55 pm
- Has thanked: 42 times
- Been thanked: 414 times
Re: MiSTer Chess Core (Work In Progress)
Yes, unlimitied Stockfish beats it easy
I did the same the other way around to test the strength of the Chess Core.
On Lichess it beat Stockfish limited to Elo 2000 with Level 5.
Level 5 needs only ~1 second per turn and 2000 Elo is already VERY strong,
in the area of FIDE title players who wouldn't play such a game anyway, so i called it a day.
I did the same the other way around to test the strength of the Chess Core.
On Lichess it beat Stockfish limited to Elo 2000 with Level 5.
Level 5 needs only ~1 second per turn and 2000 Elo is already VERY strong,
in the area of FIDE title players who wouldn't play such a game anyway, so i called it a day.