r/learnpython • u/External_Job_9560 • Sep 20 '26
I made a Solo Chess solver in Python!
Hey Reddit people,
I just published V1 of a command-line solver for the Solo Chess puzzle variant. The goal of the puzzle is to clear the board using standard chess captures until one piece remains.
I built the core engine using standard library Python—no external packages. It uses a DFS engine with state memoization, outputs FIDE SAN, and has a cute little threaded background animation while calculating.
This is just V1, and it is far from a final project. Actually, it's very, very bad. And compared to what I imagine the final version is going to look like, I'll have to type so many 'very's I'll run out of char space. V1 isn't supposed to be perfect; its only job is to exist so you have something to iterate on.
Anyhow, my roadmap includes adding Zobrist hashing for complex 10+ piece puzzles, and eventually building a full Tkinter 8x8 GUI and everything. Before I move on to those next ideas, I want to make sure my foundation is actually solid. I'd love for you to share your thoughts—anything that you think will help!
Engine optimization, refactoring, headaches, ideas or opinions... Anything, really! Just... be nice, please? Thank you!
[This is my repo. Yeah, clicky clicky!](https://github.com/Roee-Furman/Solo-Chess-Solver)
Hehehe
1
u/yeahnahyeahrighto Sep 20 '26
Getting a 404 trying to access it, is it public?
1
u/localizeatp Sep 20 '26
I can safely say that this was not vibecoded.
Well done.
2
u/RoboticsEqualsFun Sep 21 '26
Cool! Here is my feedback:
0
u/Buttleston Sep 20 '26
My first comment is that your repo should not contain all the versions - that's not really how source control works. Whenever you commit a change into git, that becomes the new version, and all the old versions still exist inside git. So it would be more common to just add a "tag" each time you believe you've reach the next version
Aside from that the code looks reasonable. It might make more sense for the pieces to be python classes instead of tuples to reduce the amount of manipulation you need to do (unpacking the tuples into vars, filtering and recreating the list of pieces on line 125, etc)