Open BlacknDecker opened 5 years ago
If you have different ideas feel free to post them here! Just to coordinate: @SinaAzad you can pick the Move Right strategy, @caterinoa you can pick the Random strategy, and i will pick the Coordination strategy!
as we discussed before, was thinking that the random move should be coordinated, a random value of time to right or something, I think that way there would be less chance of collision.
Ok for me!
I think I will try to keep working on the collision prevention without sending or receiving any extra msg, so Will be focusing on using only the distance. I'm not sure if it will work or not, But I'd like to give it a try.
Kilobot Areas
Strategies
1 - Move Right
When a bot enters in the safe area of another bot, start moving right. If it enter in the danger area, it stop and start blinking red.
2 - Random
When a bot enters in the safe area of another bot, choose a random movement. If the movement managed to step it away, keeps moving, otherwise choose another direction. If it enter in the danger area, it stop and start blinking red.
3 - Coordination
When a bot enters the safe area of another, they exchange their IDs. There are 4 possible combinations of movements (with Left and Right turns only). They both have a list of these combinations. The Bot with the higher ID (Master) reads the list and sends the movement to perform to the other bot (Slave). The master tries a combination of moves, if the two bot are getting closer changes the combination, otherwise keeps moving. If the slave enters the danger area, Master stops it and try to move in a direction to step away.