title: Which algorithm would fit best to solve a word-search game like "Boggle" with Python
body: <p>I'm coding a game similar to <a href="http://en.wikipedia.org/wiki/Boggle" rel="nofollow">Boggle</a> where the gamer should find words inside a big string made of random letters.</p>
  
  <p>For example, there are five arrays with strings inside like this. Five rows, made of six letters each one :</p>
  
  <pre><code>AMSDNS
  MASDOM
  ASDAAS
  DSMMMS
  OAKSDO
  </code></pre>
  
  <p>So, the users of the game should make words using the letters available with the following restrictions and rules in mind:</p>
  
  <ul>
  <li>Its not possible to repeat the same letter to make a word. Im talking about the "physical" letter, in the game that is a dice. Its not possible to use the same dice twice or more to make the word.</li>
  <li>Its not possible to "jump" any letter to make a word. The letters that make the word must be contiguous.</li>
  <li>The user is able to move in any direction she wants without any restriction further than the two mentioned above. So its possible to go to the top, then bottom, then to the right, then top again, and so on. So the movements to look for words might be somehow erratic.</li>
  </ul>
  
  <p>I want to know how to go through all the strings to make words. To know the words Im gonna use a txt file with words.</p>
  
  <p>I don't know how to design an algorithm that is able to perform the search, specially thinking about the erratic movements that are needed to find the words and respecting the restrictions, too.</p>
  
  <p>I already implemented the UX, the logic to throw the dice and fill the boardgame, and all the logic for the six-letters dice.</p>
  
  <p>But this part its not easy, and I would like to read your suggestions to this interesting challenge.</p>
  
  <p>Im using Python for this game because is the language I use to code and the language that I like the most. But an explanation or suggestion of an algorithm itself, should be nice too, independently of the language.</p>