Skip to content

Commit 17f437d

Browse files
committed
Fix readme
1 parent 1384dd2 commit 17f437d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ func main() {
107107

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

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

118119
// 400 population size and 5 cutoff
119-
algo := algorithm.NewSimple(pointFactory, 400, 5, evaluatorFactory, mutator)
120+
algo := algorithm.NewModifiedGenetic(pointFactory, 400, 5, evaluatorFactory, mutator)
120121

121122
// Run the algorithm
122123
for {

0 commit comments

Comments
 (0)