Download Jar. Libraryless. Click here for Pure Java version (7190L/51K).
1 | !7 |
2 | |
3 | p-exp {
|
4 | new AIStrategy_RandomWithVariation<S> strat; |
5 | strat.best.replaceIfSameScore = true; |
6 | LS plusExamples = ll("eval this", "eval that");
|
7 | LS minusExamples = ll("do this", "do that", "avoid that", "let's do stuff", "don't be evil");
|
8 | strat.submit = f1_scoreRegexpIC(plusExamples, minusExamples); |
9 | strat.random = func -> S { randomID(1) }; // random letter between a and z
|
10 | strat.vary = func(S s) -> S { appendInRandomOrder(s, randomID(1)) };
|
11 | runStrategyForever/*WhileImprovement*/(strat, optimumScore := 100.0); |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1024190 |
| Snippet name: | Grow random regexps Spike [dev.] |
| Eternal ID of this version: | #1024190/11 |
| Text MD5: | 47a861bce1f3efc9e1c2be90cab3b675 |
| Transpilation MD5: | deb5b4b6662f2580dd7ee8693a638697 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX source code (desktop) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-07-24 23:12:16 |
| Source code size: | 541 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 486 / 1410 |
| Version history: | 10 change(s) |
| Referenced in: | [show references] |