From: Florian Forster Date: Wed, 7 May 2008 15:01:45 +0000 (+0200) Subject: src/sn_evolution.c: Print the rating of the best solution periodically. X-Git-Tag: v1.0.0~107 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0d042663836920ac5edda651f8609e3e2ed6966e;p=sort-networks.git src/sn_evolution.c: Print the rating of the best solution periodically. --- 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);