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

9
LINES

< > BotCompany Repo | #1027473 // ai_bestScoringRandomThing_nAttempts

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2484L/16K).

1  
static <A> Pair<A, Double> ai_bestScoringRandomThing_nAttempts(long n, IF0<A> maker, IF1<A, Double> scoringFunction) {
2  
  new Best<A> best;
3  
  for ping (long i = 0; i < n; i++) {
4  
    A a = maker!;
5  
    double score = scoringFunction.get(a);
6  
    best.put(a, score);
7  
  }
8  
  ret best.pair();
9  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027473
Snippet name: ai_bestScoringRandomThing_nAttempts
Eternal ID of this version: #1027473/3
Text MD5: 07b076ddc4a3382963eec2055796a0ce
Transpilation MD5: 03fb9543fa4071cf0c7403536f790f08
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-22 13:41:40
Source code size: 294 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 261 / 331
Version history: 2 change(s)
Referenced in: [show references]