Interface Strategy
- All Superinterfaces:
com.fortemate.dicechess.runtime.BotStrategy, Function<com.fortemate.dicechess.runtime.TurnContext, List<String>>
- All Known Implementing Classes:
OnnxStrategy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface Strategy
extends com.fortemate.dicechess.runtime.BotStrategy, Function<com.fortemate.dicechess.runtime.TurnContext, List<String>>
Common functional interface for Java bot strategies mapping a TurnContext to move notations.
Extends
BotStrategy to provide decision-oriented runtime integration while allowing
simple functional implementations of chooseMoves(TurnContext).-
Method Summary
Modifier and TypeMethodDescriptionapply(com.fortemate.dicechess.runtime.TurnContext context) chooseMoves(com.fortemate.dicechess.runtime.TurnContext context) Choose the best list of move notations (micro-moves forming a turn) for the given TurnContext.default com.fortemate.dicechess.runtime.TurnActiononTurn(com.fortemate.dicechess.runtime.TurnContext context) Methods inherited from interface com.fortemate.dicechess.runtime.BotStrategy
onDoubleDecision, onDoubleOpportunity, onDrawDecision
-
Method Details
-
chooseMoves
Choose the best list of move notations (micro-moves forming a turn) for the given TurnContext.- Parameters:
context- turn context containing DFEN, remaining time, increment, etc.- Returns:
- list of move notations (e.g. ["e2e4", "g1f3"]). Returns empty list if no moves are available or an error occurs.
-
onTurn
default com.fortemate.dicechess.runtime.TurnAction onTurn(com.fortemate.dicechess.runtime.TurnContext context) - Specified by:
onTurnin interfacecom.fortemate.dicechess.runtime.BotStrategy
-
apply
-