Help for this page

Select Code to Download


  1. or download this
    use strict;
    my @slots;
    ...
    sub build_hash {
      $rlookup{$slots[$_]} = $_ for (0..$max);
    }
    
  2. or download this
    0 2 3 7 6 4 10 5 8 9 1  $empty: 0  move(1, 0);
    2 0 3 7 6 4 10 5 8 9 1  $empty: 1  move(10, 1);
    ...
    Average Moves: 9.33333333333333
    Minimum Moves: 8
    Maximum Moves: 11