diff options
Diffstat (limited to 'src/support/learning.h')
-rw-r--r-- | src/support/learning.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/support/learning.h b/src/support/learning.h index 749549c1c..8427a2362 100644 --- a/src/support/learning.h +++ b/src/support/learning.h @@ -51,7 +51,7 @@ class GeneticLearner { std::vector<unique_ptr> population; void sort() { - std::sort(population.begin(), population.end(), [this](const unique_ptr& left, const unique_ptr& right) { + std::sort(population.begin(), population.end(), [](const unique_ptr& left, const unique_ptr& right) { return left->getFitness() > right->getFitness(); }); } @@ -109,4 +109,3 @@ public: } // namespace wasm #endif // wasm_learning_h - |