| Package | Description |
|---|---|
| net.zomis.aiscores.extra |
| Modifier and Type | Method and Description |
|---|---|
static <A,B> ParamAndField<A,B> |
ScoreUtils.pickBest(FieldScoreProducer<A,B> producer,
A[] params,
Random random)
Pick a random best
FieldScore when scoring.NOTE: Because an underlying HashMap is used, to guarantee the same randomization, both the A and B classes must implement hashCode properly!NOTE: When scoring multiple parameters, the second must exceed in score in order to be chosen, if all scores are equal the first parameter will be selected. |
static <A,B> ParamAndField<A,B> |
ScoreUtils.pickBest(FieldScoreProducer<A,B> producer,
A params,
Random random)
Pick a random best
FieldScore when scoring.NOTE: Because an underlying HashMap is used, to guarantee the same randomization, the B parameter must implement hashCode properly! |
static <A,B> ParamAndField<A,B> |
ScoreUtils.pickBest(Map<A,FieldScores<A,B>> scores,
Random random) |
Copyright © 2014. All rights reserved.