AI Pathfinding (A*)

AI Pathfinding (A*)

Alistair W.
Description
This is my Ruby implementation of the A* algorithm, used for fairly efficient pathfinding across a node network. A cool feature here is the nodes auto-connect based on line of sight! Anyway, click play and watch the red thing find its way... or you can select it, move it somewhere else and watch it pathfind from there. This is another model which had been sitting on my hard drive, so use it in any way you like :) _______________________________________________________________________ For an example of the use of the algorithm, check out the very, very bottom of the main code (in the floor)... the AI class (which is only loosely connected to the red thing) set target method returns an ordered array of nodes in the path which needs to be followed to reach the specified target node. In fact, the AI class can be thought of more as an abstract path-finding system, and I don't see any problem (given a little modification) with having multiple entities using the single instance of it to do their path-finding. #ai #drone #pathfinding #sketchyphysics #skynet #wacov
Category
Default Title