MilesCranmer commited on
Commit
58f63a3
1 Parent(s): d3f2b30

Prevent changing of existing tree in population

Browse files
Files changed (1) hide show
  1. eureqa.jl +2 -3
eureqa.jl CHANGED
@@ -337,9 +337,8 @@ function iterate(
337
  mult::Float32=0.1f0;
338
  annealing::Bool=true
339
  )::Node
340
- if annealing
341
- prev = deepcopy(tree)
342
- end
343
 
344
  mutationChoice = rand()
345
  weight_for_constant = min(8, countConstants(tree))
 
337
  mult::Float32=0.1f0;
338
  annealing::Bool=true
339
  )::Node
340
+ prev = tree
341
+ tree = deepcopy(tree)
 
342
 
343
  mutationChoice = rand()
344
  weight_for_constant = min(8, countConstants(tree))