Categories: None [Edit]
castar
## DESCRIPTION:
Ruby interface to a C++ implemention of the A\* search algorithm.
The C++ implementaion is found here
## FEATURES:
## SYNOPSIS:
See `spec\castar_spec.rb` for usage examples.
Create an empty map and plan a path across it:
require 'castar'
include Castar
map = init_map(:width => 4, :height => 3)
astar = HeyesDriver.new(map, HeyesDriver::EIGHT_NEIGHBORS)
astar.run(0,0,3,2)
puts get_map_with_path(astar)
|S|1|1|1|
|1|*|1|1|
|1|1|*|G|
Load a map from a text file and plan a path:
map = load_map('./spec/map_20.txt')
astar = HeyesDriver.new(map, HeyesDriver::EIGHT_NEIGHBORS)
astar.run(0,0,19,19)
puts get_map_with_path(astar)
|S|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|
|1|*|*|*|*|*|1|1|1|1|1|1|1|1|1|1|1|1|1|1|
|1|1|9|9|9|9|*|1|1|1|1|9|9|9|9|9|9|9|9|9|
|1|1|9|9|9|9|1|*|1|1|1|9|9|9|9|9|9|9|9|9|
|1|1|9|9|9|9|1|1|*|1|1|9|9|9|9|9|9|9|9|9|
|1|1|9|9|9|9|1|1|1|*|1|9|9|9|9|9|9|9|9|9|
|1|1|9|9|9|9|1|1|1|1|*|9|9|9|9|9|9|9|9|9|
|1|1|9|9|9|9|1|1|1|1|*|9|9|9|9|9|9|9|9|9|
|1|1|1|1|1|1|1|1|1|1|*|9|9|9|9|9|9|9|9|9|
|1|1|1|1|1|1|1|1|1|1|*|9|9|9|9|9|9|9|9|9|
|1|1|1|1|1|1|1|1|1|1|1|*|1|1|1|1|1|1|1|1|
|1|1|1|1|1|1|1|1|1|1|1|1|*|*|*|*|*|1|1|1|
|1|1|1|1|1|9|9|9|9|9|9|9|9|9|9|9|9|*|1|1|
|1|1|1|1|1|9|9|9|9|9|9|9|9|9|9|9|9|1|*|1|
|1|1|1|1|1|9|9|9|9|9|9|9|9|9|9|9|9|1|1|*|
|1|1|1|1|1|9|9|9|9|9|9|9|9|9|9|9|9|1|1|*|
|1|1|1|1|1|9|9|9|9|9|9|9|9|9|9|9|9|1|1|*|
|1|1|1|1|1|9|9|9|9|9|9|9|9|9|9|9|9|1|1|*|
|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|*|
|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|G|
## REQUIREMENTS:
* Ruby 1.9
* C compiler for C extensions
## DEVELOPMENT
To modify the gem in a cloned repo this is what I'm doing (from root of gem):
bundle install
cd ext/
...
Total
Ranking: 121,091 of 183,707
Downloads: 4,965
Daily
Ranking: 60,975 of 183,695
Downloads: 0
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
Rank | Downloads | Name |
---|
Depends on
Rank | Downloads | Name |
---|---|---|
14 | 953,408,559 | rspec-core |
26 | 828,456,421 | rspec |
Owners
# | Gravatar | Handle |
---|---|---|
1 | jwilde |