public function testSetGetFittestIndividual() { $pop = new Population(50, '12345'); $individual = new Individual(); $individual->setString('HELLO'); $pop->setIndividual(25, $individual); $this->assertEquals('HELLO', $pop->getFittest('HELLO')->__toString()); }
public function testMutation() { $individual = new Individual(); $individual->setString('Jurgen Smurgen'); $individual->mutate(); $this->assertNotEquals('Jurgen Smurgen', $individual->__toString()); }