Class AffinityEngine<K>
java.lang.Object
ke.ric.api.affinity.AffinityEngine<K>
Deterministic evidence aggregation and guidance shared by addon-owned processes.
Addons supply candidates, evidence, eligibility and route completion; this class
has no item, recipe, climate or process-specific rules.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordOne independent piece of evidence, optionally weighted by quantity.static final record -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaggregate(Collection<AffinityEngine.Contribution<K>> contributions) Applies contributions in caller order, preserving fractional evidence.contenders(Map<K, Double> scores, Predicate<K> eligible, AffinityEngine.ContenderPolicy policy) A clear leader stands alone; otherwise keep the closest bounded contenders.static <T> Optional<T> Selects the first unfinished action without exposing scores to the player.Missing candidate scores are zero; ineligible candidates never participate.
-
Constructor Details
-
AffinityEngine
-
-
Method Details
-
aggregate
Applies contributions in caller order, preserving fractional evidence. -
rank
-
contenders
public List<AffinityEngine.Ranked<K>> contenders(Map<K, Double> scores, Predicate<K> eligible, AffinityEngine.ContenderPolicy policy) A clear leader stands alone; otherwise keep the closest bounded contenders. -
nextStep
-