Skip to content

Commit

Permalink
Fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rh12503 committed May 20, 2021
1 parent 1384dd2 commit 17f437d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ func main() {

evaluatorFactory := func(n int) evaluator.Evaluator {
// 22 for the cache size and 5 for the block size
return evaluator.NewParallel(img, 22, 5, n)
// use PolygonsImageFunctions for polygons
return evaluator.NewParallel(fitness.TrianglesImageFunctions(imgData, 5, n), 22)
}

var mutator mutation.Method
Expand All @@ -116,7 +117,7 @@ func main() {
mutator = mutation.NewGaussianMethod(0.01, 0.3)

// 400 population size and 5 cutoff
algo := algorithm.NewSimple(pointFactory, 400, 5, evaluatorFactory, mutator)
algo := algorithm.NewModifiedGenetic(pointFactory, 400, 5, evaluatorFactory, mutator)

// Run the algorithm
for {
Expand Down

0 comments on commit 17f437d

Please sign in to comment.