Class SimulationDecisionAdapter


  • public final class SimulationDecisionAdapter
    extends java.lang.Object
    Converts decision-tree simulation results into executable in-game movement and interaction actions.
    • Constructor Detail

      • SimulationDecisionAdapter

        @Inject
        public SimulationDecisionAdapter​(Context ctx,
                                         MovementService movementService)
        Constructs a decision adapter for converting and executing simulation outcomes.
        Parameters:
        ctx - shared API context.
        movementService - movement executor service.
    • Method Detail

      • adapt

        public SimulationDecisionAdapter.ExecutableAction adapt​(DecisionTreeSearch.Result result,
                                                                SimulationState rootState,
                                                                java.lang.String interactionAction,
                                                                int interactionDistance)
        Converts a decision result into movement and optional NPC interaction.
        Parameters:
        result - Decision tree result.
        rootState - State used as the decision root.
        interactionAction - NPC action to execute (for example "Attack"), null/empty disables interactions.
        interactionDistance - Chebyshev distance for selecting an interaction target.
        Returns:
        Executable action translated from the simulation decision.
      • execute

        public boolean execute​(SimulationDecisionAdapter.ExecutableAction action)
        Executes movement and optional NPC interaction in the game client.
        Parameters:
        action - An executable action to perform
        Returns:
        true when at least one action was executed.