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 older or newer, or show 3 trackbacks)
Trackbacks:
Btw, you can very easily improve the algorithm by not choosing the next node randomly but simply checking all possible routes (avoiding nodes you already visited). This is called the breadth-first search and it’s useful for situations in which the distance (or cost) between two nodes is not important, e.g. in this case it would work because most paths are quite similar in length. It will find the route with the least number of nodes between the start and the end.
Or, you could demonstrate natural selection by using a random algorithm but somehow penalizing the organisms with the worst routes. That would keep the project in the “interesting” territory. I wanted to post a link to another Flash applet that had flying rockets that steadily improved their trajectories thanks to NS but couldn’t find the link.:)
Wow. That is very clever. I like anything to do with Ai in computer programming, but this is very clever because it is so simple. If that can be done by a student in their free time, then why aren’t the multimillion pound/dollar companies closer to real AI?
Anyway. Good luck with university.
My main question is why?
I will admit that it is quite graphically pleasing, but the entire concept is flawed.
You have essentially reinvented the path finding wheel in an extremely poor and inefficient way, and tossed some graphical polish on it.
Your original algorithm is brutally inefficient, and takes incredible amounts of processing power to find the simplest paths. Even a naive breadth/depth first search will find an *optimal solution* in fractions of the time your method takes. Something like A*, Cooperative A* or some of the more interesting variations are more efficient, generate better and more natural looking paths, and can even share knowledge across all agents for interesting emergent behavior.
You have created a random trial and error solution (Not even following a set of permutations, so you may repeat failed solutions) that outputs garbage twisted paths after beating its head against the problem randomly for an excessive amount of time.
that pretty cool
(first)
In response to “Ryan”…so he has duplicated the human experience…and don’t be a snobby grabastic mathematical bitch. Provide a solution or shove a banana in that pie hole you dumbass.