good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Challenge: Box Blackoutby traveler (Parson) |
on Jan 24, 2006 at 00:09 UTC ( [id://525086]=note: print w/replies, xml ) | Need Help?? |
Great game. My first thought at a solution would be a classic inverse backtrack: start with a full board and work backward.
Note that boards with just one piece missing are solutions (not optimal!) and so are all predecessors to a full board in a path such as you show. So, working back from boards with one empty square (each of the N*N possibilities) one can find optimal starting points (which will be a symmetric family). If I were still teaching advanced programming, I would probably use this game. --traveler
In Section
Seekers of Perl Wisdom
|
|