Pathfinder & Organisms (AI)
by Ruben
As promised, here is the project experiment that I originally wrote the pathfinder algorithm for.
Here's how it works: 'Organisms' (the colored moving squares) are thrown into an infrastructure (a collection of connected points, i.e. the circle/star with connected dots). Each organism is assigned a certain destination-point within the infrastructure and carries with it a pathfinder (a polished version of the algorithm I posted about some time ago).
The pathfinder will figure out which points to travel (trial and error, guessing together a route to the assigned destination, see previous post) in order to reach the destination and will then tell its organism where to go.
When two organisms happen to travel the same connection (line between two points in an infrastructure) they will share and compare their knowledge about several of the paths they have traveled, this is visualised by both organisms becoming semi-transparent.
Comments (read newer or show 3 trackbacks)
Trackbacks:
That’s looking extremely cool Ruben! Great work! Have you thought of any useful ways to put this to use yet?
Ruben. Very cool. I suppose this took you a bit longer to develop than the first post.
@Wietse: Hahaha, thanks man, but no, you know me; use is overrated
Seriously though, this was much more of a personal experiment to polish my skills and gain some knowledge on actually programming AI.
On the other hand, routing-algorithms have actually been applied a great deal, for one thing in navigation-systems (Tom-Tom?), even though my algorithm probably does leave some optimisations to be made..
@Kevin: Thanks! Actually I thought I was done about a week or two ago, then I noticed this bug that had me making modifications for ages
Perhaps I should’ve posted this sooner….but for really awesome pathfinding, you should check out this example I saw a long while back
http://www.electrotank.com/junk/mike/ai/precomputedPathTutorial.html
Its old, but I imagine it’s still very efficient for Flash apps.
Awesome! Thanks Steve