Interface Agent
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
CompressorAgent, ProcessAgent, SeparatorAgent
Interface for an individual agent in a multi-agent system.
Each agent controls a subset of process equipment and can communicate with other agents through shared observations or explicit messages.
- Version:
- 1.0
- Author:
- ESOL
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyAction(double[] action) Apply agent's action to the process.doublecomputeReward(StateVector globalState, double[] action) Compute agent's local reward.intGet the dimension of this agent's action space.Get the agent's unique identifier.double[]getLocalObservation(StateVector globalState) Get the agent's local observation from global state.default double[]getMessage(StateVector globalState) Get message to broadcast to other agents.intGet the dimension of this agent's observation space.default booleanisTerminated(StateVector globalState) Check if agent's local termination condition is met.default voidreceiveMessages(Map<String, double[]> messages) Receive messages from other agents.
-
Method Details
-
getAgentId
-
getObservationDim
int getObservationDim()Get the dimension of this agent's observation space.- Returns:
- observation dimension
-
getActionDim
int getActionDim()Get the dimension of this agent's action space.- Returns:
- action dimension
-
getLocalObservation
Get the agent's local observation from global state.- Parameters:
globalState- full system state- Returns:
- local observation array
-
applyAction
void applyAction(double[] action) Apply agent's action to the process.- Parameters:
action- action array
-
computeReward
Compute agent's local reward.- Parameters:
globalState- current global stateaction- action taken- Returns:
- local reward
-
isTerminated
Check if agent's local termination condition is met.- Parameters:
globalState- current global state- Returns:
- true if agent triggers termination
-
getMessage
Get message to broadcast to other agents.- Parameters:
globalState- current state- Returns:
- message array (can be empty)
-
receiveMessages
-