~ruther/ctu-fee-eoa

b08d8cfed08725cd52678315f70c78fb21ae9233 — Rutherther a month ago 738df68
fix: tournament selection in case last wins returned wrong index
1 files changed, 1 insertions(+), 1 deletions(-)

M codes/eoa_lib/src/selection.rs
M codes/eoa_lib/src/selection.rs => codes/eoa_lib/src/selection.rs +1 -1
@@ 68,7 68,7 @@ impl TournamentSelection {
        let p = self.p;
        let k = self.k;

        let mut selected = idxs[k - 1];
        let mut selected = k - 1;
        // let's say p = 0.7
        // the best has probability 0.7 of being selected
        // if the best is not selected, the second has 0.7 probability of being selected... (that's 0.7 * 0.3 without conditions)