# \#60 Numeric Maze

**URL:** <https://www.ruby-forum.com/t/60-numeric-maze/56027>\
**Category:** Ruby\
**Created:** [January 3, 2006, 4:48am UTC](https://www.ruby-forum.com/t/60-numeric-maze/56027 "2006-01-03T04:48:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [January 3, 2006, 4:48am UTC](https://www.ruby-forum.com/t/60-numeric-maze/56027/1 "2006-01-03T04:48:23Z")

</div>

I used dijkstra again for this quiz, which is fine for the short paths,  
but you really need to be pulling out that bitwise magic for those long  
paths.

> **[iiNet Members Webspace End of Life | iiHelp](https://help.iinet.net.au/iinet-members-webspace-end-life)**
>
> The iiNet Members Webspace service has reached End of Life.

> **[iiNet Members Webspace End of Life | iiHelp](https://help.iinet.net.au/iinet-members-webspace-end-life)**
>
> The iiNet Members Webspace service has reached End of Life.

That dijkstra.rb is a big improvement over the one I last used in a quiz  
(don’t remember which one that was). My old library only worked if the  
each\_neighbours function was symmetrical, and had a bunch of other  
inefficiencies. I also included a new SimpleDijkstra module for  
situations where distances between nodes are uniform (ie. most of these  
types of puzzles).

I also made an implementation using Brian Schroeder’s PriorityQueue  
library ([http://ruby.brian-schroeder.de/priority-queue/](http://ruby.brian-schroeder.de/priority-queue/)), but for some  
reason that ended up being even slower. I haven’t looked into whether  
that was my fault yet, but I’m assuming it is:

[iiNet Members Webspace End of Life | iiHelp](http://members.iinet.net.au/~soxbox/ruby_quiz_60/quiz_60_priority_queue).  
rb

#####################################################################################  
This e-mail message has been scanned for Viruses and Content and cleared  
by NetIQ MailMarshal  
#####################################################################################
