有银行的多臂强盗的 tensorflow 例子吗?

问题描述

我一直在研究一些 Tensorflow 代理 examples,想知道是否有人知道如何/在何处向环境中添加银行/藏匿处的好示例,以便在代理用完时剧集提前结束的资金?

似乎将逻辑添加到重置函数一个不错的选择,但评论似乎非常坚决不这样做。

 # These two functions below should not be overridden by subclasses.


def _reset(self):
    """Returns a time step containing an observation."""
    return ts.restart(self._observe(),batch_size=self.batch_size)

  def _step(self,action):
    """Returns a time step containing the reward for the action taken."""
    reward = self._apply_action(action)
    return ts.termination(self._observe(),reward)

我最初的做法是:

def _reset(self):
    """Returns a time step containing an observation."""
    self.bank += reward
    return ts.restart(self._observe(),batch_size=self.batch_size)

从_take_action(...) 中其他地方定义的银行中减去。这似乎在运行,但我一直在阅读一些文档,我不确定它的行为方式是否符合我的想法。这是在 MAB 问题中添加银行的合适方法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)