1 | static F1<ExecutedRule, Int> ai_executedRuleScorer() { |
2 | ret func(ExecutedRule r) -> Int { |
3 | int n = r.failureLevel(); |
4 | if (n == 0) |
5 | ret nempty(r.output) ? 0 : nempty(r.facts) ? 1 : 2; |
6 | else |
7 | ret n < 0 ? 10 : Int.MAX_VALUE-n; |
8 | }; |
9 | } |
Began life as a copy of #1018347
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018350 |
Snippet name: | ai_executedRuleScorer - lower is better |
Eternal ID of this version: | #1018350/5 |
Text MD5: | 98e10a2fa8e170e4e2e1aecaccb6bdff |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-09-20 06:52:29 |
Source code size: | 258 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 384 / 427 |
Version history: | 4 change(s) |
Referenced in: | [show references] |