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: 122,661 of 189,816
Downloads: 5,460
Daily
Ranking: 76,438 of 189,791
Downloads: 1
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 |
|---|---|---|
| 20 | 1,111,611,671 | rspec-core |
| 29 | 953,230,964 | rspec |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | jwilde |