Reply To: Optimising a stochastic hill climbing attack?
The Body in My Library › Forums › Harry’s Meeting Place › Optimising a stochastic hill climbing attack? › Reply To: Optimising a stochastic hill climbing attack?
30th October 2023 at 9:44 am
#91915
madness
Participant
@PuffFishy
For monoalphabetic substitutions, I stop at 10000 and automatically restart if the answer is gibberish. For speed, I use C language, and so I can break 3B in a second or two.
For other ciphers, I modified the simulated annealing approach by doing something like this:
if (f > bestfit) or ((f > 1.05*bestfit) and (randrange(100) < 5)):
etc.
If the 1.05 is adjusted to be the height of local maxima (compared to the nearest valley), then it doesn’t get stuck.