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

42
LINES

< > BotCompany Repo | #1003020 // Test Opposites Bot Load Bug

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (1651L/11K/37K).

!752

!include #1003021 // new unstructure

static new MultiMap<S, Node> byName; // multiple entries not really handled yet

sclass BaseNode {
  S id = randomID(12);
  S name;
  
  new L<Node> related;
  new Map<Node, Float> relationStrengths; // strength of relation, 0 to 1
  new L<O> identicalOuter; // identical nodes in other bots

  *() {}  
  *(S *name) {
    byName.put(name, (Node) this);
  }
  
}

sclass Node extends BaseNode {
  *() {}
  *(S name) {
    super(name);
  }
  
  new L<Node> opposites; // list of opposites
  new L<Node> dropped; // no longer considered opposites
  new Map<Node, S> modifiers; // optional modifier for each entry
  new Map<Node, L> sources; // source(s) of each entry
}

p {
  readLocally("#1003015", "byName");
  for (S name : keys(byName.data)) {
    print(name);
    L nodes = byName.data.get(name);
    for (O n : nodes)
      print("  " + n.getClass());
  }
}

Author comment

Began life as a copy of #1003015

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003020
Snippet name: Test Opposites Bot Load Bug
Eternal ID of this version: #1003020/1
Text MD5: d36f2d0f537950dd29e2d328414addba
Transpilation MD5: 7ecf377bea673a12d6dc3d8f57570454
Author: stefan
Category: nl bots
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-04-19 17:54:12
Source code size: 949 bytes / 42 lines
Pitched / IR pitched: No / No
Views / Downloads: 571 / 655
Referenced in: [show references]