This is fantastic! I've often wondered how many possible words there are in any given grid. The
web interface is much better than the last time I tried one, very speedy response after the
initial load. And even that is much better than it used to be.
I'll grab the stack next. Cool.
On 1/2/22 5:42 PM, Alex Tweedly via use-livecode wrote:
I've put a little 'game' up on "sample stacks", and also on the web.
It "solves" Boggle style puzzles, i.e. you give it a 5x5 grid of letters, and it finds all
words within it, following the prescribed rules - words are formed by moving to adjacent
(including diagonal) grid positions, and you cannot re-use a grid position within a word. You
can modify the input field, and click on "Solve it" to see the new results.
The list of words is that used by Jacqueline in her JQBoggle game.
The UI is very basic - but there is one clever (I think) thing within it. It uses a dictionary
of words which is a hierarchical character-by-character array, so it represents not only "what
is a word" but also "what can be the initial substring of a word", and therefore it can prune
the search tree immediately. This takes the time to solve a puzzle down from approx 10 - 50
minutes using a simple dictionary, to around 40 millisecs.
NB I have also built a Web-based standalone version of it using 10.0.0 (dp1), which can be
found at
https://www.tweedly.org/BoggleSolver/BoggleSolver.html
Note - the "Load URL ..." portion does not yet work in the web version. Loading is fairly slow,
but the run times re (IMHO) impressive - 80msecs against the 40msecs or so running in the IDE.
I am very impressed by the performance of this early web implementation.
Having a 'solver' like this opens up possible new games such as:
1. given we have 25 grid positions, and 25 letters (omitting 'Q'), what arrangement of letters
gives the most, or least, words.
2. given a random selection of letters, what arrangement gives most/least words.
3. (a 2-player game) given an arrangement of letters, change one letter and increase the number
of words that can be formed; score the value of the increase (or decrease), playing
alternately, until neither player can get a positive score change.
Alex.
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode