From 0d042663836920ac5edda651f8609e3e2ed6966e Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 7 May 2008 17:01:45 +0200 Subject: [PATCH] src/sn_evolution.c: Print the rating of the best solution periodically. --- src/sn-evolution.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sn-evolution.c b/src/sn-evolution.c index 48012a6..f9b5f0b 100644 --- a/src/sn-evolution.c +++ b/src/sn-evolution.c @@ -261,10 +261,11 @@ static int start_evolution (void) iteration_counter++; i = iteration_counter; -#if 0 - if ((stats_interval > 0) && ((i % stats_interval) == 0)) - population_print_stats (i); -#endif + if ((i % 1000) == 0) + { + int rating = sn_population_best_rating (population); + printf ("After %10llu iterations: Best rating: %4i\n", i, rating); + } } return (0); -- 2.11.0