Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sokoban Puzzles #66

Closed
wants to merge 13 commits into from
Closed

Conversation

Miserlou
Copy link
Collaborator

@Miserlou Miserlou commented Feb 6, 2025

Ex:

This is a sokoban puzzle. Please solve it. Your solution must be a string of characters, ex: LDURRUDL

+ + + + + + +
+ * - @ - X +
+ + - @ - + +
+ X - - - $ +
+ + + + + + +

* - The player
% - The player on a goal
@ - A box
X - A goal
$ - A box on a goal
+ - A wall
- - An empty position

Configurable sizes and number of boxes for different difficulty levels.

DS-R1 and CGPT-O1 can solve these, but it takes R1 a very long time for the simplest case (five minutes ish.) O1 does it quickly.

Hacked up from this project (MIT). There's still some stuff in there that can be stripped out (particularly the GUI/sprite stuff), but it's all quite intertwined.

@@ -18,6 +18,7 @@ dependencies = [
"magiccube==0.3.0",
"pycosat==0.6.6",
"pyfiglet==1.0.2",
"pygame==2.6.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pygame is a larger dependency. Do we have any chance to get rid of it?

@andreaskoepf
Copy link
Contributor

Please add the sokuban solver in the #56 NOTICE.txt issue.

@Miserlou
Copy link
Collaborator Author

Miserlou commented Feb 6, 2025

Addressed comments. Pygame was more integrated into this project than I expected and made hacking it up a bit annoying. If I were to do it again, I'd probably just ask the robot to write it from scratch, though this library did come with a few solving strategies to play with. It's only a 19M dep, not toooo bad at least.

@andreaskoepf
Copy link
Contributor

replaced by #77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants