This is a word search puzzle generator. Users can customize some variables.
The word_list.txt file is from https://www.mit.edu/~ecprice/wordlist.10000. If you have another word lists, you can modify the word_list.txt file. Then just run generator.py program with python.
python generator.py
- Size of the puzzle
- Check the line 76 and 118. The default size is 16x16.
- Number and length of words
- e.g. 2 words with length 4, 3 words with length 5, ...
- Check the line from 79 to 83.
- Number of each directions
- e.g. 2 for S, 1 for NW, 1 for W, ...
- Check the line 84.
- Alphabet distribution in empty space
- The empty space is filled with random alphabets that follow the distribution of word list.
- The function
calculate_letter_frequencies
andfill_empty_spaces
are about it.
The puzzles are generated as docx file and word lists are saved as json file. You can also include the word list under the puzzle if you uncomment the line 135~139.
![image](https://private-user-images.githubusercontent.com/51894747/399878744-24f36cac-d89e-4397-b4bc-8420ed19094f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTM3MjAsIm5iZiI6MTczODg5MzQyMCwicGF0aCI6Ii81MTg5NDc0Ny8zOTk4Nzg3NDQtMjRmMzZjYWMtZDg5ZS00Mzk3LWI0YmMtODQyMGVkMTkwOTRmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDAxNTcwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRiMjdlYmE3ZWYyMmM2NTBjMjM2YzA5OTM3MDUwZTJiNjNhMDVlNGQ1MTViZDA4ZTBhMWZhY2ExMzRiZWE0OGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.0luWT1iDLkw05EJwjn9rxQp8GcxsiE0FiRPriwktBVc)
docx puzzle file
![image](https://private-user-images.githubusercontent.com/51894747/399878958-9e30a1e7-03b6-4bf9-b29b-7e54b0a5de95.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTM3MjAsIm5iZiI6MTczODg5MzQyMCwicGF0aCI6Ii81MTg5NDc0Ny8zOTk4Nzg5NTgtOWUzMGExZTctMDNiNi00YmY5LWIyOWItN2U1NGIwYTVkZTk1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDAxNTcwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFiMzRkYjc2MTlmZDVkMmMwY2QwZmY0YjY2MmVjZWUzNTE4OGI0ZTRhMjE0MWYzZWJhYzE4YzI0NTgxMDE2YWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.JBOPTKi9M3nzo1aCIsXIKZNNnwaNie3KWkgyGnS8yDA)
json word list file