(max_units, top_units)
| 3 | /***********************************************************************************/ |
| 4 | |
| 5 | var GeneticAlgorithm = function(max_units, top_units){ |
| 6 | this.max_units = max_units; // max number of units in population |
| 7 | this.top_units = top_units; // number of top units (winners) used for evolving population |
| 8 | |
| 9 | if (this.max_units < this.top_units) this.top_units = this.max_units; |
| 10 | |
| 11 | this.Population = []; // array of all units in current population |
| 12 | |
| 13 | this.SCALE_FACTOR = 200; // the factor used to scale normalized input values |
| 14 | } |
| 15 | |
| 16 | GeneticAlgorithm.prototype = { |
| 17 | // resets genetic algorithm parameters |
nothing calls this directly
no outgoing calls
no test coverage detected