Ad
  • Custom User Avatar

    My NASM solution passes Sample and Basic tests, but fails with "Signal code: 11" on Random_Tests_1000_strings_of_65635_char

    If I understand correctly these tests run various 65635-long strings 1000 times? How could I possibly test something like this by myself?

  • Custom User Avatar

    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 :з

  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

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

    (*・‿・)ノ⌒*:・゚✧・゚✧・゚✧・゚✧・゚✧・゚✧・゚✧
                ✧・゚✧magic of coding・゚✧・゚
                ・゚✧・゚✧・゚✧・゚✧・゚✧・゚✧・゚✧
    
  • Custom User Avatar

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

  • Custom User Avatar
    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.

  • Custom User Avatar

    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?

  • Custom User Avatar
    • 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!

  • Custom User Avatar

    Whew! What a nice start of the day :D

    Fixed surrounding and direction (for sure).
    Added in desctiption mentioning of Y axis direction and behaviour when hitting walls.
    Changed view of debug output, so it's clear when your code is executing.

    And again, thank you so much for feedback! 🤩

  • Custom User Avatar

    Yes, I've broken something while fixing other issues :c

    I'll unpublish it untill everything neat and clean

    Thank you!

  • Custom User Avatar

    Fixed surrounding orientation -- now it's natural (y is up). Added mentioning of it in description.

  • Custom User Avatar

    Of course no :D

    I also prefer natural indexing. I've checked direction:

    With constant direction (-1, 0) amoeba moves like this:

    ::::::::::::::::::Start::::::::::::::::::
    . # . . A 
    . # . # . 
    . . . # . 
    . # # # . 
    X . . # . 
    ==============================
    . # . A . 
    . # . # . 
    . . . # . 
    . # # # . 
    X . . # . 
    ==============================
    . # A . . 
    . # . # . 
    . . . # . 
    . # # # . 
    X . . # . 
    

    With constant direction (0, -1) amoeba moves like this:

    ::::::::::::::::::Start::::::::::::::::::
    . # . . A 
    . # . # . 
    . . . # . 
    . # # # . 
    X . . # . 
    ==============================
    . # . . . 
    . # . # A 
    . . . # . 
    . # # # . 
    X . . # . 
    ==============================
    . # . . . 
    . # . # . 
    . . . # A 
    . # # # . 
    X . . # . 
    ==============================
    . # . . . 
    . # . # . 
    . . . # . 
    . # # # A 
    X . . # . 
    ==============================
    . # . . . 
    . # . # . 
    . . . # . 
    . # # # . 
    X . . # A 
    ==============================
    . # . . . 
    . # . # . 
    . . . # . 
    . # # # . 
    X . . # A 
    

    But for surrounding y points down - fixing it.

  • Custom User Avatar

    I've fixed it!
    This problem existed only in fixed maze. Sorry for inconvenience :c

  • Loading more items...