A first attempt at a pico8 chess engine.
Move generation is currently unoptimised so AI is fairly slow and doesn't have a great depth search.
-- Controls --
Use arrow keys to select a piece
Use z to confirm
Use x to disable AI



Not too shabby! The music is Pachabels canon, yeah? AI isn't too hard to trick, but it isn't stupid either. I look forward to the refinement of this cart!



I played twice and got beat both times, I suck at chess but star for this excellent cart!




Owned.
Second game though. The first attempt I had a major advantage but then both me and the ai screwed up so it was a near victory. This works pretty well, but it occasionally seems to give the player the ability to move the ai pieces. In the one above, I noticed the ai doesn't know how to break defenses, so just slowly moving forward with an unyielding wall where nothing is unprotected totally destroys it.



I'm not very good at chess so losing this game doesn't surprise me, but what's remarkable is how it brought me down. Too fast.



Great game! However I noticed the board is inverted, since the queen's rook square is white, and should be black, and this is engine is quite weak, but it still very impressive!



There are some bugs, I got 3 free turns because the ai wouldn't move.



This is such a cool cart that it was just a shame the square colors were wrong. The bottom right needs to be a light square.
So i fixed it for you and uploaded here for anyone who wants to play on correct board:
Tab 1, line 16: changed 4 or 9
to 9 or 4
.
I love the simple feel and especially the music.
Looking forward to learning from your code because I want to make a chess engine but i'm not there yet. Thank you.
.
.
.



Great cart! Looking forward to see how far you take it!
I was able to beat the bot pretty easily, but there's nothing wrong with that! As someone who's done minimax in pico-8 before, I commend your effort. This is no small feat!
My biggest gripe is that the king and queen look rather similar. To make it worse, much of the shape language normally used to distinguish the two is swapped! (Queen is a couple pixels taller than the king, king is spiky on top, etc.) Not to mention, because the board colors are inverted, the old "queen starts on her color" mnemonic doesn't even work! I think the simplest fix would be to put a cross on top of the king. That's pretty universal and unmistakable. And of course, fix the board colors. ;)
Also, I think the music is underappreciated. If the bot hogs too much CPU time the music would stutter, but I never heard that happen once! Putting music in a chess bot is such a flex and I love it!
[Please log in to post a comment]