Uses 911K of libraries. Click here for Pure Java version (6892L/35K).
!7 cmodule WTC > DynPrintLog { transient S program = [[ theory (discord token) { synonym token = (discord token) synonym bot = (discord bot) a token is something a bot needs in order to (connect to discord) } a $a is something a $b needs in order to $c & $d is a $b & $d wants to $c => $d needs a $a pattern (x wants to y) gazelle is a bot gazelle wants to (connect to discord) expect (gazelle needs a token) ]]; start-thread { PhilosophyBot1 bot = new(program); bot.run(); new Matches m; assertEquals(ll(litmap("$x" := "gazelle needs a token")), bot.matchFacts("expect $x")); assertEquals("logic rules", 1, l(bot.logicRules)); bot.openAllTheories(); // assert that fact from theory was loaded assertContainsIC(bot.facts, "a token is something a bot needs in order to (connect to discord)"); print("Theory opened OK."); pnl("RULE", bot.logicRules); bot.think(); bot.checkExpectations(); print("OK!!"); } }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1025726 |
Snippet name: | Wants To Connect Musing [OK] |
Eternal ID of this version: | #1025726/30 |
Text MD5: | 44d73296f1c3f2940e4739942e4fef0a |
Transpilation MD5: | e0bdc8ab87476a9cea7daaa05337bc64 |
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: | 2019-10-15 21:07:09 |
Source code size: | 1106 bytes / 44 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 216 / 705 |
Version history: | 29 change(s) |
Referenced in: | [show references] |