Skip to content

Commit

Permalink
Clean up tournament scoring part
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed May 16, 2022
1 parent f9c3b12 commit 338e30b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Population.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,9 @@ function best_of_sample(
scores = []
for member in 1:(options.ns)
size = compute_complexity(sample.members[member].tree, options)
frequency = if size <= options.maxsize
frequencyComplexity[size]
else
T(0)
end
push!(scores, sample.members[member].score * exp(frequency_scaling * frequency))
frequency = (size <= options.maxsize) ? frequencyComplexity[size] : T(0)
score = sample.members[member].score * exp(frequency_scaling * frequency)
push!(scores, score)
end
else
scores = [sample.members[member].score for member in 1:(options.ns)]
Expand Down

0 comments on commit 338e30b

Please sign in to comment.