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.
I hid this solution. Do not submit solutions like this one (do not even try it in the trainer to avoid accidental submissions). If you want to experiment, create a fork of an existing solution.
I didn't think this was possible, how can I delete this solution?
Quite an interesting kata, well done.
thank you!
This kata inspired me to make Mate with King & Queen
In python I wrote up a solution however very occasionally it would fail some random tests for example:
a = 40 b = 47 c = 4 -1.18 should equal -1.17
I think there is something wrong in the reference solution when testing the random cases because
-47/40 = -1.175 and if you round this to 2dp it will be -1.18
Personally I think this is more difficult than kyu 6, but a fun problem nonetheless :)
This comment is hidden because it contains spoiler information about the solution
Are the tests for Python confirmed to be correct now? I wrote a fairly compact solution that used some techniques to simplify the algorithm giving me a lot of confidence in it, and I got all the tests correct except for one of the edge cases. I tested my program on every stalemate and checkmate position in the Wikipedia article, and got them all correct. I investigated my algorithm carefully and included some tests that wouldn't come up in a real game, such as a starting position with both kings in check from the other king and my program behaves what I think is correctly in those cases. I still don't get that one edge case.
feels like a 5 kyu because you need to track and manage a lot of state
I have same problem.
"Checkmate (often shortened to mate) is any game position in chess and other chess-like games in which a player's king is in check (threatened with capture) and there is no possible escape."
Where's the catch?
nice kata :)
but you definitely shouldn't...
Why? you can use BFS to search in matrix minimum path
Thank you for the solution, I will try it. Ah yes, I forgot to provide the spoiler flag.
Loading more items...