Skip to content

Commit

Permalink
Work
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-andreas committed Jun 23, 2013
1 parent 4804769 commit 80feda5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions gamestate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ void moveSweepers(Gamestate *gs) {
}

void brainTransplant(Gamestate *gs) {
static int generation = 0;
printf(
"Transplanting brains. Gen %d: Avg fitness %.2f, best %d\n",
++generation, gs->genAlg->AverageFitness(), (int)gs->genAlg->BestFitness()
);
//update the stats to be used in our stat window
// m_vecAvFitness.push_back(m_pGA->AverageFitness());
// m_vecBestFitness.push_back(m_pGA->BestFitness());
Expand Down
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ int main(int argc, char **argv) {
srand(time(NULL));

sdlgamestate_t g;
Gamestate gs(640, 480);
Gamestate gs(400, 400);
g.gamestate = &gs;

for(int i = 0; i < 40; i++) {
Expand Down

0 comments on commit 80feda5

Please sign in to comment.