THe call to randomize was forgotten after the choice of a terminal
at max_depth. This was only visible if - you implemented the randomize method - you reached the maximum depth (or used ramped half-and-half).
This commit is contained in:
parent
aa76efbb29
commit
f71b436120
1 changed files with 1 additions and 0 deletions
|
|
@ -133,6 +133,7 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree<FType, Node> >
|
||||||
if (the_max == 1)
|
if (the_max == 1)
|
||||||
{ // generate terminals only
|
{ // generate terminals only
|
||||||
typename std::vector<Node>::iterator it = initializor.begin() + rng.random(last_terminal);
|
typename std::vector<Node>::iterator it = initializor.begin() + rng.random(last_terminal);
|
||||||
|
it->randomize();
|
||||||
sequence.push_front(*it);
|
sequence.push_front(*it);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in a new issue