--9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Here's my solution. It starts in the middle of the board and hops to one of the next spaces that has a large amount of moves that can be made from there. It's not all that fast though, I didn't really spend too much time optimizing. Mitchell Koch --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="penandpaper.rb" #!/usr/bin/env ruby # Pen and Paper class PenAndPaper MOVES :n Proc.new { |x,y| [x,y-3] }, :ne Proc.new { |x,y| [x+2,y-2] }, :e Proc.new { |x,y| [x+3,y] }, :se Proc.new { |x,y| [x+2,y+2] }, :s Proc.new { |x,y| [x,y+3] }, :sw Proc.new { |x,y| [x-2,y+2] }, :w Proc.new { |x,y| [x-3,y] }, :nw Proc.new { |x,y| [x-2,y-2] } } def initialize(n) @n end def solve(method ookfill) begin $stderr.print '.' @board oard.new(@n) @count send(method) end until @board.complete? $stderr.puts @board end def randfill move(rand(@n),rand(@n)) until valid_moves.empty? dir alid_moves.sort_by{rand}.first move(*new_pos(@pos, dir)) end end def lookfill move(@n/2, @n/2) until valid_moves.empty? dir alid_moves.sort_by{rand}.sort do |a,b| valid_moves(new_pos(@pos,a)).size <