Back in the days of 8-bit machines there existed an educational word game. I have no idea what it was actually called but for the sake of this question (since it involves pyramids) let's call it Stones of Giza.
The game was simple. Starting at the top level, a letter was added to a single letter word and another word was formed. A letter was then added to that word and so on down, each time making a word. The levels went from 3 to 7.
An example of level 3 might be.
A A T B A T Letters: AAABTT
Like the 80s game mastermind, you scored for guessing a letter at a level correctly but more for guessing the position correctly.
It isn't hard to see that the only candidates for the top stone are A, I and O - since these are the only single letter words in the English language.
My question is around algorithms for sourcing game boards. My brute force algorithm currently searches for length N words with one of the 3 letters above and then checks the N-1 length word on the left/right hand side containing the pinnacle letter (A, I or O).
This strikes me as slightly inefficient since there are going to be many false searches.
How can I improve on this raw algorithm? Higher levels are taking quite a long time on a good sized dictionary.
I do of course realise that the 8-bit game probably wasn't parsing the data each time and had a set number of boards but I'm just trying to optimise creating the source data out of curiosity.
I have already filtered out words in the source dictionary that don't contain A, I or O.