Reply To: Help with hillclimb
The mystery of the silver bullet › Forums › The Intelligence Room › Help with hillclimb › Reply To: Help with hillclimb
Thank you for clarifying this. The shift in part of a substitution key would explain why this happens.
My suggestion would be to start with a key of “ABCDEFGHIJKLMNOPQRSTUVWXYZ” and then keep changing / mutating the key by randomly switching 2 letters. If the decrypt is better, that is the new key and then keep repeating the process, otherwise discard the new key and keep using the previous one. If it gets stuck, you can add a 5% chance it picks a worse key if the score is within a threshold of around 85% of the best (you can play with these values until it works).
This way the scoring function is able to clearly show when a key is close: in 2 decrypts, with 2 letters in the substitution key being switched, the scores should be very similar with one being slightly higher.
Additionally, once this is working and you want to speed it up, you can give it a “boost” by not starting with “AB..” but using letter frequencies to guess a much better start key resulting in a smaller part of the hill left to climb (the fastest I have got my scripts is 70ms for 4B).
Good luck!