iPod Scramble Solution

Solves the Scramble game (like Boggle) by Zynga on my iPod.
101.4K Downloads
Updated 29 Jun 2010

View License

I was playing the game Scramble on my iPod touch, and I realized that I wasn't very good. But the algorithmic challenge of writing a program to solve the Scramble (same as Boggle) game was too tasty to pass up. It was indeed quite challenging, but quite satisfying in the end. The program first obtains a list of legal words ("I didn't know that was a word...") from a text file. Since the letter "Q" is always represented as "Qu", we change the dictionary words to delete the following "U". The user has to input the board as a 25 character array in the top-level program called "word4.m". In order to find the nearest neighbors of each of the letters and the board, I experimented with both single indexing of an array and x-y coordinate indexing of an array. The algorithm finds the nearest neighbor, and then the neighbor of the neighbor to construct character sequences. The character sequences are compared against the word list to see if they are promising, and if not, the character sequence is pruned. Finally, a final word list is generated and sorted by word length.

Cite As

Raj Sodhi (2024). iPod Scramble Solution (https://www.mathworks.com/matlabcentral/fileexchange/28050-ipod-scramble-solution), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Optimization Toolbox in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0