Interface SpartanActionManager


public interface SpartanActionManager
Manages the registry of actions available to an agent.

Concept: If the Agent is the driver, the ActionManager is the steering wheel and pedals. It translates the neural network's mathematical output (just numbers) into meaningful logic events. You must register every possible move (Jump, Shoot, Move Left) with this manager before starting the agent.

  • Method Details

    • registerAction

      @NotNull @NotNull SpartanActionManager registerAction(SpartanAction action)
      Registers a new action. The order of registration matters - it corresponds to the output indices of the neural network.
      Parameters:
      action - the action to register
      Returns:
      this manager (for chaining)
    • getActions

      @NotNull @NotNull List<SpartanAction> getActions()
      Returns all registered actions.
      Returns:
      unmodifiable list of actions
    • getActionsByType

      @NotNull <SpartanActionType extends SpartanAction> @NotNull List<SpartanActionType> getActionsByType(@NotNull @NotNull Class<SpartanActionType> actionClass)
      Finds and returns all actions of a specific class type. Useful for retrieving a set of related actions (e.g., all MovementActions).
      Type Parameters:
      SpartanActionType - the generic type
      Parameters:
      actionClass - the class type to filter by
      Returns:
      list of matching actions
    • getActionsByIdentifier

      @NotNull @NotNull List<SpartanAction> getActionsByIdentifier(@NotNull @NotNull String identifier)
      Finds and returns all actions matching a string identifier.
      Parameters:
      identifier - the identifier to search for
      Returns:
      list of matching actions