func createPool(population []Organism, maxFitness float64) (pool []Organism) {
	pool = make([]Organism, 0)
	// create a pool for next generation
	for i := 0; i < len(population); i++ {
		population[i].calcFitness()
		num := int((population[i].Fitness / maxFitness) * 100)
		for n := 0; n < num; n++ {
			pool = append(pool, population[i])
		}
	}
	return
}
// create the breeding pool that creates the next generation
create the breeding pool that creates the next generation
// create the breeding pool that creates the next generation
func createPool(population []Organism, maxFitness float64) (pool []Organism) {
	pool = make([]Organism, 0)
	for i := 0; i < len(population); i++ {
		population[i].calcFitness()
		num := int((population[i].Fitness / maxFitness) * 100)
		for n := 0; n < num; n++ {
			pool = append(pool, population[i])
		}
	}
	return
}
func createPool ( population [ ] Organism , maxFitness float64 ) ( pool [ ] Organism ) { pool = make ( [ ] Organism , 0 ) for i := 0 ; i < len ( population ) ; i ++ { population [ i ] . calcFitness ( ) num := int ( ( population [ i ] . Fitness / maxFitness ) * 100 ) for n := 0 ; n < num ; n ++ { pool = append ( pool , population [ i ] ) } } return }
create the breeding pool that creates the next generation
create the breeding pool that creates the next generation
// create a pool for next generation