You have two choices:
- Write a custom solver
- Brute force it.
I used option (2) to generate Boggle type boards and it is VERY successful. If you go with Option (2), this is how you do it:
Tools needed:
- Write a A* solver.
- Write a random board creator
To solve:
- Generate a random board consisting of only endpoints
- while board is not solved:
- get two endpoints closest to each other that are not yet solved
- run A* to generate path
- update board so next A* knows new board layout with new path marked as un-traversable.
- At exit of loop, check success/fail (is whole board used/etc) and run again if needed
The A* on a 10x10 should run in hundredths of a second. You can probably solve 1k+ boards/second. So a 10 second run should get you several 'usable' boards.
Bonus points:
- When generating levels for a IAP (in app purchase) level pack, remember to check for mirrors/rotations/reflections/etc so you don't have one board a copy of another (which is just lame).
- Come up with a metric that will figure out if two boards are 'similar' and if so, ditch one of them.