Page 1 of 1

Cooperative Pathfinding

Posted: Sat Mar 22, 2014 6:18 pm
by Fig
Hi,

Cooperative pathfinding allows units of the same team to look "smart". They can pathfind, helping each others. (like units in age of empire for exemple)
They don't need to repath all the time, they don't even dodge each other, they just pathfind in space and time (but no need to be Einstein to understand it !), aware of others. (classic A* uses only space)
You can, of course, select and pathfind several agents at the same time to test...
Image

Image
Commands:
Add/Delete an obstacle [Left clic]
Select an agent/Drag and Drop to select multiples agents [Left clic]
Pathfind to a goal [Right clic]
Add an agent [Space]
Delete Selected Agent [Del]
You can download the test archive here:
http://wordoxhelper.free.fr/Projet%20pathfinding.zip
The file to compile is (of course) Main. (DisableDubugger because I debug a lot of dati=>slowdown)

Known issues: (it's just a test program please don't be too exigent yet, a final version is coming for RTs purpose :wink: )
1- Deadlock possible if you play in a 1 tile large corridor (ie Agents danses to the left and right without stopping)
2- Please do not add agent in front of a current path walked through. (except if you repath by right clicking)
Thank you to remport any comment or bug.

Re: Cooperative Pathfinding

Posted: Sat Mar 22, 2014 7:36 pm
by STARGĂ…TE
interesting, nice example.

Thx for sharing

Re: Cooperative Pathfinding

Posted: Sun Mar 23, 2014 9:08 am
by Fig
You are the lonely person that has an interest in it, so, thanx YOU for testing... :D
I'am not sure others see the "breakthrough" in PB's pathfings field... :?

Re: Cooperative Pathfinding

Posted: Sun Mar 23, 2014 9:10 am
by DK_PETER
You are the lonely person that has an interest in it, so, thanx YOU for testing... :D
Hi Fig.

No, not the only one.
Very nice example.

merci beaucoup ;-)

Re: Cooperative Pathfinding

Posted: Sun Mar 23, 2014 9:16 am
by Fig
Din franske er meget god. Hvordan er Caroline Wozniacki? Hun kalder mig mere ... :mrgreen:

Thx for your feed back, Peter. Did you find, any weird situation or bug in that simulation ?

Re: Cooperative Pathfinding

Posted: Sun Mar 23, 2014 9:32 am
by DK_PETER
Fig wrote:Din franske er meget god. Hvordan er Caroline Wozniacki? Hun kalder mig mere ... :mrgreen:
(Hun har det rigtigt godt. Hun er flyttet til Amerika). :mrgreen:
Thx for your feed back, Peter. Did you find, any weird situation or bug in that simulation ?
Votre langue danoise est bon aussi. :-)

I added several obstacles and there
were no problems avoiding them.

One time, a unit jumped back and forth - but ended up where it should be.
Other than that, I didn't find anything strange.

Furthermore - your code is real easy to understand.

Best regards
Peter

Re: Cooperative Pathfinding

Posted: Sun Mar 23, 2014 2:17 pm
by applePi
very useful, thanks, it is a kind of artificial intelligence program.
one of my possible usage of your code : i imagine a 3D arena with obstacles and the robot will find the correct path.
regards

Re: Cooperative Pathfinding

Posted: Tue Mar 25, 2014 1:50 pm
by Fig
Update: windowed multiple selections, Hpa* (one level deep) for large map.

Re: Cooperative Pathfinding

Posted: Fri Mar 28, 2014 6:19 pm
by idle
thanks for this fig, very interesting

Re: Cooperative Pathfinding

Posted: Fri Mar 28, 2014 6:55 pm
by Fig
Thank you :D
I am still working on to improve it...
It remains a bug, in some case one unit become passable...

Update: improved stability, units pathfinds to the closest location if the goal isn't reachable.