User:FLEM/Crosswords

From XPUB & Lens-Based wiki


.experiments

08.02.2022

screenshotcrosswords1

there must be a way to put a dot or something at the end of words!


Create a grid of whatever size and a list of words.

Shuffle the word list, and then sort the words by longest to shortest.

Place the first and longest word at the upper left most position, 1,1 (vertical or horizontal).

Move onto next word, loop over each letter in the word and each cell in the grid looking for letter to letter matches.

When a match is found, simply add that position to a suggested coordinate list for that word.

Loop over the suggested coordinate list and "score" the word placement based on how many other words it crosses. Scores of 0 indicate either bad placement (adjacent to existing

words) or that there were no word crosses.

Back to step #4 until word list is exhausted.


think about sudoku - check mechanism of backtracing

10.02.2022

.bibliography

https://medium.com/@vanacorec/backtracking-and-crossword-puzzles-4abe195166f9

https://en.wikipedia.org/wiki/Crossword

https://en.wikipedia.org/wiki/Bananagrams