• Hi,

    just actually put the fixed tests in the sample tests. No user will try to debug their code with random parameters in the sample tests, expecially because the user doesn't know what your function helper is doing exactly. So actual fixed test are way more useful.

  • Okay :c
    It's not first Shell kata with same problem for me – optimization
    Will unlock solutions then, maybe I don't know some crucial tools for such problems
    Thank you for kata, I really enjoyed it :з

  • Sorry, the time out is fixed by CW. Furthermore I can't reduce the tests when some people are timing out...
    11 people passed the Shell kata so it's doable in the given time. There is a solution that takes 1275 ms and there are some below 2000 ms. Cheers.

  • This comment is hidden because it contains spoiler information about the solution

  • Wow! Because of this even legit but not optimal solutions are invalidated!

    (*・‿・)ノ⌒*:・゚✧・゚✧・゚✧・゚✧・゚✧・゚✧・゚✧
                ✧・゚✧magic of coding・゚✧・゚
                ・゚✧・゚✧・゚✧・゚✧・゚✧・゚✧・゚✧
    
  • This comment is hidden because it contains spoiler information about the solution

    1. Added postmortem log. Looks like this:
    Amoeba died from starvation :c
    ~~~~~~HELP IN DEBUGGING~~~~~~
    
    You've reached maximum amount of iterations: 20
    Here is how maze looked like at start:
    52 58 64 || :: 
    46 || 70 || 94 
    40 || 76 82 88 
    34 || || || || 
    ~* 22 16 10 04 
    Here is how it looks at the end:
    52 58 64 || :: 
    46 || 70 || 94 
    40 || 76 82 88 
    34 || || || || 
    ~* 22 16 10 04 
    You could debug this maze by putting following list in "maze" parameter in test_amoeba_brain():
    [[0, 0, 0, 1, 3], [0, 1, 0, 1, 0], [0, 1, 0, 0, 0], [0, 1, 1, 1, 1], [2, 0, 0, 0, 0]]
    
    1. Now user able to provide maze map that looks like this:
    maze = [
        [0, 0, 3],
        [0, 1, 1],
        [0, 1, 2]
    ]
    # 0 - empty, 1, wall, 2 -amoeba, 3 - food
    

    More than this - user can copy-paste initial maze structure from postmortem log and try it in sample test.

    Added all this in the description of kata.

  • The fixed tests and random tests are currently very unhelpful in debugging, they might as well not exist. At least these two things are needed:

    1. If a random test failed, print out the initial maze state.
    2. Change the sample test setup: it should receive a map and use that map as the initial state. Currently it's impossible to even know what map is being tested because it's hidden inside the opaque function.
  • Needs more random tests, or at least better fixed/random tests: solutions like this sometimes pass the random tests.

  • Someone tried to complete this kata in Bash? O_o

    My code looks pretty efficient, but Bash isn't supposed to compute LARGE prime numbers - it's pretty slow for such tasks. My solution fails on 5'th basic test because of timeout.

    For 6 kyu kata I need to implement some clever algorithm to check on various prime numbers properties, huh?

    • added parameter size_of_maze into test_amoeba_brain_fixed_maze(), so user could try different sizes (from 3 to 50)
    • added print for fixed tests of full suite: there are 5 of them 5x5 - 25x25. Won't add higher sizes because print will be too huge
    • removed test_amoeba_brain_random_maze() method from sample tests

    Thanks!

    • more sample tests would be good (typically, you could put all the fixed tests of the full test suite in there)
    • an option to be able to print the maze in the fixed tests of the full test suite would be good too, (for those that aren't in the sample tests, if any)
    • you should remove the random thing in the sample test. It's supposed to be a basic debugging tool, so nobody wants something random there

    'later ;o

  • Loading more items...