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

22
LINES

< > BotCompany Repo | #1002407 // OLD getTuringScore - retrieve Eleu's current "Turing score"

JavaX fragment (include) [tags: archive]

1  
// recompile + reload #1002408 (Turing Bot) after changing this
2  
static L<S> turingTests = litlist("#1002332", "#1002413", "#1002417", "#1002449");
3  
4  
static S getTuringScore_eleuURL = "http://bots.tinybrain.de/1002076/raw";
5  
6  
static S getTuringScore() {
7  
  long s = 0, n = 0;
8  
  int tests = 0;
9  
  for (S testID : turingTests) pcall {
10  
    PersistentMap<S, O> scores = new PersistentMap(testID, "turing-scores.map");
11  
    O score = scores.get(getTuringScore_eleuURL);
12  
    if (score == null) continue;
13  
    s += (long) get(score, "score");
14  
    n += (long) get(score, "n");
15  
    ++tests;
16  
  }
17  
  S result = s + " of " + n + " points (" + n(tests, "test");
18  
  int notRun = l(turingTests)-tests;
19  
  if (notRun > 0)
20  
    result += ", " + notRun + " not run yet";
21  
  ret result + ")";
22  
}

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: #1002407
Snippet name: OLD getTuringScore - retrieve Eleu's current "Turing score"
Eternal ID of this version: #1002407/1
Text MD5: feb015588a92f5bb313a12534c26083e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-01-24 01:36:42
Source code size: 784 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 653 / 849
Referenced in: [show references]