Posted 13 March 2013 - 11:29 PM
Hello! This is another topic from me today… I'm sorry.
I am searching for a good algorithm which helps to avoid collisions with multiple turtles moving in the same space. That's for my swarm quarry of course.
There is a master turtle which places all the mining turtles and give them orders and the module turtles controlled by master.
When the turtle is digging hole it's not a problem. All the collisions can occur while turtle is moving to the next mining spot or returning home. I was thinkinig about it a bit, and I have two ideas. First one is not very good - Only one turtle can move to the new place at the same time. It is slow and… too stupid.
Second Idea that I haven't implemented yet is to divide all the area to 4x4x4 cubes. Only one turtle can be inside that cube. Also make a common route between those cubes that all the turtles will follow, so the only thing master should check is whether the turtle is allowed to move to the next cube. The route should cover all the mining area, so turtle can reach any mining spot by following that route. I haven't figured out yet how to make that route. It's a simple zig-zag of course, but first turtles should reach the beginning of that zig-zag.
If someone have another good idea or an advise, I would be glad to read one ^_^/>
I am searching for a good algorithm which helps to avoid collisions with multiple turtles moving in the same space. That's for my swarm quarry of course.
There is a master turtle which places all the mining turtles and give them orders and the module turtles controlled by master.
When the turtle is digging hole it's not a problem. All the collisions can occur while turtle is moving to the next mining spot or returning home. I was thinkinig about it a bit, and I have two ideas. First one is not very good - Only one turtle can move to the new place at the same time. It is slow and… too stupid.
Second Idea that I haven't implemented yet is to divide all the area to 4x4x4 cubes. Only one turtle can be inside that cube. Also make a common route between those cubes that all the turtles will follow, so the only thing master should check is whether the turtle is allowed to move to the next cube. The route should cover all the mining area, so turtle can reach any mining spot by following that route. I haven't figured out yet how to make that route. It's a simple zig-zag of course, but first turtles should reach the beginning of that zig-zag.
If someone have another good idea or an advise, I would be glad to read one ^_^/>