Morpion Solitaire GitHub

koozdra / Morpion (GitHub)

My library is now available. Here are some highlights:

Instantiation

morpion = Morpion2::Morpion.new

Random completion (from any state)

morpion.random_completion

Get the score:

morpion.score

Generating a dna array:

dna = morpion.generate_dna

Evaluating a dna array:

eval_morpion = Morpion2::Morpion.new
eval_morpion.eval_dna dna

For a basic demo take a look at the demo folder for basic.rb. This code will perform a naive search and reset every minute.

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Morpion Solitaire GitHub

  1. Henryk says:

    Thanks, I managed to run the ruby code without a problem on a generic ubuntu 12.04 box. Also I eliminated some bugs from the cpp implementation and now it reaches easily results in the range 140-150, which seems to me a very nice result. Congratulations to you on this simple and effective algorithm. What kind of technics you applied in order to go beyond this 150 limit?

    • Dimitri Tishchenko says:

      Thank you. I’m currently writing a post about my current search algorithm. When I post it (shouldn’t be too long) I will post the code code also.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s