Use raw score for fitness
This commit is contained in:
		
							parent
							
								
									aebdbeb356
								
							
						
					
					
						commit
						c8233134c3
					
				| 
						 | 
					@ -99,8 +99,7 @@ impl World {
 | 
				
			||||||
                self.over = true;
 | 
					                self.over = true;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        self.fitness =
 | 
					        self.fitness = self.score;
 | 
				
			||||||
            (self.score / self.player.shots as f32).powi(2) * self.player.lifespan as f32;
 | 
					 | 
				
			||||||
        self.asteroids.append(&mut to_add);
 | 
					        self.asteroids.append(&mut to_add);
 | 
				
			||||||
        self.asteroids.retain(|asteroid| asteroid.alive);
 | 
					        self.asteroids.retain(|asteroid| asteroid.alive);
 | 
				
			||||||
        // if self.asteroids.iter().fold(0, |acc, x| {
 | 
					        // if self.asteroids.iter().fold(0, |acc, x| {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue