Beta
Swarm bots - swarm intelligence #1
25matt c
Loading description...
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
This comment has been hidden.
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.
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.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.
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! :-)
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.This is really nice kata, it shouldn't be so long in beta. Thanks!
haha, thanks so much but unfortuantly there's not much visibility on this so I doubt it will :(
just do a python version... ;) (or java...)
... please!! ;)
I can try :P
It seems like the
map
function is never called. Are you sure thesetMap
function on Master works correctly? Also, it would be nice to know the implementaiton of Master, unless that's too much of a spoiler?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.
map
isn't a function, it's a setter and the setMap function on the Master does work correctly.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.
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.