载入中...
搜索中...
未找到
eve::agent::IEnvironment类 参考abstract

Adapter for a resettable game, simulation, UI or other decision-making environment. @ownership The caller owns the environment and all domain state. The runner borrows it only for the synchronous call; no references escape. @thread Call on the domain owner thread. Callbacks may call unrelated services, but must not reenter or destroy this environment. The runner holds no locks. 更多...

#include <Agent.h>

Public 成员函数

virtual ~IEnvironment ()=default
 Releases IEnvironment resources.
 
virtual Result< Observation > reset (std::uint64_t seed)=0
 Reset atomically to the injected seed; return initial state (reward zero).
 
virtual Result< Observation > step (std::uint32_t action, double dt)=0
 Execute one legal action, advance exactly dt seconds, then inspect invariants.
 

详细描述

Adapter for a resettable game, simulation, UI or other decision-making environment. @ownership The caller owns the environment and all domain state. The runner borrows it only for the synchronous call; no references escape. @thread Call on the domain owner thread. Callbacks may call unrelated services, but must not reenter or destroy this environment. The runner holds no locks.

备注
reset must reset all relevant state and RNG, including pending events. A failed reset/step returns Result failure, never a synthetic bug or reward. Every search resets and mutates this instance; do not supply a user's unsaved live session. Async hosts implement this adapter in their own driver.

在文件 Agent.h 第 36 行定义.

构造及析构函数说明

◆ ~IEnvironment()

virtual eve::agent::IEnvironment::~IEnvironment ( )
virtualdefault

Releases IEnvironment resources.

成员函数说明

◆ reset()

virtual Result< Observation > eve::agent::IEnvironment::reset ( std::uint64_t  seed)
pure virtual

Reset atomically to the injected seed; return initial state (reward zero).

被这些函数引用 eve::agent::replay() , 以及 eve::agent::run().

◆ step()

virtual Result< Observation > eve::agent::IEnvironment::step ( std::uint32_t  action,
double  dt 
)
pure virtual

Execute one legal action, advance exactly dt seconds, then inspect invariants.

被这些函数引用 eve::agent::replay() , 以及 eve::agent::run().


该类的文档由以下文件生成: