Skip to main content
The National Cipher Challenge

Reply To: Help with hillclimb

#98746
Puzzling_Pelican
Participant

If you don’t mind me asking, how are you using the tetragram frequencies to score the decrypt as it is highly unusual for 1 character difference to change the score that significantly?

Usually each tetragram has a “score” which is added to a decrypt’s total for every time it occurs in the text e.g. “CIPHER” has a score of score(“CIPH”) + score(“IPHE”) + score(“PHER”).

The score for a single tetragram is generated based of how frequently the tetragram is expected to occur in English (or you can just be lazy and use the number of times it occurred in a large corpus e.g. the plaintexts of the past few years of cipher challenge).

Alternatively, ensure the “solve substitution” function is working as intended as if it is wrong that might explain how a slight change in key results in a text with wildly varying scores.

P.S. Harry, if you think this is too much help feel free to cut parts out however I believe writing code to solve the cipher is a lot of fun and it would be a shame to see someone give up.

Report a problem