// returns optimized specimen, score static <A> Pair<A, Double> racerOptimize(RandomAndVary<A> r, F1<A, Double> scorer, O... _) { new AIStrategy_Racer_RandomWithVary<A> strategy; strategy.submit = scorer; strategy.random = func -> A { r.randomInstance() }; strategy.vary = func(A a) -> A { r.varyInstance(a) }; ret bestAsPair(runStrategyWhileImprovement(strategy, _)); }
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: | #1022938 |
| Snippet name: | racerOptimize - optmization with "Racer" algorithm |
| Eternal ID of this version: | #1022938/5 |
| Text MD5: | 5b704628c20c8a0c279d4d78d1f5fd55 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-05-05 19:44:35 |
| Source code size: | 387 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 516 / 549 |
| Version history: | 4 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |