agentscope.environment.event module
The events which can be bound to envs.
- class agentscope.environment.event.Event(name: str, args: dict | None = None, returns: Any | None = None)[source]
Bases:
object
A class representing the information of an event.
It contains the name of the event, the arguments of the event, and the returns of the event.
- property name: str
Return the name of the event.
- property args: dict
Return the arguments of the event.
- property returns: Any
Return the returns of the event.
- class agentscope.environment.event.Getable[source]
Bases:
ABC
Representing an env whose value can be gotten.
- class agentscope.environment.event.Setable[source]
Bases:
ABC
Representing an env whose value can be set.
- class agentscope.environment.event.Movable2D[source]
Bases:
ABC
A class representing an env can be moved in 2D.
- abstract move_by(x: float, y: float) bool [source]
Move the env in 2D by the given vector.
- Parameters:
x (float) – The movement in x direction.
y (float) – The movement in y direction.
- Returns:
Whether the movement was successful.
- Return type:
bool
- class agentscope.environment.event.Holdable[source]
Bases:
ABC
A class representing an env can be held,and during the holding period, all access behaviors except the owner are prohibited.