Beta

Swarm bots - swarm intelligence #1

Description
Loading description...
Fundamentals
  • Please sign in or sign up to leave a comment.
  • Voile Avatar

    This comment has been hidden.

  • Abbe Avatar

    I really like this kata and would like to see it out of beta. However, there are three issues as I see it. Some have been stated before in previous comments.

    1. The directions are unexpected. X is modified with up/down and y with left/right. Most people would probably assume that x is horisontal (right-to-left) and y vertical (down-to-up if you're into maths and up-to-down if you're into computer graphics). The same things go for the map. In most similar exercises, the map array is normally something along [[(x0-y0), (x1-y0)...],[(x0-y1), (x1-y1)...]...] (first element is the y=0 row, second y=1, etc). Here it is a turned around with x=0 being the first element. Whatever way you choose, it would help greatly to specify it in the description or give an example showing how it is meant to be.

    2. Bots are allowed to collide. The kata solution is avoiding this. If the intention to disregard collisions (maybe they are at different height), it should be stated in the description, if not, it should be checked by the test cases. This is really important for the difficulty rating of the kata.

    3. This is more of a cosmetic issue. I am okay with ignoring it. Right now, move gets an undocumented argument with a map over the current bot positions. It essentially means that you could ignore the position given in the constructor and just check in this map. It would also be a big help if you start caring about collisions. As it is right now, you don't need to use it at all.

    Please let me know if you want help with the last details. It would be a shame to let a good kata stay in beta because you're busy at the moment! :-)

  • monadius Avatar

    Tests of this kata must be improved. Otherwise it can be completed with a trivial solution. The description must be improved as well: It is important to state all rules in the description. Also, it seems like the function move has an argument which is not described and not in the solution setup.

  • kontic Avatar

    This is really nice kata, it shouldn't be so long in beta. Thanks!

  • jasonwyatt Avatar

    It seems like the map function is never called. Are you sure the setMap function on Master works correctly? Also, it would be nice to know the implementaiton of Master, unless that's too much of a spoiler?

    • matt c Avatar

      i'll have a look again and see what's happening but the implementation of the Master is not important, it just checks collisions and checks whether the bots are in their final state or not.

    • matt c Avatar

      map isn't a function, it's a setter and the setMap function on the Master does work correctly.

      Issue marked resolved by matt c 9 years ago
    • Austin Haws Avatar

      console.log(Master.toString()) - unfortunately this approach only gave partial results for the sloth.

      I started on this Kata because it looks like an awesome challenge. From the get go it's been a struggle. I did a clean reset and pressed "run tests" and it gets the error "bots[key].bot.move is not a function". I added a "move: function () {" to the returned object and it now gets errors from the sloth about index 0 being invalid. It'd be nice if the initial setup would run and give Test failed results.

      You mentoined collisions but the instructions don't talk about that. What does that mean? collisions with other bots?

      How does a bot know the boundaries in which it can randomly move if it doesn't yet have a map? does "return 's';" satisfy random movement? ;)

      This is an awesome idea; I'd love to dig in to more of it.

    • matt c Avatar

      I've fixed that initial problem where a move was not returned. The Master class handles the collisions between other bots and the boundaries, to make sure you're not cheating. The bot knows the boundaries by the set map method where a map will be given showing the position of each bot and the goal.