Fix Generation Limit Option.
authorRafał Długołęcki <rafal@dlugolecki.net.pl>
Sun, 3 May 2015 20:57:36 +0000 (22:57 +0200)
committerRafał Długołęcki <rafal@dlugolecki.net.pl>
Sun, 3 May 2015 20:57:36 +0000 (22:57 +0200)
src/main.cpp

index fc396cd8557df09f734016cbf52b69808542281c..5ca1684b259efac96f60b37df9f045c19b444d78 100644 (file)
@@ -42,7 +42,7 @@ int main(int argc, char* argv[]) {
         new command::Option<int>("--generation-size", "Generation size", [](int value)->void { generationSize = value; }),
         new command::Option<float>("--crossover", "Crossover chance", [](float value)->void { crossoverChance = value; }),
         new command::Option<float>("--mutation", "Mutation chance", [](float value)->void { mutationChance = value; }),
-        new command::Option<float>("--generation-limit", "Limit of generations", [](float value)->void { mutationChance = value; }),
+        new command::Option<float>("--generation-limit", "Limit of generations", [](float value)->void { generationLimit = value; }),
     });
 
     _Fitness fitness(0.5, 2.5);