Weird Collision


#1

Can anyone explain why this happens


#2

im seeing these collisions all day now… any fix?


#3

Could you link to a game where this happens?


#4

I have the same problem while testing the bot against itself (haven’t submitted it yet). Ship A moves west (empty box) ship b moves south where ship A used to be and they collide somehow. But it doesn’t happen everytime so it has to be a bug.


#5

What’s happening is that the ship in front tries to move but fails due to the movement cost (10% of halite on the ground) but the official visualiser does not take this into account and shows movement whether it really happened or not.


#6

Good call @fohristiwhirl I can confirm this solved my problem.


#7

Yeah it was exactly that, found after scratching my head for hours :3


#8

Literally need to check all the bots first to see if they satisfy the condition to move then do your move.


#9

Hey everyone,

I am creating an alternative to naive_navigate() that, for every ship I have,adds the location it wants to travel to to a future_pos list. If the location is already taken from another ship it looks for a new direction to avoid a collision. However if a ship with not enough halite has to take a new direction, because its cardinal is already in the future_pos list, It can not change its position. I can not think of a way to solve this problem, but I am sure there is a solution. I would really appreciate if anyone could hint me in the right direction.


#10

So the way I would think about this is that your ship doesn’t have enough halite to move. If that ship wants to go in any direction it simply cannot because the cost of moving is dependent on the square it is on. In my code any ship that doesn’t have enough halite to move is not allowed to try to move and the square it is on is marked as occupied and no ship can try to make it move.

Hope that helps!


#11

It did help!
Sometimes you need a second person to lead you in a new direction…thank you very much:)