Skip to content

Commit fff2f1d

Browse files
author
ali
committed
Merge branch 'rziw' of https://gitlab.com/AliJafari13/ga into rziw
2 parents 4a213fa + be3b7d3 commit fff2f1d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

GeneticAlgorithm.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,11 @@ public function crossOver() {
8787
for($m=0; $m<4 ; $m++) {
8888
$random[$m]=mt_rand() / mt_getrandmax();
8989
if($random[$m] < $this->crossover_rate) {
90-
$this->parents[$m] = $this->chromosome[$m];
90+
// $this->parents[$m] = $this->chromosome[$m];
91+
$ids = $m;
9192
}
9293
}
94+
$cuts =
9395
$this->iteration += 1;
9496
}
9597
}

0 commit comments

Comments
 (0)