Skip to main content

Challenges from competitors

Viewing 3 posts - 181 through 183 (of 183 total)
  • Author
  • #53294

    @Mattyrat2027, there is a really good exposition of fitness functions at
    I couldn’t explain it any better.
    (Before anyone asks, I am not connected in any way to that website.)

    The hill-climbing attack on the Pollux cipher goes like this:
    The fitness function is based on 10-gram (dekagram) frequencies of English that has been encoded with Morse.
    In other words, I took a big block of English text and encoded it, then I counted up how many times
    ………. occurs, then how many times ………_ occurs, etc., up to xxxxxxxxxx. There are 3^10 entries in
    the table. The fitness function is otherwise the same as in the example.
    To climb the hill, it starts with a random key, which is a string of 36 dots, dashes, and x’s. At each step, it
    changes one of these symbols to something else. If that results in a better fitness, it keeps the change and
    continues. If not, it tries changing a different symbol in the the key. To avoid getting stuck in a local
    max, the algorithm allows a downward step about 5% of the time, if the step is only a little bit downward.
    When the fitness cannot be improved any longer, it spits out the key.
    (Again, don’t assume that I invented this trick; I did not.)

    , could you please rephrase the question? I don’t understand what you are asking.


    In your example of hill climbing, there is a lot of “-” “x” and “.”

    .x..x..x….-xx-..-x………-xx..xx -15.4769347575
    .x..x..x…x-xx-..-x………-xx..xx -15.2620088256
    .x..x..x…x-xx-..-x……….xx..xx -15.1371076389

    Can you explain the meaning of these patterns ?


    @F6exb, those are trial keys. The numbers after them are the values of the fitness.
    I like to watch my programs work, so there is a lot of useless output.

Viewing 3 posts - 181 through 183 (of 183 total)
  • You must be logged in to reply to this topic.