Skip to content

Commit

Permalink
add chart and string GA
Browse files Browse the repository at this point in the history
  • Loading branch information
stjohnfinn committed Oct 9, 2024
1 parent 1a1908f commit b6da035
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function gameLoop() {
model.step();
// visuals
view.update(model);
fitnessGramPacerTest.data.labels = Array.from({ length: model.population.length }, (_, i) => i + 1);
fitnessGramPacerTest.data.labels = Array.from({ length: model.generation }, (_, i) => i + 1);
fitnessGramPacerTest.data.datasets[0].data = model.fitnessRecord;
fitnessGramPacerTest.update();
yield sleep(10);
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ async function gameLoop(): Promise<void> {

// visuals
view.update(model);
fitnessGramPacerTest.data.labels = Array.from({ length: model.population.length }, (_, i) => i + 1);
fitnessGramPacerTest.data.labels = Array.from({ length: model.generation }, (_, i) => i + 1);
fitnessGramPacerTest.data.datasets[0].data = model.fitnessRecord;
fitnessGramPacerTest.update();

Expand Down

0 comments on commit b6da035

Please sign in to comment.