Libraryless. Compilation Failed (23408L/175K).
1 | !7 |
2 | |
3 | sclass Suggestion {
|
4 | RuleWithParams rule; |
5 | S output; |
6 | |
7 | *() {}
|
8 | *(RuleWithParams *rule, S *output) {}
|
9 | } |
10 | |
11 | sclass TestBot extends DynObjectTable<RuleWithParams> {
|
12 | InputChooser inputChooser = new(this); |
13 | |
14 | start { inputChooser.delay = 1000; }
|
15 | |
16 | visualize {
|
17 | ret northAndCenter(wrap(inputChooser), super.visualize()); |
18 | } |
19 | |
20 | void update { if (inputChooser.update()) update(inputChooser.input()); }
|
21 | |
22 | void update(S input) {
|
23 | new NLLogicChecker_v3 c; |
24 | c.input = input; |
25 | Pair<L<IfThen>, LS> rulesAndFacts = ai_activeRulesAndFacts(); |
26 | c.facts = reversed(rulesAndFacts.b); |
27 | c.rules = reversed(rulesAndFacts.a); // latest rules first! |
28 | c.rules = [IfThen r : c.rules | ai_ruleAccessesInput(r)]; |
29 | c.rules = nlLogic_safeLHSEvalsOnly(c.rules); |
30 | c.useIterate = true; |
31 | new L<RuleWithParams> battleSpace; |
32 | nlLogic_fillBattleSpace(c, battleSpace, false); |
33 | //print("l=" + l(battleSpace));
|
34 | setData(map(battleSpace, func(RuleWithParams r) -> Suggestion {
|
35 | Suggestion(r, nlLogic_outputFromRuleWithParams(r)) |
36 | })); |
37 | } |
38 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1018152 |
| Snippet name: | Test Bot v1 [Dyn Module, shows firable rules for an input] |
| Eternal ID of this version: | #1018152/14 |
| Text MD5: | 0dccab88c74724afeea8829711daf9ac |
| Transpilation MD5: | ab8807b3b1826212cc522dbc4de35cde |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX source code (Dynamic Module) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-09-07 15:51:13 |
| Source code size: | 1103 bytes / 38 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 645 / 1443 |
| Version history: | 13 change(s) |
| Referenced in: | [show references] |