abstract sclass AI_Random_abstract extends AI {
new Best<Submission> best;
void go {
if (round() == 1 && best.has()) // resubmit our best from last round
submit(best.get());
else {
Submission guess = guess();
updateBest(guess, submit(guess));
}
}
void updateBest(Submission guess, double score) {
best.put(guess, score);
}
abstract Submission guess();
}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: | #1014959 |
| Snippet name: | AI_Random_abstract |
| Eternal ID of this version: | #1014959/2 |
| Text MD5: | ba58b37c2fc274ace50e6284d9b66acd |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-05-06 18:25:42 |
| Source code size: | 425 bytes / 18 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 874 / 1437 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |