Project

mazemap

0.0
No commit activity in last 3 years
No release in over 3 years
Runs Wavefront algorithm to find the shortest path from A to B
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 11.3
~> 3.5
~> 0.9

Runtime

 Project Readme

Mazemap Pathfinder

Mazemap allows you to search for the shortest path in the given 2D map(check spec/fixtures/files/maze.txt for examples)

Mazemap has built-in command line tool
So after the gem installation you can just type
bundle exec mazemap maze.txt
to execute a search

https://rubygems.org/gems/mazemap

Docs

To generate the docs you need to checkout this repo
git clone https://github.com/leafmind/mazemap.git
cd mazemap then
bundle install
then
yard doc

Usage

Gemfile
gem 'mazemap', github: 'leafmind/mazemap'

bundle install

In your code:
Mazemap.read_and_search(filename)

Also you can use mazemap command line tool:
bundle exec mazemap maze.txt

Maze file format example

* - obstacle
(space) - free cell
A - start cell
B - finish cell

******************************************
*               ******            ***    *
*   ***   ***   ******      * B   ***    *
*   ***   ***   ******     ***           *
*   ***                   *****   ***    *
*   *********             *****   ***    *
*   *******      ****      ***    ***    *
*               ******                   *
*     ***        ****       **********   *
*     ***                  ***********   *
*     *******             ************   *
*     *******    ****                    *
*      A         ****               ******
******************************************

Known issues on MAC OS X
SciRuby/nmatrix#426

Workaround
SciRuby/nmatrix#426 (comment)