Class: Newral::Graphs::AStar

Inherits:
TreeSearch show all
Defined in:
lib/newral/graphs/a_star.rb

Instance Attribute Summary

Attributes inherited from TreeSearch

#frontier

Instance Method Summary collapse

Methods inherited from TreeSearch

#initialize, #remove_choice, #run

Constructor Details

This class inherits a constructor from Newral::Graphs::TreeSearch

Instance Method Details

#measure(path) ⇒ Object



6
7
8
# File 'lib/newral/graphs/a_star.rb', line 6

def measure( path  )
   path.cost + Newral::Tools.euclidian_distance( @end_node.location, path.end_node.location )
end