Agent

class emflow.models.agent.Agent[source]

Bases: Model, ABC

abstract act(state)[source]

Choose an action based on the given state.

Parameters:

state: The current state of the environment.

Returns:

action: The action chosen by the agent.

learn(state, action, reward, next_state)[source]

Learn from the experience (used in training).

Parameters:

state: The current state of the environment. action: The action taken in the state. reward: The reward received from the environment. next_state: The next state of the environment.