Uses 911K of libraries. Click here for Pure Java version (17057L/93K).
1 | !7 |
2 | |
3 | cmodule IWantYouToBe > DynAttractorBot {
|
4 | // the facts |
5 | |
6 | transient Set<S> facts = tlft_ciSet([[ |
7 | Computery is usery's assistant |
8 | It is impossible that {Computery is usery's mother}
|
9 | ]]); |
10 | |
11 | // rules by space |
12 | |
13 | transient MultiMap<S, WordTokRule> rulesForSpace = litmultimap( |
14 | MultiSpaceReasoning1.userSpace, ll(rule_iWantYouToBeMy_1()), |
15 | MultiSpaceReasoning1.objectiveSpace, ll(rule_useryWants_1(facts)) |
16 | ); |
17 | |
18 | class Bot > AttractorBot {
|
19 | *() {
|
20 | addStandardAttractor(new DefaultAttractor {
|
21 | run {
|
22 | new MultiSpaceReasoning1 mr; |
23 | mr.addRules(rulesForSpace); |
24 | |
25 | say(getVars(extFilterByFlag answer(mr.reason_inputToAnswer(input)))); |
26 | } |
27 | }); |
28 | } |
29 | } |
30 | |
31 | AttractorBot makeBot() { ret new Bot; }
|
32 | } |
Began life as a copy of #1023175
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1023179 |
| Snippet name: | I want you to be... [bot, OK] |
| Eternal ID of this version: | #1023179/11 |
| Text MD5: | e4b7e06aa79e518aabaee8f9cc94dafd |
| Transpilation MD5: | 57dccdb913e032038a658d6ca244092a |
| 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-05-16 21:44:55 |
| Source code size: | 808 bytes / 32 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 533 / 824 |
| Version history: | 10 change(s) |
| Referenced in: | [show references] |