diff --git a/src/client/controllers/Population.js b/src/client/controllers/Population.js index 0f8f204..aad0153 100644 --- a/src/client/controllers/Population.js +++ b/src/client/controllers/Population.js @@ -19,7 +19,7 @@ export class Population { this.pause = false; this.#data = data; this.targetSemanticLayout = this.#calculateSemanticTargetLayout(this.#data); - console.log(`targetSemanticLayout`, this.targetSemanticLayout); + // console.log(`targetSemanticLayout`, this.targetSemanticLayout); this.#typefaces = []; this.updated = true; @@ -56,13 +56,13 @@ export class Population { this.updated = true; } - // evolve evolve = async () => { + const offspring = []; + // clean graphics hidden on canvas await this.#cleanGraphics(); document.getElementById(`generation-number`).textContent=this.generations; - const offspring = []; // copy the elite to next generation const eliteSize = parseInt(this.params["evo"]["eliteSize"]); @@ -76,15 +76,6 @@ export class Population { // select the indices using Stochastic Ranking const rank = await this.#stochasticRanking(fitness, constraints); - - // sort population - // const newPopulation = []; - // for (let i=0; i (b.fitness-b.constraint) - (a.fitness-a.constraint)); // debug // best individual fitness - console.log ("best individual=", this.population[0].fitness, this.population[0].constraint); + // console.log ("best individual=", this.population[0].fitness, this.population[0].constraint); } copy = (obj) => { diff --git a/src/client/controllers/Poster.js b/src/client/controllers/Poster.js index 3e1195e..3a1d15b 100644 --- a/src/client/controllers/Poster.js +++ b/src/client/controllers/Poster.js @@ -224,7 +224,6 @@ class Poster { } evaluate = async (dist) => { - // TODO: DIVIDE into parts this.phenotype = await this.draw(); const noCurrentTypefaces = this.params["typography"]["typefaces"].length;