()
| 282 | } |
| 283 | |
| 284 | CalculateFitness() { |
| 285 | // current best fitness max just including height is 640,000, getting a coin has to be the most important thing so |
| 286 | let coinValue = 500000; |
| 287 | let heightThisLevel = (this.bestHeightReached - (height * this.bestLevelReached)); |
| 288 | this.fitness = heightThisLevel * heightThisLevel + coinValue * this.numberOfCoinsPickedUp; |
| 289 | } |
| 290 | |
| 291 | Update() { |
| 292 | if (this.playersDead)//|| this.hasFinishedInstructions) |