Skip to content

Demonstrandum/A-Star

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A-Star

A* path finding algorithm for images, in Ruby.

Solved maze image.

Installation

First install the gem, either online:

gem install a-star

or build it from source: Clone and enter repository:

git clone https://github.com/Demonstrandum/A-Star.git && cd A-Star
gem build a-star.gemspec
gem install a-star-*

Usage

To run the program itself:

a-star ~/Pictures/yourImage.png

This will solve the maze and make and image with the suffix "-solved"
e.g. yourImage-solved.png in the same location as the input image.

Maze PNG requirements

The start and end points of the maze must be from top to bottom.
It's highly recommended that the maze's walls and paths are 1 pixel wide as the program draws and reads the paths as one pixel.