MiSTer Chess Core (Work In Progress)

For topics which do not fit in other specific forums.
Xbytez
Posts: 37
Joined: Wed May 20, 2020 3:36 pm
Location: UK
Has thanked: 11 times
Been thanked: 8 times

MiSTer Chess Core (Work In Progress)

Unread post by Xbytez »

FPGA developer Robert Peip aka FPGAzumSpass is working on a new MiSTer chess core.



https://www.youtube.com/watch?v=FDvZL4sNBhM

User avatar
LamerDeluxe
Posts: 59
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 1 time

Re: MiSTer Chess Core (Work In Progress)

Unread post by LamerDeluxe »

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?
dshadoff
Posts: 133
Joined: Sun May 24, 2020 9:30 pm
Been thanked: 5 times

Re: MiSTer Chess Core (Work In Progress)

Unread post by dshadoff »

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
FPGAzumSpass
Posts: 52
Joined: Sat May 23, 2020 12:55 pm
Been thanked: 3 times

Re: MiSTer Chess Core (Work In Progress)

Unread post by FPGAzumSpass »

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.
WolfgangBlack
Posts: 44
Joined: Mon Jun 01, 2020 3:19 am
Has thanked: 9 times

Re: MiSTer Chess Core (Work In Progress)

Unread post by WolfgangBlack »

Another interesting unexpected MiSTer core!
Sounds like you enjoyed writing it!
Thanks!
User avatar
Cebion
Posts: 105
Joined: Sun May 24, 2020 7:30 pm

Re: MiSTer Chess Core (Work In Progress)

Unread post by Cebion »

I played the core on the highest difficutly and boy every turn took about 5 minutes :D
Stockfish is a nice engine.
FPGAzumSpass
Posts: 52
Joined: Sat May 23, 2020 12:55 pm
Been thanked: 3 times

Re: MiSTer Chess Core (Work In Progress)

Unread post by FPGAzumSpass »

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 :)
User avatar
Cebion
Posts: 105
Joined: Sun May 24, 2020 7:30 pm

Re: MiSTer Chess Core (Work In Progress)

Unread post by Cebion »

Haha I beat it alright but not as a human player :D
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
FPGAzumSpass
Posts: 52
Joined: Sat May 23, 2020 12:55 pm
Been thanked: 3 times

Re: MiSTer Chess Core (Work In Progress)

Unread post by FPGAzumSpass »

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.
Post Reply