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

Level 15 solution in 16 moves vs 17 #5

Open
MarkvanderPol opened this issue Sep 8, 2016 · 1 comment
Open

Level 15 solution in 16 moves vs 17 #5

MarkvanderPol opened this issue Sep 8, 2016 · 1 comment

Comments

@MarkvanderPol
Copy link

Not sure is this is the correct place to raise this, but I solve this level in 16.
I also don't know the nomenclature to capture the moves, or where in the code to update the best move data. And if it is a solver, how to go about teaching it whatever it is it missed.
Mark.

@t-mon
Copy link
Owner

t-mon commented Sep 9, 2016

Hello Mark, yes in very few levels my solving algorithm needed one move more. Theoretically the solving algorithm (https://en.wikipedia.org/wiki/A*_search_algorithm) should always find the best solution, but it looks like I have/had a little mistake in the first levels when I created them. So I made sure the level will be marked as "solved perfect" even if you took less moves than the calculated optimum.

The solution is saved in the level file: https://github.com/t-mon/swipeout/blob/master/data/levels/Easy/level-15.json#L84

A solution step in not very "human readable", since it is created automatically and I tried to minimize the data (save storage). The solution is a sorted list of steps, where only the delta of each block will saved: negative delta -> up/left, positive delta -> down/right, depending on the orientation of one block. I'll take a look at the level :)

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

No branches or pull requests

2 participants