Image1 represents the problem perfectly and shows the freedom of motion the robot is capable of.
Square-> Origin, Circle-> Destination.
These are two robots that will be working simultaneously. How to guide these robots without deadlocking each other and if anyone of them should move first, then how to choose which one.
(the above case is just an example, I know in this case we can stop anyone of them randomly and get away with it, but I'm looking for a generalized solution. Nearest Neighbour approach is forbidden.) NOTE: the robot cannot move across except for the upper and lower rows.
I have a dict of all the X marked points and also the routes for it in both ids and coordinates below,
# X generated points
{1: [0, 0], 2: [0, 30], 3: [0, 60], 4: [0, 90], 5: [30, 0], 6: [30, 30], 7: [30, 60], 8: [30, 90], 9: [60, 0], 10: [60, 30], 11: [60, 60], 12: [60, 90], 13: [90, 0], 14: [90, 30], 15: [90, 60], 16: [90, 90]}
# Routes:
red=[11,12,8,4]
blue=[7,8,12,6]