diff --git a/algo/randomSearch.go b/algo/randomSearch.go index 37c4d20..cfd843c 100644 --- a/algo/randomSearch.go +++ b/algo/randomSearch.go @@ -96,16 +96,16 @@ func RandomSearch(fes uint) { for _, dimens := range bench.Dimensions { for j := 0; j < minIters; j++ { // run Schwefel. - v, r := singleRandomSearch(dimens+1, "Schwefel", bench.SchwefelParams.Min(), bench.SchwefelParams.Max()) + v, r := singleRandomSearch(dimens, "Schwefel", bench.SchwefelParams.Min(), bench.SchwefelParams.Max()) valsSchwefel = append(valsSchwefel, v) resultsSchwefel = append(resultsSchwefel, r) // run De Jong 1st. - vDJ1, rDJ1 := singleRandomSearch(dimens+1, "DeJong1st", bench.DeJong1Params.Min(), bench.DeJong1Params.Max()) + vDJ1, rDJ1 := singleRandomSearch(dimens, "DeJong1st", bench.DeJong1Params.Min(), bench.DeJong1Params.Max()) valsDeJong1st = append(valsDeJong1st, vDJ1) resultsDeJong1st = append(resultsDeJong1st, rDJ1) // run De Jong 2nd. - vDJ2, rDJ2 := singleRandomSearch(dimens+1, "DeJong2nd", bench.DeJong2Params.Min(), bench.DeJong2Params.Max()) + vDJ2, rDJ2 := singleRandomSearch(dimens, "DeJong2nd", bench.DeJong2Params.Min(), bench.DeJong2Params.Max()) valsDeJong2nd = append(valsDeJong2nd, vDJ2) resultsDeJong2nd = append(resultsDeJong2nd, rDJ2) }