An important TinyGP bug fix

50 visualizações
Ir para a primeira mensagem não lida

Nic McPhee

não lida,
19/01/2009, 14:32:2719/01/09
para Field Guide to Genetic Programming
<a href="http://www.gp-field-guide.org.uk/2009/01/another-bug-fixed-in-
tinygp.html">From the blog</a>:

<blockquote>
Many thanks to Muhammad Atif Azad, who thoroughly analysed
TinyGP.java, the sample GP implementation in one of the appendices of
the book, and uncovered another important bug.

In the evolve function the following line of code

if ( rd.nextDouble() > CROSSOVER_PROB ) {

should be

if ( rd.nextDouble() < CROSSOVER_PROB ) {

This bug does not crash the system, but it means that the parameter
CROSSOVER_PROB is interpreted as the mutation probability rather than
the crossover probability (its intended purpose).

We had found and cured this bug some years ago in the C version of
TinyGP, but it somehow made it into the Java version (probably because
I did the conversion before the bug had been found).

The bug has now been fixed in the online version of TinyGP.java

My most sincere apologies to any users of this system.
</blockquote>
Responder a todos
Responder ao autor
Reencaminhar
0 mensagens novas