Unity 机器学习代理工具包 (ML-Agents) 是一个开源项目,它使游戏和模拟能够作为训练智能代理的环境。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

30 行
1.1 KiB

using System;
using System.Collections.Generic;
namespace MLAgents
{
/// <summary>
/// IPolicy is connected to a single Agent. Each time the agent needs
/// a decision, it will request a decision to the Policy. The decision
/// will not be taken immediately but will be taken before or when
/// DecideAction is called.
/// </summary>
internal interface IPolicy : IDisposable
{
/// <summary>
/// Signals the Brain that the Agent needs a Decision. The Policy
/// will make the decision at a later time to allow possible
/// batching of requests.
/// </summary>
/// <param name="info"></param>
/// <param name="sensors"></param>
void RequestDecision(AgentInfo info, List<ISensor> sensors);
/// <summary>
/// Signals the Policy that if the Decision has not been taken yet,
/// it must be taken now. The Brain is expected to update the actions
/// of the Agents at this point the latest.
/// </summary>
float[] DecideAction();
}
}