From ea64b1e62c91f5326b14a2530a26b9a38e3d97ad Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 3 Oct 2009 19:38:03 +0000 Subject: make it a littel bit faster --- weasel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/weasel.c b/weasel.c index 2470608..5ba3ffe 100644 --- a/weasel.c +++ b/weasel.c @@ -158,9 +158,8 @@ success() assert(best); printcreature(best); - printw("\n"); - return !strcmp(best->genom, aim); + return best->fitness == 1.0; } int @@ -201,7 +200,7 @@ main(int argc, char **argv) refresh(); } - printw("halted after %d generations\n", i / population); + printw("\nhalted after %d generations\n", i / population); refresh(); endwin(); -- cgit v1.2.3