Libraryless. Click here for Pure Java version (2484L/16K).
static <A> Pair<A, Double> ai_bestScoringRandomThing_nAttempts(long n, IF0<A> maker, IF1<A, Double> scoringFunction) { new Best<A> best; for ping (long i = 0; i < n; i++) { A a = maker!; double score = scoringFunction.get(a); best.put(a, score); } ret best.pair(); }
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: | 259 / 328 |
Version history: | 2 change(s) |
Referenced in: | [show references] |