From 7898936d030ef9d5accaa4555a1752a5c71ef626 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Sat, 18 Oct 2025 21:34:46 +0200 Subject: [PATCH] chore: update explanation comment --- env/src/selection.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/src/selection.rs b/env/src/selection.rs index 54963a6a8958d04562bcdd9c173adcdc3481b3e2..8e83c69d0b67c205ab652dced5bc43631d354460 100644 --- a/env/src/selection.rs +++ b/env/src/selection.rs @@ -40,7 +40,7 @@ impl TournamentSelection { // 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) - // and so on. The last element has the remaining probability. + // and so on. The last element is selected if none of the previous were. for i in 0..k-1 { if p_selector <= p { selected = i;