Exploring Ruby

Exploring Ruby

Ruby is a nice little language that I have begun exploring. Mainly to get a break from Java, which I'm a bit tired of after having spent most of the recent half year working on DKP Log Parser and related projects.

To get used to Ruby I have implemented a command-based version of the 15-puzzle. It went quite painless and the result has been uploaded to miscellaneous Ruby. The project will host various minor test-programs, just like all the other "miscellaneous <language name>" projects. I'm looking to make the following improvements to the currently uploaded implementation:

  • Make it a generalized N-puzzle.
  • Create a better initial state generator. It currently just takes the completed state and then applies random operations to it rather than directly creating a random solvable state.
  • Create a solver (not optimal though, because that's NP-hard).