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)[源代码]
基类:
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[源代码]
基类:
ABC
Representing an env whose value can be gotten.
- class agentscope.environment.event.Movable2D[源代码]
基类:
ABC
A class representing an env can be moved in 2D.
- abstract move_by(x: float, y: float) bool [源代码]
Move the env in 2D by the given vector.
- 参数:
x (float) – The movement in x direction.
y (float) – The movement in y direction.
- 返回:
Whether the movement was successful.
- 返回类型:
bool
- class agentscope.environment.event.Holdable[源代码]
基类:
ABC
A class representing an env can be held,and during the holding period, all access behaviors except the owner are prohibited.