Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
raise ValueError('puzzle is unsolvable')
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!
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.
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.
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 :)
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
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.
ok. thank you!
this is my first kata :)
Looks good. I made a small tweak to the tests, if you don't mind, and approved :)
i fix problem with empy output.
also random generate now twice as fast
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...
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
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
.
Loading more items...