|
|
| File Information |
| Description |
For the puzzle, see here: http://blogs.mathworks.com/videos/2009/07/28/puzzler-rules-of-the-new-game/
I have chosen for a flexible setup, the basic principle is this:
1. generate all possible boards for a number ('lookAheadMoves') of moves ahead.
2. use some criteria ('rankBoardMethod') to rank all possible outcomes
3. adjust the board with a number ('maxNewMoves') of the moves that lead to the highest ranked outcome
4. continue 1 to 3 until board is solved or maximum moves is reached
you can play around with the number of alternative boards created, and with the ranking method. If the number of alternative boards is very high, the algorithm is guaranteed to find the optimal solution. With a large number of colours (options) and a large board this becomes computationally infeasible.
see comments for examples |
| Required Products |
Image Processing Toolbox
|
| MATLAB release |
MATLAB 7.5 (R2007b)
|
| Zip File Content |
|
| Other Files |
license.txt, main.m
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Tag Activity for this File |
| Tag |
Applied By |
Date/Time |
| imdilate |
T |
05 Aug 2009 11:40:05 |
| bwlabel |
T |
05 Aug 2009 11:40:05 |
| labpixies |
T |
05 Aug 2009 11:40:05 |
| flood |
T |
05 Aug 2009 11:40:05 |
| puzzler |
T |
10 Aug 2009 03:27:42 |
|
MATLAB Central Terms of Use
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.
Contact us at files@mathworks.com