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

22 行
756 B

from typing import Dict
from mlagents.trainers.buffer import AgentBuffer
class Optimizer(object):
"""
Creates loss functions and auxillary networks (e.g. Q or Value) needed for training.
Provides methods to update the Policy.
"""
def __init__(self):
self.reward_signals = {}
def update(self, batch: AgentBuffer, num_sequences: int) -> Dict[str, float]:
"""
Update the Policy based on the batch that was passed in.
:param batch: AgentBuffer that contains the minibatch of data used for this update.
:param num_sequences: Number of recurrent sequences found in the minibatch.
:return: A Dict containing statistics (name, value) from the update (e.g. loss)
"""
pass