@thi.ng/gp 0.2.28 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -72
- package/README.md +16 -6
- package/ast.d.ts +2 -2
- package/ast.js +12 -6
- package/index.d.ts +3 -3
- package/index.js +3 -3
- package/mep.d.ts +1 -1
- package/mep.js +8 -5
- package/package.json +41 -26
- package/utils.d.ts +1 -1
- package/utils.js +5 -2
- package/lib/index.js +0 -181
- package/lib/index.js.map +0 -1
- package/lib/index.umd.js +0 -1
- package/lib/index.umd.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [0.
|
|
6
|
+
## [0.3.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/gp@0.3.0...@thi.ng/gp@0.3.1) (2021-10-13)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @thi.ng/gp
|
|
9
9
|
|
|
@@ -11,97 +11,56 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @thi.ng/gp
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## [0.2.26](https://github.com/thi-ng/umbrella/compare/@thi.ng/gp@0.2.25...@thi.ng/gp@0.2.26) (2021-08-08)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @thi.ng/gp
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## [0.2.25](https://github.com/thi-ng/umbrella/compare/@thi.ng/gp@0.2.24...@thi.ng/gp@0.2.25) (2021-08-08)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @thi.ng/gp
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
## [0.2.24](https://github.com/thi-ng/umbrella/compare/@thi.ng/gp@0.2.23...@thi.ng/gp@0.2.24) (2021-08-04)
|
|
39
|
-
|
|
40
|
-
**Note:** Version bump only for package @thi.ng/gp
|
|
41
|
-
|
|
42
|
-
|
|
14
|
+
# [0.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/gp@0.2.30...@thi.ng/gp@0.3.0) (2021-10-12)
|
|
43
15
|
|
|
44
16
|
|
|
17
|
+
### Build System
|
|
45
18
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
**Note:** Version bump only for package @thi.ng/gp
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
## [0.2.22](https://github.com/thi-ng/umbrella/compare/@thi.ng/gp@0.2.21...@thi.ng/gp@0.2.22) (2021-07-27)
|
|
55
|
-
|
|
56
|
-
**Note:** Version bump only for package @thi.ng/gp
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
## [0.2.21](https://github.com/thi-ng/umbrella/compare/@thi.ng/gp@0.2.20...@thi.ng/gp@0.2.21) (2021-07-01)
|
|
63
|
-
|
|
64
|
-
**Note:** Version bump only for package @thi.ng/gp
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
## [0.2.20](https://github.com/thi-ng/umbrella/compare/@thi.ng/gp@0.2.19...@thi.ng/gp@0.2.20) (2021-06-08)
|
|
71
|
-
|
|
72
|
-
**Note:** Version bump only for package @thi.ng/gp
|
|
19
|
+
* major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
|
|
73
20
|
|
|
74
21
|
|
|
22
|
+
### BREAKING CHANGES
|
|
75
23
|
|
|
24
|
+
* discontinue CommonJS & UMD versions
|
|
76
25
|
|
|
26
|
+
- only ESM modules will be published from now on
|
|
27
|
+
- CJS obsolete due to ESM support in recent versions of node:
|
|
28
|
+
- i.e. launch NodeJS via:
|
|
29
|
+
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
30
|
+
- in the node REPL use `await import(...)` instead of `require()`
|
|
31
|
+
- UMD obsolete due to widespread browser support for ESM
|
|
77
32
|
|
|
78
|
-
|
|
33
|
+
Also:
|
|
34
|
+
- normalize/restructure/reorg all package.json files
|
|
35
|
+
- cleanup all build scripts, remove obsolete
|
|
36
|
+
- switch from mocha to @thi.ng/testament for all tests
|
|
79
37
|
|
|
80
38
|
|
|
81
|
-
### Code Refactoring
|
|
82
39
|
|
|
83
|
-
* **gp:** fix [#256](https://github.com/thi-ng/umbrella/issues/256) replace enum w/ type alias ([6fd4291](https://github.com/thi-ng/umbrella/commit/6fd4291eb2be4baae93b3f365478f73990e044b0))
|
|
84
40
|
|
|
85
41
|
|
|
86
|
-
### BREAKING CHANGES
|
|
87
42
|
|
|
88
|
-
|
|
43
|
+
# [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/gp@0.1.35...@thi.ng/gp@0.2.0) (2020-12-22)
|
|
89
44
|
|
|
45
|
+
### Code Refactoring
|
|
90
46
|
|
|
47
|
+
- **gp:** fix [#256](https://github.com/thi-ng/umbrella/issues/256) replace enum w/ type alias ([6fd4291](https://github.com/thi-ng/umbrella/commit/6fd4291eb2be4baae93b3f365478f73990e044b0))
|
|
91
48
|
|
|
49
|
+
### BREAKING CHANGES
|
|
92
50
|
|
|
51
|
+
- **gp:** replace GeneType w/ type alias
|
|
93
52
|
|
|
94
|
-
#
|
|
53
|
+
# 0.1.0 (2019-11-30)
|
|
95
54
|
|
|
96
|
-
###
|
|
55
|
+
### Bug Fixes
|
|
97
56
|
|
|
98
|
-
|
|
57
|
+
- **gp:** update ASTNode as recursive type (TS3.7) ([33fbd7f](https://github.com/thi-ng/umbrella/commit/33fbd7f152df370270690e5b1381a86f647f9b6b))
|
|
99
58
|
|
|
100
|
-
###
|
|
59
|
+
### Features
|
|
101
60
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
61
|
+
- **gp:** add MEP, refactor all as classes, add/update types, tests ([d9061b1](https://github.com/thi-ng/umbrella/commit/d9061b17a6aa89f690a0c97c12825c077f45e38b))
|
|
62
|
+
- **gp:** add opt min depth filter for MEP.decodeChromosome() ([921fcdd](https://github.com/thi-ng/umbrella/commit/921fcdd4e1c1919e4539c033df591782b63cff0a))
|
|
63
|
+
- **gp:** add support for arbitrary op arities, simplify ([8e71a88](https://github.com/thi-ng/umbrella/commit/8e71a88fb7b1ca36e7b89b5f2923a198c974c575))
|
|
64
|
+
- **gp:** import as new package ([dcfee15](https://github.com/thi-ng/umbrella/commit/dcfee156c8b196c6c4a4f2b5f0f7986e19bacee8))
|
|
65
|
+
- **gp:** update crossover/mutation for both AST/MEP, add tests ([9852631](https://github.com/thi-ng/umbrella/commit/9852631e227d9704c41f9dbe8a6b2cce10bd8fa9))
|
|
66
|
+
- **gp:** update MEP.decodeChromosome, tests, add docs ([e339925](https://github.com/thi-ng/umbrella/commit/e339925bc1fcbf2f7787e6453d2e29922adb3836))
|
package/README.md
CHANGED
|
@@ -69,19 +69,29 @@ References:
|
|
|
69
69
|
yarn add @thi.ng/gp
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
+
ES module import:
|
|
73
|
+
|
|
72
74
|
```html
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
<script type="module" src="https://cdn.skypack.dev/@thi.ng/gp"></script>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
[Skypack documentation](https://docs.skypack.dev/)
|
|
79
|
+
|
|
80
|
+
For Node.js REPL:
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
# with flag only for < v16
|
|
84
|
+
node --experimental-repl-await
|
|
75
85
|
|
|
76
|
-
|
|
77
|
-
<script src="https://unpkg.com/@thi.ng/gp/lib/index.umd.js" crossorigin></script>
|
|
86
|
+
> const gp = await import("@thi.ng/gp");
|
|
78
87
|
```
|
|
79
88
|
|
|
80
|
-
Package sizes (gzipped, pre-treeshake): ESM: 1.
|
|
89
|
+
Package sizes (gzipped, pre-treeshake): ESM: 1.25 KB
|
|
81
90
|
|
|
82
91
|
## Dependencies
|
|
83
92
|
|
|
84
93
|
- [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/develop/packages/api)
|
|
94
|
+
- [@thi.ng/errors](https://github.com/thi-ng/umbrella/tree/develop/packages/errors)
|
|
85
95
|
- [@thi.ng/math](https://github.com/thi-ng/umbrella/tree/develop/packages/math)
|
|
86
96
|
- [@thi.ng/random](https://github.com/thi-ng/umbrella/tree/develop/packages/random)
|
|
87
97
|
- [@thi.ng/transducers](https://github.com/thi-ng/umbrella/tree/develop/packages/transducers)
|
|
@@ -96,7 +106,7 @@ directory are using this package.
|
|
|
96
106
|
A selection:
|
|
97
107
|
|
|
98
108
|
| Screenshot | Description | Live demo | Source |
|
|
99
|
-
|
|
109
|
+
|:----------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------|:-----------------------------------------------------|:----------------------------------------------------------------------------------|
|
|
100
110
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/shader-ast-evo.jpg" width="240"/> | Evolutionary shader generation using genetic programming | [Demo](https://demo.thi.ng/umbrella/shader-ast-evo/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/shader-ast-evo) |
|
|
101
111
|
|
|
102
112
|
## API
|
package/ast.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Location } from "@thi.ng/zipper";
|
|
2
|
-
import type { ASTNode, ASTOpts } from "./api";
|
|
1
|
+
import type { Location } from "@thi.ng/zipper";
|
|
2
|
+
import type { ASTNode, ASTOpts } from "./api.js";
|
|
3
3
|
export declare class AST<OP, T> {
|
|
4
4
|
opts: ASTOpts<OP, T>;
|
|
5
5
|
choices: IterableIterator<number>;
|
package/ast.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import { assert } from "@thi.ng/
|
|
2
|
-
import { SYSTEM } from "@thi.ng/random";
|
|
3
|
-
import { iterate
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { assert } from "@thi.ng/errors/assert";
|
|
2
|
+
import { SYSTEM } from "@thi.ng/random/system";
|
|
3
|
+
import { iterate } from "@thi.ng/transducers/iterate";
|
|
4
|
+
import { iterator } from "@thi.ng/transducers/iterator";
|
|
5
|
+
import { repeatedly } from "@thi.ng/transducers/repeatedly";
|
|
6
|
+
import { takeWhile } from "@thi.ng/transducers/take-while";
|
|
7
|
+
import { zipper } from "@thi.ng/zipper/zipper";
|
|
8
|
+
import { opNode, probabilities, terminalNode } from "./utils.js";
|
|
6
9
|
export class AST {
|
|
10
|
+
opts;
|
|
11
|
+
choices;
|
|
12
|
+
probTerminal;
|
|
7
13
|
constructor(opts) {
|
|
8
|
-
this.opts =
|
|
14
|
+
this.opts = { rnd: SYSTEM, ...opts };
|
|
9
15
|
assert(this.opts.probMutate < 1, "mutation probability must be < 1.0");
|
|
10
16
|
const probs = probabilities(this.opts);
|
|
11
17
|
this.probTerminal = probs.probTerminal;
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./api";
|
|
2
|
-
export * from "./ast";
|
|
3
|
-
export * from "./mep";
|
|
1
|
+
export * from "./api.js";
|
|
2
|
+
export * from "./ast.js";
|
|
3
|
+
export * from "./mep.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./api";
|
|
2
|
-
export * from "./ast";
|
|
3
|
-
export * from "./mep";
|
|
1
|
+
export * from "./api.js";
|
|
2
|
+
export * from "./ast.js";
|
|
3
|
+
export * from "./mep.js";
|
package/mep.d.ts
CHANGED
package/mep.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { inRange } from "@thi.ng/math";
|
|
2
|
-
import { SYSTEM } from "@thi.ng/random";
|
|
3
|
-
import { repeatedly } from "@thi.ng/transducers";
|
|
4
|
-
import { opNode, probabilities, terminalNode } from "./utils";
|
|
1
|
+
import { inRange } from "@thi.ng/math/interval";
|
|
2
|
+
import { SYSTEM } from "@thi.ng/random/system";
|
|
3
|
+
import { repeatedly } from "@thi.ng/transducers/repeatedly";
|
|
4
|
+
import { opNode, probabilities, terminalNode } from "./utils.js";
|
|
5
5
|
export class MEP {
|
|
6
|
+
opts;
|
|
7
|
+
probTerminal;
|
|
8
|
+
choices;
|
|
6
9
|
constructor(opts) {
|
|
7
|
-
this.opts =
|
|
10
|
+
this.opts = { rnd: SYSTEM, ...opts };
|
|
8
11
|
const probs = probabilities(this.opts);
|
|
9
12
|
this.probTerminal = probs.probTerminal;
|
|
10
13
|
this.choices = probs.iter;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/gp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Genetic programming helpers & strategies (tree based & multi-expression programming)",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"module": "./index.js",
|
|
6
|
-
"main": "./lib/index.js",
|
|
7
|
-
"umd:main": "./lib/index.umd.js",
|
|
8
7
|
"typings": "./index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/thi-ng/umbrella.git"
|
|
@@ -24,31 +24,26 @@
|
|
|
24
24
|
"author": "Karsten Schmidt <k+npm@thi.ng>",
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "yarn clean &&
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"build:test": "rimraf build && tsc -p test/tsconfig.json",
|
|
31
|
-
"build:check": "tsc --isolatedModules --noEmit",
|
|
32
|
-
"test": "mocha test",
|
|
33
|
-
"cover": "nyc mocha test && nyc report --reporter=lcov",
|
|
34
|
-
"clean": "rimraf *.js *.d.ts *.map .nyc_output build coverage doc lib",
|
|
35
|
-
"doc:readme": "ts-node -P ../../tools/tsconfig.json ../../tools/src/readme.ts",
|
|
27
|
+
"build": "yarn clean && tsc --declaration",
|
|
28
|
+
"clean": "rimraf *.js *.d.ts *.map doc",
|
|
29
|
+
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
36
30
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
|
|
37
|
-
"doc": "
|
|
38
|
-
"
|
|
31
|
+
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
|
|
32
|
+
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
|
|
33
|
+
"pub": "yarn build && yarn publish --access public",
|
|
34
|
+
"test": "testament test"
|
|
39
35
|
},
|
|
40
36
|
"dependencies": {
|
|
41
|
-
"@thi.ng/api": "^
|
|
42
|
-
"@thi.ng/
|
|
43
|
-
"@thi.ng/
|
|
44
|
-
"@thi.ng/
|
|
45
|
-
"@thi.ng/
|
|
37
|
+
"@thi.ng/api": "^8.0.1",
|
|
38
|
+
"@thi.ng/errors": "^2.0.1",
|
|
39
|
+
"@thi.ng/math": "^5.0.1",
|
|
40
|
+
"@thi.ng/random": "^3.0.1",
|
|
41
|
+
"@thi.ng/transducers": "^8.0.1",
|
|
42
|
+
"@thi.ng/zipper": "^2.0.1"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@thi.ng/testament": "^0.1.1"
|
|
46
46
|
},
|
|
47
|
-
"files": [
|
|
48
|
-
"*.js",
|
|
49
|
-
"*.d.ts",
|
|
50
|
-
"lib"
|
|
51
|
-
],
|
|
52
47
|
"keywords": [
|
|
53
48
|
"agent",
|
|
54
49
|
"array",
|
|
@@ -70,7 +65,27 @@
|
|
|
70
65
|
"publishConfig": {
|
|
71
66
|
"access": "public"
|
|
72
67
|
},
|
|
73
|
-
"
|
|
68
|
+
"engines": {
|
|
69
|
+
"node": ">=12.7"
|
|
70
|
+
},
|
|
71
|
+
"files": [
|
|
72
|
+
"*.js",
|
|
73
|
+
"*.d.ts"
|
|
74
|
+
],
|
|
75
|
+
"exports": {
|
|
76
|
+
".": {
|
|
77
|
+
"import": "./index.js"
|
|
78
|
+
},
|
|
79
|
+
"./api": {
|
|
80
|
+
"import": "./api.js"
|
|
81
|
+
},
|
|
82
|
+
"./ast": {
|
|
83
|
+
"import": "./ast.js"
|
|
84
|
+
},
|
|
85
|
+
"./mep": {
|
|
86
|
+
"import": "./mep.js"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
74
89
|
"thi.ng": {
|
|
75
90
|
"blog": [
|
|
76
91
|
{
|
|
@@ -88,5 +103,5 @@
|
|
|
88
103
|
"status": "alpha",
|
|
89
104
|
"year": 2019
|
|
90
105
|
},
|
|
91
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "2e6b3d7c0f4c5686c1e9bdb4902ed7d3f90bcc19"
|
|
92
107
|
}
|
package/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GPOpts, OpGene, TerminalGene } from "./api";
|
|
1
|
+
import type { GPOpts, OpGene, TerminalGene } from "./api.js";
|
|
2
2
|
export declare const terminalNode: <T>(value: T) => TerminalGene<T>;
|
|
3
3
|
export declare const opNode: <OP, A>(op: OP, args: A[]) => OpGene<OP, A>;
|
|
4
4
|
export declare const probabilities: (opts: GPOpts<any, any, any>) => {
|
package/utils.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
// thing:no-export
|
|
2
|
+
import { assert } from "@thi.ng/errors/assert";
|
|
3
|
+
import { add } from "@thi.ng/transducers/add";
|
|
4
|
+
import { choices } from "@thi.ng/transducers/choices";
|
|
5
|
+
import { range } from "@thi.ng/transducers/range";
|
|
3
6
|
export const terminalNode = (value) => ({
|
|
4
7
|
type: "term",
|
|
5
8
|
value,
|
package/lib/index.js
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var api = require('@thi.ng/api');
|
|
6
|
-
var random = require('@thi.ng/random');
|
|
7
|
-
var transducers = require('@thi.ng/transducers');
|
|
8
|
-
var zipper = require('@thi.ng/zipper');
|
|
9
|
-
var math = require('@thi.ng/math');
|
|
10
|
-
|
|
11
|
-
const terminalNode = (value) => ({
|
|
12
|
-
type: "term",
|
|
13
|
-
value,
|
|
14
|
-
});
|
|
15
|
-
const opNode = (op, args) => ({
|
|
16
|
-
type: "op",
|
|
17
|
-
op,
|
|
18
|
-
args,
|
|
19
|
-
});
|
|
20
|
-
const probabilities = (opts) => {
|
|
21
|
-
const probabilities = opts.ops.map((op) => op.prob);
|
|
22
|
-
const psum = transducers.add(probabilities);
|
|
23
|
-
api.assert(psum < 1, "total op probabilities MUST be < 1");
|
|
24
|
-
return {
|
|
25
|
-
iter: transducers.choices([...transducers.range(probabilities.length + 1)], [1 - psum, ...probabilities], opts.rnd),
|
|
26
|
-
probTerminal: 1 - psum,
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
class AST {
|
|
31
|
-
constructor(opts) {
|
|
32
|
-
this.opts = Object.assign({ rnd: random.SYSTEM }, opts);
|
|
33
|
-
api.assert(this.opts.probMutate < 1, "mutation probability must be < 1.0");
|
|
34
|
-
const probs = probabilities(this.opts);
|
|
35
|
-
this.probTerminal = probs.probTerminal;
|
|
36
|
-
this.choices = probs.iter;
|
|
37
|
-
}
|
|
38
|
-
randomAST(maxDepth = this.opts.maxDepth) {
|
|
39
|
-
return this.randomASTNode(0, maxDepth);
|
|
40
|
-
}
|
|
41
|
-
crossoverSingle(parent1, parent2) {
|
|
42
|
-
return [
|
|
43
|
-
this.selectRandomNode(parent1).replace(this.selectRandomNode(parent2).node).root,
|
|
44
|
-
this.selectRandomNode(parent2).replace(this.selectRandomNode(parent1).node).root,
|
|
45
|
-
];
|
|
46
|
-
}
|
|
47
|
-
mutate(tree, maxDepth = 1) {
|
|
48
|
-
const { rnd, probMutate } = this.opts;
|
|
49
|
-
let loc = this.asZipper(tree).next;
|
|
50
|
-
if (!loc)
|
|
51
|
-
return tree;
|
|
52
|
-
while (true) {
|
|
53
|
-
let nextLoc;
|
|
54
|
-
if (rnd.float() < probMutate) {
|
|
55
|
-
loc = loc.replace(this.randomASTNode(0, maxDepth));
|
|
56
|
-
nextLoc = loc.right;
|
|
57
|
-
if (!nextLoc) {
|
|
58
|
-
nextLoc = loc.up;
|
|
59
|
-
if (nextLoc) {
|
|
60
|
-
nextLoc = nextLoc.right;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
nextLoc = loc.next;
|
|
66
|
-
}
|
|
67
|
-
if (!nextLoc)
|
|
68
|
-
return loc.root;
|
|
69
|
-
loc = nextLoc;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
linearizedAST(tree) {
|
|
73
|
-
return [
|
|
74
|
-
...transducers.iterator(transducers.takeWhile((x) => !!x), transducers.iterate((x) => x.next, this.asZipper(tree))),
|
|
75
|
-
];
|
|
76
|
-
}
|
|
77
|
-
selectRandomNode(tree, min = 0, max = -1) {
|
|
78
|
-
const rnd = this.opts.rnd;
|
|
79
|
-
const linTree = this.linearizedAST(tree);
|
|
80
|
-
let node;
|
|
81
|
-
max < 0 && (max = linTree.length);
|
|
82
|
-
node = linTree[rnd.minmax(min, max) | 0];
|
|
83
|
-
return node;
|
|
84
|
-
}
|
|
85
|
-
randomASTNode(d, maxDepth) {
|
|
86
|
-
const rnd = this.opts.rnd;
|
|
87
|
-
const geneID = this.choices.next().value;
|
|
88
|
-
if (geneID === 0 || d >= maxDepth)
|
|
89
|
-
return terminalNode(this.opts.terminal(rnd));
|
|
90
|
-
const op = this.opts.ops[geneID - 1];
|
|
91
|
-
const children = [
|
|
92
|
-
...transducers.repeatedly(() => this.randomASTNode(d + 1, maxDepth), op.arity),
|
|
93
|
-
];
|
|
94
|
-
return opNode(op.fn(rnd, children), children);
|
|
95
|
-
}
|
|
96
|
-
asZipper(tree) {
|
|
97
|
-
return zipper.zipper({
|
|
98
|
-
branch: (x) => x.type === "op",
|
|
99
|
-
children: (x) => x.args,
|
|
100
|
-
factory: (n, args) => opNode(n.op, args),
|
|
101
|
-
}, tree);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
class MEP {
|
|
106
|
-
constructor(opts) {
|
|
107
|
-
this.opts = Object.assign({ rnd: random.SYSTEM }, opts);
|
|
108
|
-
const probs = probabilities(this.opts);
|
|
109
|
-
this.probTerminal = probs.probTerminal;
|
|
110
|
-
this.choices = probs.iter;
|
|
111
|
-
}
|
|
112
|
-
randomChromosome() {
|
|
113
|
-
const res = [];
|
|
114
|
-
for (let i = 0, n = this.opts.chromoSize; i < n; i++) {
|
|
115
|
-
res[i] = this.randomGene(i);
|
|
116
|
-
}
|
|
117
|
-
return res;
|
|
118
|
-
}
|
|
119
|
-
decodeChromosome(chromosome, minDepth = 0, maxDepth = Infinity) {
|
|
120
|
-
const res = [];
|
|
121
|
-
const depths = [];
|
|
122
|
-
for (let i = 0; i < chromosome.length; i++) {
|
|
123
|
-
const gene = chromosome[i];
|
|
124
|
-
if (gene.type == "term") {
|
|
125
|
-
res[i] = gene;
|
|
126
|
-
depths[i] = 1;
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
res[i] = opNode(gene.op, gene.args.map((g) => res[g]));
|
|
130
|
-
depths[i] =
|
|
131
|
-
1 + gene.args.reduce((d, a) => Math.max(d, depths[a]), 0);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
return res.filter((_, i) => math.inRange(depths[i], minDepth, maxDepth));
|
|
135
|
-
}
|
|
136
|
-
crossoverSingle(chromo1, chromo2, cut) {
|
|
137
|
-
cut =
|
|
138
|
-
cut !== undefined
|
|
139
|
-
? cut
|
|
140
|
-
: this.opts.rnd.int() %
|
|
141
|
-
Math.min(chromo1.length, chromo2.length);
|
|
142
|
-
return [
|
|
143
|
-
chromo1.slice(0, cut).concat(chromo2.slice(cut)),
|
|
144
|
-
chromo2.slice(0, cut).concat(chromo1.slice(cut)),
|
|
145
|
-
];
|
|
146
|
-
}
|
|
147
|
-
crossoverUniform(chromo1, chromo2) {
|
|
148
|
-
const rnd = this.opts.rnd;
|
|
149
|
-
const res = [];
|
|
150
|
-
const minLen = Math.min(chromo1.length, chromo2.length);
|
|
151
|
-
for (let i = 0; i < minLen; i++) {
|
|
152
|
-
res[i] = rnd.float() < 0.5 ? chromo1[i] : chromo2[i];
|
|
153
|
-
}
|
|
154
|
-
return chromo1.length > minLen
|
|
155
|
-
? res.concat(chromo1.slice(minLen))
|
|
156
|
-
: chromo2.length > minLen
|
|
157
|
-
? res.concat(chromo2.slice(minLen))
|
|
158
|
-
: res;
|
|
159
|
-
}
|
|
160
|
-
mutate(chromo) {
|
|
161
|
-
const { rnd, probMutate } = this.opts;
|
|
162
|
-
const res = new Array(chromo.length);
|
|
163
|
-
for (let i = chromo.length; --i >= 0;) {
|
|
164
|
-
res[i] = rnd.float() < probMutate ? this.randomGene(i) : chromo[i];
|
|
165
|
-
}
|
|
166
|
-
return res;
|
|
167
|
-
}
|
|
168
|
-
randomGene(i) {
|
|
169
|
-
const geneID = this.choices.next().value;
|
|
170
|
-
const rnd = this.opts.rnd;
|
|
171
|
-
if (i === 0 || geneID === 0) {
|
|
172
|
-
return terminalNode(this.opts.terminal(rnd));
|
|
173
|
-
}
|
|
174
|
-
const op = this.opts.ops[geneID - 1];
|
|
175
|
-
const args = [...transducers.repeatedly(() => rnd.int() % i, op.arity)];
|
|
176
|
-
return opNode(op.fn(rnd, args), args);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
exports.AST = AST;
|
|
181
|
-
exports.MEP = MEP;
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../utils.js","../ast.js","../mep.js"],"sourcesContent":null,"names":["add","assert","choices","range","SYSTEM","iterator","takeWhile","iterate","repeatedly","zipper","inRange"],"mappings":";;;;;;;;;;AAEO,MAAM,YAAY,GAAG,CAAC,KAAK,MAAM;AACxC,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,KAAK;AACT,CAAC,CAAC,CAAC;AACI,MAAM,MAAM,GAAG,CAAC,EAAE,EAAE,IAAI,MAAM;AACrC,IAAI,IAAI,EAAE,IAAI;AACd,IAAI,EAAE;AACN,IAAI,IAAI;AACR,CAAC,CAAC,CAAC;AACI,MAAM,aAAa,GAAG,CAAC,IAAI,KAAK;AACvC,IAAI,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC;AACxD,IAAI,MAAM,IAAI,GAAGA,eAAG,CAAC,aAAa,CAAC,CAAC;AACpC,IAAIC,UAAM,CAAC,IAAI,GAAG,CAAC,EAAE,oCAAoC,CAAC,CAAC;AAC3D,IAAI,OAAO;AACX,QAAQ,IAAI,EAAEC,mBAAO,CAAC,CAAC,GAAGC,iBAAK,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,aAAa,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC;AACnG,QAAQ,YAAY,EAAE,CAAC,GAAG,IAAI;AAC9B,KAAK,CAAC;AACN,CAAC;;ACdM,MAAM,GAAG,CAAC;AACjB,IAAI,WAAW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AAI,CAAC,GAAG;AAC/C,YAAY,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,KAAK,EAAE,GAAG,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AAC/E,SAAS;AACT,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK;AACL,IAAI,UAAU,CAAC,CAAC,EAAE;AAClB,QAAQ,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;AACjD,QAAQ,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AAClC,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,MAAM,KAAK,CAAC,EAAE;AACrC,YAAY,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AACzD,SAAS;AACT,QAAQ,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC7C,QAAQ,MAAM,IAAI,GAAG,CAAC,GAAGF,sBAAU,CAAC,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AACpE,QAAQ,OAAO,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;AAC9C,KAAK;AACL;;;;;"}
|
package/lib/index.umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@thi.ng/api"),require("@thi.ng/random"),require("@thi.ng/transducers"),require("@thi.ng/zipper"),require("@thi.ng/math")):"function"==typeof define&&define.amd?define(["exports","@thi.ng/api","@thi.ng/random","@thi.ng/transducers","@thi.ng/zipper","@thi.ng/math"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).thi=t.thi||{},t.thi.ng=t.thi.ng||{},t.thi.ng.gp={}),t.thi.ng.api,t.thi.ng.random,t.thi.ng.transducers,t.thi.ng.zipper,t.thi.ng.math)}(this,(function(t,e,r,n,o,i){"use strict";const s=t=>({type:"term",value:t}),a=(t,e)=>({type:"op",op:t,args:e}),h=t=>{const r=t.ops.map((t=>t.prob)),o=n.add(r);return e.assert(o<1,"total op probabilities MUST be < 1"),{iter:n.choices([...n.range(r.length+1)],[1-o,...r],t.rnd),probTerminal:1-o}};t.AST=class{constructor(t){this.opts=Object.assign({rnd:r.SYSTEM},t),e.assert(this.opts.probMutate<1,"mutation probability must be < 1.0");const n=h(this.opts);this.probTerminal=n.probTerminal,this.choices=n.iter}randomAST(t=this.opts.maxDepth){return this.randomASTNode(0,t)}crossoverSingle(t,e){return[this.selectRandomNode(t).replace(this.selectRandomNode(e).node).root,this.selectRandomNode(e).replace(this.selectRandomNode(t).node).root]}mutate(t,e=1){const{rnd:r,probMutate:n}=this.opts;let o=this.asZipper(t).next;if(!o)return t;for(;;){let t;if(r.float()<n?(o=o.replace(this.randomASTNode(0,e)),t=o.right,t||(t=o.up,t&&(t=t.right))):t=o.next,!t)return o.root;o=t}}linearizedAST(t){return[...n.iterator(n.takeWhile((t=>!!t)),n.iterate((t=>t.next),this.asZipper(t)))]}selectRandomNode(t,e=0,r=-1){const n=this.opts.rnd,o=this.linearizedAST(t);let i;return r<0&&(r=o.length),i=o[0|n.minmax(e,r)],i}randomASTNode(t,e){const r=this.opts.rnd,o=this.choices.next().value;if(0===o||t>=e)return s(this.opts.terminal(r));const i=this.opts.ops[o-1],h=[...n.repeatedly((()=>this.randomASTNode(t+1,e)),i.arity)];return a(i.fn(r,h),h)}asZipper(t){return o.zipper({branch:t=>"op"===t.type,children:t=>t.args,factory:(t,e)=>a(t.op,e)},t)}},t.MEP=class{constructor(t){this.opts=Object.assign({rnd:r.SYSTEM},t);const e=h(this.opts);this.probTerminal=e.probTerminal,this.choices=e.iter}randomChromosome(){const t=[];for(let e=0,r=this.opts.chromoSize;e<r;e++)t[e]=this.randomGene(e);return t}decodeChromosome(t,e=0,r=1/0){const n=[],o=[];for(let e=0;e<t.length;e++){const r=t[e];"term"==r.type?(n[e]=r,o[e]=1):(n[e]=a(r.op,r.args.map((t=>n[t]))),o[e]=1+r.args.reduce(((t,e)=>Math.max(t,o[e])),0))}return n.filter(((t,n)=>i.inRange(o[n],e,r)))}crossoverSingle(t,e,r){return r=void 0!==r?r:this.opts.rnd.int()%Math.min(t.length,e.length),[t.slice(0,r).concat(e.slice(r)),e.slice(0,r).concat(t.slice(r))]}crossoverUniform(t,e){const r=this.opts.rnd,n=[],o=Math.min(t.length,e.length);for(let i=0;i<o;i++)n[i]=r.float()<.5?t[i]:e[i];return t.length>o?n.concat(t.slice(o)):e.length>o?n.concat(e.slice(o)):n}mutate(t){const{rnd:e,probMutate:r}=this.opts,n=new Array(t.length);for(let o=t.length;--o>=0;)n[o]=e.float()<r?this.randomGene(o):t[o];return n}randomGene(t){const e=this.choices.next().value,r=this.opts.rnd;if(0===t||0===e)return s(this.opts.terminal(r));const o=this.opts.ops[e-1],i=[...n.repeatedly((()=>r.int()%t),o.arity)];return a(o.fn(r,i),i)}},Object.defineProperty(t,"__esModule",{value:!0})}));
|
package/lib/index.umd.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../utils.js","../ast.js","../mep.js"],"sourcesContent":null,"names":["add","assert","choices","range","SYSTEM","iterator","takeWhile","iterate","repeatedly","zipper","inRange"],"mappings":";;;;;;IAEO,MAAM,YAAY,GAAG,CAAC,KAAK,MAAM;IACxC,IAAI,IAAI,EAAE,MAAM;IAChB,IAAI,KAAK;IACT,CAAC,CAAC,CAAC;IACI,MAAM,MAAM,GAAG,CAAC,EAAE,EAAE,IAAI,MAAM;IACrC,IAAI,IAAI,EAAE,IAAI;IACd,IAAI,EAAE;IACN,IAAI,IAAI;IAC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