class AntColony::CLI
Public Instance Methods
solve(file, point)
click to toggle source
# File lib/ant_colony/cli.rb, line 14 def solve(file, point) params = options.map { |k, v| [k.to_sym, v] }.to_h graph = YAML.load_file(file) colony = AntColony::Colony.new(graph, **params) colony.solve $stdout.puts colony.find_path(point.to_i) end