Skip to content

Commit 36a7622

Browse files
author
Dmitriy Yurov
committed
best fn example changed
1 parent f93b501 commit 36a7622

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ async function solve() {
6767
const bestOne = genetic.best()[0]; // get best one
6868
console.log(bestOne);
6969

70-
if (bestOne === solution) {
70+
if (bestOne.entity === solution) {
7171
break;
7272
}
7373
}
@@ -79,7 +79,7 @@ to do two evolutions and then get the best N phenoTypes with scores (see *.score
7979
Retrieve the Phenotype with the highest fitness score like so. You can get directly N best scored items
8080
```js
8181
const best = genetic.best(1)
82-
// best:T = [{...}];
82+
// best = [{...}];
8383
```
8484

8585
# Functions

0 commit comments

Comments
 (0)