There is this game inspired by Boggle about solving grid word puzzles where the letters of several secret words are placed seemingly randomly on a grid, but each word's letters are chained, the user being able to trace each word with a continuous line without taking the finger off screen. So the next letter in one word is neighbouring the preceding letter (either on N-W-S-E or on the diagonals).
For instance, for the words WORD and BRAIN, a puzzle grid could be:
D A B
R R I
W O N
where to spell "WORD" you'd start from W, move east to O, then northwest to R, then north to D
D
R
W O
and, to spell 'BRAIN', you'd start from the B, then go southwest to the center R, then north to A, southeast to I and finally south to N.
A B
R I
N
This is like reversed boggle, where only the puzzle's "secret" words are used in the grid, with no extra letters (except, depending on the number of letters in the words, some filler "white tiles" - which we can ignore for the sake of the question).
I have read the other postsĀ about algorithms for solving this kind of game, but my question is, instead, on how I could go about to generate such puzzles - solvable shuffled grids with only letters from my initial words.
I guess I could start with the trivial case of simply writing the words in sequence, rotating the letter matrix and/or making some simple cell permutations (swapping cells on two neighbouring lines / columns in order for the word to 'zig zag'.
But I was wondering if there's a generating algorithm I could use (other than brute force randomly shuffling letters around until I find one particular grid that's solvable).