Akuukis / RobotColorWars-Minecraft

Project in Lua for OpenComputers to make ColorWars where robots explore, build bases, reproduce and fight with each other.
GNU General Public License v3.0
10 stars 9 forks source link

A* with robots as obstructions #41

Open Nopey opened 8 years ago

Nopey commented 8 years ago

Robots should declare the path they are taking to the entire team of robots, and if two paths collide, (example at bottom) one of them should do an A* for both of them. Example: numbers are Robots, S is space where robots can go. The robots are trying to swap places. 1 S S SS S 2 Using the current navigation library, both robots (assuming they know the map already) will take the straight path to eachother, but block eachother halfway. Using a more advanced A* will make 2 go into the little hidey hole sticking to the right, until 1 passes by. Another possibility, after this is implemented, is to have robots have different urgencies. For example, if 2 needed to be at the frontlines ASAP, it would have a higher multiplier attached to its weight. And so 1 would be pushed into the hideyhole to let 2 pass. Because even though it takes longer, it makes 2 get there quicker.