Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I did two versions, in different languages, as my first implementation couldn't solve the second problem efficiently, and it was more fun.
- The first version had to pick a valid word as a guess. The second was allowed to choose arbitrary letters.
- Note these are scored slightly differently, because I had to change my method to efficiently solve the latter. All scoring is on an arbitrary scale, not by properly analysing bits of information yielded.
- The "best word" is scored based on 2 points for exact matches, 1 point for a misplaced letter (maximum once per letter - not sure exactly how repeats are handled). Scores are added up across a wordlist of 5 letter words, from the English top 10k, and the highest scoring word chosen.
- To find the best arbitrary pattern I needed to linearly separate the score components. This version scores 1 point for guessing a letter present in the word, and an extra point if the letter is in the right position. This is slightly different where letters are repeated. Again, added across a word list, but this version allowed me to pre-count how many words included an "a", etc.
Advertisement
Add Comment
Please, Sign In to add comment