• ###### grigrcommented on "Hard Sudoku Solver" kata

raise ValueError('puzzle is unsolvable')

• ###### grigrcommented on "Hard Sudoku Solver" kata

Very interest Kata :) Thank you
luckily i found the right method. my algorithm solved everything in 6 seconds, only on one Sudoku from your set it was required to take 1 step back.
also my algorithm solved in 2 seconds "the most difficult sudoku in the world" by taking 14 steps back. I'm glad that my program coped with it!

• ###### grigrcommented on "Sokoban re-solver : level recovery from solution" kata

my algorithm restores the level so that you don't have to remove extra walls. but I knew that someone will face this problem.
you can make an additional algorithm for filling empty spaces to remove extra walls. or rebuild the logic of your algorithm.

when I created the kata, I suggested rank 4. but those who decided it first changed to level 5. Apparently for some this is a very simple task.

• ###### Davo36commented on "Sokoban re-solver : level recovery from solution" kata

Man, I must be looking at this one strangely. I can get the level, but the border around the outside is very difficult to do. Seems like a level 3 kata to me. Must be missing something.

• ###### grigrcommented on "Sokoban re-solver : level recovery from solution" kata

i wrote a simple soko-solver. it works with brute-force.
unfortunately it is still very slow. if I manage to optimize it, it will probably be a great kata :)

• ###### grigrcommented on "Sokoban re-solver : level recovery from solution" kata

Thank you!
I thought about it. but I didn't know how to do it right...
I also need adjust the coefficients for levels 50 * 50 so that there is less empty space

• ###### Avantacommented on "Sokoban re-solver : level recovery from solution" kata

No problem. I just noticed that the assertion messages for an incorrect solution are very ugly and hard to see for the user.

I made a fork that should improve the messages: https://www.codewars.com/kumite/631f2a5d8e714f0062cd5497?sel=631f2a5d8e714f0062cd5497, if you wouldn't mind checking and approving it.

• ###### grigrcommented on "Sokoban re-solver : level recovery from solution" kata

ok. thank you!
this is my first kata :)

• ###### Avantacommented on "Sokoban re-solver : level recovery from solution" kata

Looks good. I made a small tweak to the tests, if you don't mind, and approved :)

• ###### grigrresolved an issue on "Sokoban re-solver : level recovery from solution" kata

i fix problem with empy output.
also random generate now twice as fast

• ###### grigrcommented on "Sokoban re-solver : level recovery from solution" kata

I agree with you. i saw this error so i run the generate loop multiple times. this is a strange behavior of the random number generator.
because of this, the function is slow. I will try to fix it soon...

• ###### Avantacreated an issue for "Sokoban re-solver : level recovery from solution" kata

Hi again, your random test generator can very occasionally generate an empty string for the input. Eg. for a 6x6 grid, around 1 in 10 generate an input as an empty string. However, this chance does decrease as you increase the grid size so it's very rare for it to happen in the random tests.

Also, this isn't so much as issue, but could you be able to make the random test generator any faster. It's currently quite slow :P

• ###### grigrcommented on "Sokoban re-solver : level recovery from solution" kata

after I added random level generation, three solutions became "invalidated". apparently they run again after adding new tests.

I was also interested in a new problem for solving small levels. maybe I'll do it...

done

.