Ad
  • Custom User Avatar

    Thank you for your quick responses, the option flush=True works.

    I am also thinking that it hits an infinite loop, that is why I wanted to print out the cases. Now I can see them. Thanks again.

  • Custom User Avatar

    Hi, I have a weird problem with the Kata. I am solving it in Python.

    I wrote a solution which passes on average 490/500 random tests and fails on around 10. Execution time is around 3500 ms.

    I printed out the random matrices from one trial where it did fail and found which case my algorithm was missing.

    I corrected it by literally adding one "if" statement. I checked the timing on my local machine and it barely changes the execution time and works well on all the cases where it previously failed.

    However, now that I try to run it on CW I get Execution Timed Out. What I find really confusing is that now it says "Passed: 0" and when I try to print something to the console it does not show at all. Is this the standard behaviour when "Execution Timed Out?"

    I will try a different algorithm for solving the kata but I am just curious about what is going on.

  • Custom User Avatar

    Just to be sure... am I right that we should expand the board with black squares? Sounds a bit unintuitive to me.
    Great idea, however, I have a lot of fun coding it.

    Edit: OK, I got it, my assumption was right. Awesoma kata!

  • Custom User Avatar

    I actually even get "WON!" printed out in the log. And the result is equal 4 blacks. But it does not pass the test.
    Iteration number is usually around 6-7 guesses.

    EDIT: I managed to find the way but this was quite tedious for me to exactly understand what was meant.