System: terminal¶
Terminal state management systems.
Handles win/lose conditions based on objective functions, agent death, and turn limits.
lose_system(state, agent_id)
¶
Set lose flag if agent is dead (idempotent).
Args:
state (State): Current immutable state.
agent_id (EntityID): ID of the agent to check for lose condition.
Returns:
| Name | Type | Description |
|---|---|---|
State |
State
|
Updated state with |
turn_system(state, agent_id)
¶
Set lose flag if turn limit is reached.
Args:
state (State): Current immutable state.
agent_id (EntityID): ID of the agent to check for turn limit.
Returns:
| Name | Type | Description |
|---|---|---|
State |
State
|
Updated state with |
win_system(state, agent_id)
¶
Set win flag if agent meets objective function (idempotent).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
State
|
Current immutable state. |
required |
agent_id
|
EntityID
|
ID of the agent to check for win condition. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
State |
State
|
Updated state with |