N-puzzle uploaded

N-puzzle uploaded

I have now uploaded an n-puzzle implementation in Ruby that includes the items I were talking about in a previous news entry.

The solver is not especially good yet though. I did not want to give the computer a specific algorithm, as that would be boring. Instead I implemented the A* search algorithm to let the computer find a solution itself. It solves 3x3 puzzles without a problem, but 4x4 is usually too large for it. I have begun experimenting with giving it hints of what it could do (e.g. concentrate on solving the first row/column and then solve the resulting subproblem) but it hasn't been especially successful yet.

In any case I feel that I have gotten my feet wet when it comes to Ruby and that I might use it "for real" in some future project.