Help explaining how my code works

For me, this is just an 'artistic' demonstration (it is indeed pointless to generate cyclically a book). But is this demonstration invalid because it is...useless? My goal is to give an example of a genetic algorithm to people that may be not familiar with. I think there is nothing wrong with this approach from the moment you do not fool people with wrong explanations. That is why I shared the source code.

Regarding his criticism, perhaps I have problems to understand him because English is not my mother tongue, but it seems to me clear that he presents me as a fraud (that is: I explain a given process that does not reflect what really happens). See:

So I had to read the source code, and saw that Hamlet was being encoded directly into the DNA! Quite a single purpose monkey.

That is not true: Hamlet is not encoded into the DNA, as you know.

I guess I was hoping the monkeys would have some stochastic process based on learned vocabulary and possibly even randomness (I.e. a winning monkey wouldn't necessarily spit out Hamlet every single time)

This is based on a stochastic process (even if it is simplistic, ie. no possibility for the monkeys to created valid sentences in general).

In particular:

I don't believe anything close to that explanation appears in that page.

This is what I do not understand. In the help page, I have the feeling I give sincere explanations. I do not see anything false in my claims. When I read him, I have however the feeling that this is a faked experiment, that there is no evolution at all, that this is not a genetic algorithm.

But at the same time I am puzzled because he says a fact that I believe to be very true:

I.e. your code converges on Hamlet rather than on a process (such as a Markov model) that generates Hamlet.

Yeah, this is the very purpose of a genetic algorithm. To generate Hamlet from a Markov model (or neural networks...) is a different experiment.

Anyways, thank you very much for this feedback. It was very useful.

/r/cpp_questions Thread Parent