Changeset 15189 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Selector
- Timestamp:
- 07/10/17 21:36:03 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Selector/LexicaseSelector.cs
r14908 r15189 74 74 for (var k = 0; k < repeats; k++) { 75 75 // The fitness cases are shuffled. 76 var fitnessCaseIndexes = Enumerable.Range(0, caseCount).Shuffle(random).To Array();76 var fitnessCaseIndexes = Enumerable.Range(0, caseCount).Shuffle(random).ToList(); 77 77 78 78 // copy list if required … … 83 83 var bestIndividuals = pool; 84 84 85 for (var j = 0; j < fitnessCaseIndexes. Length&& bestIndividuals.Count > 1; j++)85 for (var j = 0; j < fitnessCaseIndexes.Count && bestIndividuals.Count > 1; j++) 86 86 bestIndividuals = GetBestIndividuals(maximization, caseQualities, bestIndividuals, fitnessCaseIndexes[j]); 87 87
Note: See TracChangeset
for help on using the changeset viewer.