Skip to content

Commit

Permalink
Modified behavior of the best_ff property
Browse files Browse the repository at this point in the history
Just moved a few things around in the best_ff property.

Working on issue #22.
  • Loading branch information
ericchansen committed Jun 28, 2016
1 parent 430ee2a commit a809c7b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion simplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,13 @@ def best_ff(self):
if self.new_ffs:
self.new_ffs = sorted(self.new_ffs, key=lambda x: x.score)
# I think this is necessary after massive contraction.
# Massive contraction can potentially make eveything worse.
if self.new_ffs[0].score < self.ff.score:
best_ff = self.new_ffs[0]
best_ff = restore_simp_ff(best_ff, self.ff)
else:
return best_ff
else:
return self.ff
else:
return self.ff
@opt.catch_run_errors
Expand Down

0 comments on commit a809c7b

Please sign in to comment.