Interface BattleEvaluator
- All Known Implementing Classes:
StandardBattleEvaluator
public interface BattleEvaluator
Evaluates the current state of a battle from the perspective of a given team.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionevaluate(BattleEvaluationContext context) This method evaluates the current state of the battle, and returns aBattleEvaluationResult.BattleEvaluatorType<? extends BattleEvaluator> type()
-
Field Details
-
CODEC
-
-
Method Details
-
type
BattleEvaluatorType<? extends BattleEvaluator> type() -
evaluate
This method evaluates the current state of the battle, and returns aBattleEvaluationResult.
This is exposed to provide a greater breakdown of the evaluation, as theBattleEvaluationResultcontains a breakdown of the different factors that were considered in the evaluation, and their individual contributions to the overall evaluation value.
This is useful for debugging and understanding how the evaluation was performed, as well as for providing more detailed information to the user about the evaluation, such as in a battle analysis or in a battle replay.
TheBattleEvaluationContextprovided may provide preferences or hints that influence evaluation behavior. Implementations are not required to honor every hint unless explicitly documented.
To get the overall evaluation value, you can simply callBattleEvaluationResult.getTotalScore(KingfisherSettings)on the result of this method. The score represents how favourable the current state of the battle is for the team being evaluated. The value has the following meaning:- Positive - The current state of the battle is favourable for the team being evaluated.
- Negative - The current state of the battle is unfavourable for the team being evaluated.
- Zero - The current state of the battle is neutral for the team being evaluated.
- Larger absolute values indicate stronger advantage or disadvantage
- Parameters:
context- The context of the battle evaluation- Returns:
- The result of the battle evaluation, containing a breakdown of the different factors that were considered in the evaluation, and their individual contributions to the overall evaluation value.
-