Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

32
LINES

< > BotCompany Repo | #1023179 // I want you to be... [bot, OK]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (17057L/93K).

!7

cmodule IWantYouToBe > DynAttractorBot {
  // the facts
  
  transient Set<S> facts = tlft_ciSet([[
    Computery is usery's assistant
    It is impossible that {Computery is usery's mother}
  ]]);

  // rules by space
    
  transient MultiMap<S, WordTokRule> rulesForSpace = litmultimap(
    MultiSpaceReasoning1.userSpace, ll(rule_iWantYouToBeMy_1()),
    MultiSpaceReasoning1.objectiveSpace, ll(rule_useryWants_1(facts))
  );
  
  class Bot > AttractorBot {
    *() {
      addStandardAttractor(new DefaultAttractor {
        run {
          new MultiSpaceReasoning1 mr;
          mr.addRules(rulesForSpace);
    
          say(getVars(extFilterByFlag answer(mr.reason_inputToAnswer(input))));
        }
      });
    }
  }
 
  AttractorBot makeBot() { ret new Bot; }
}

Author comment

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: 308 / 553
Version history: 10 change(s)
Referenced in: [show references]