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

sliding puzzle #1237

Merged
merged 11 commits into from
Jun 17, 2023
Merged

sliding puzzle #1237

merged 11 commits into from
Jun 17, 2023

Conversation

kostmo
Copy link
Member

@kostmo kostmo commented May 1, 2023

Note: I put some effort toward a completely general, automated solution, but eventually just reduced the board size to 3x3 and solved it manually, and used the API to obtain the manual commands to paste into the solution:

curl http://localhost:5357/repl/history/full | jq .[].in -r

The board generator is generalized to any square dimension, but some scaffolding must be built to re-use the code across multiple scenarios. The new Sliding Puzzles directory is intended to contain a 3x3, 4x4, and 5x5 puzzle, but currently only contains 3x3.

3x3 board

image

4x4 demo

board

Demo

scripts/play.sh --scenario "data/scenarios/Challenges/Sliding Puzzles/3x3.yaml" --autoplay

@kostmo kostmo force-pushed the fifteen-puzzle branch from b27403d to dc75c38 Compare May 2, 2023 06:45
@byorgey
Copy link
Member

byorgey commented May 4, 2023

You have a bunch of these WIP challenges in the pipeline. I've mostly been ignoring them until you request a review, but would it be helpful to get more feedback along the way?

@kostmo kostmo force-pushed the fifteen-puzzle branch 3 times, most recently from 9e0d040 to c26d8d5 Compare June 3, 2023 04:25
@kostmo kostmo force-pushed the fifteen-puzzle branch 2 times, most recently from 94538dc to a4a6365 Compare June 17, 2023 07:00
@kostmo kostmo marked this pull request as ready for review June 17, 2023 20:11
@kostmo kostmo requested a review from byorgey June 17, 2023 20:11
@kostmo kostmo changed the title [WIP] sliding puzzle sliding puzzle Jun 17, 2023
@kostmo
Copy link
Member Author

kostmo commented Jun 17, 2023

This one is ready!

@kostmo kostmo added the merge me Trigger the merge process of the Pull request. label Jun 17, 2023
@mergify mergify bot merged commit 30e6bd6 into main Jun 17, 2023
@mergify mergify bot deleted the fifteen-puzzle branch June 17, 2023 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Trigger the merge process of the Pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants