aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2009-10-03 19:38:03 +0000
committerDimitri Sokolyuk <demon@dim13.org>2009-10-03 19:38:03 +0000
commitea64b1e62c91f5326b14a2530a26b9a38e3d97ad (patch)
tree538ab176922412338210ec6b4264fcee0fb4c79b
parentc61c79bb88741481c7b29af2983794c8fc1b9c09 (diff)
make it a littel bit faster
-rw-r--r--weasel.c5
1 files 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();