【问题标题】:How to do reinforcement learning with regression instead of classification如何使用回归而不是分类进行强化学习
【发布时间】:2017-12-04 09:43:19
【问题描述】:

我正在尝试将强化学习应用于代理使用循环网络与连续数值输出交互的问题。基本上,这是一个控制问题,其中两个输出控制代理的行为。

我将一个策略定义为 epsilon greedy,其中 (1-eps) 时间使用输出控制值,而 eps 时间使用输出值 +/- 小高斯扰动。 从这个意义上说,代理可以探索。 在大多数强化文献中,我看到策略学习需要离散动作,可以使用 REINFORCE (Williams 1992) 算法学习,但是我不确定在这里使用什么方法。

目前我所做的是使用掩码仅学习最佳选择,使用基于 Metropolis Hastings 的算法来确定过渡是否朝着最佳策略发展。伪代码:

input: rewards, timeIndices
// rewards in (0,1) and optimal is 1 
// relate rewards to likelihood via L(r) = exp(-|r - 1|/std)
// r <= 1 => |r - 1| = 1 - r
timeMask = zeros(timeIndices.length)
neglogLi =  (1 - mean(rewards)) / std
// Go through random order of reward to approximate Markov process
for r,idx in shuffle(rewards, timeIndices):
    neglogLj = (1 - r)/std 
    if neglogLj < neglogLi || log(random.uniform()) < neglogLi - neglogLj:
        // Accept transition, i.e. learn this action
        targetMask[idx] = 1
        neglogLi = neglogLj

这提供了一个targetMask,其中包含将使用标准反向传播学习的操作。

谁能告诉我正确或更好的方法?

【问题讨论】:

标签: reinforcement-learning


【解决方案1】:

策略梯度方法适用于学习连续控制输出。如果您查看http://rll.berkeley.edu/deeprlcourse/#lectures,2 月 13 日的讲座以及 3 月 8 日至 3 月 15 日的讲座可能对您有用。那里也介绍了 Actor Critic 方法。

【讨论】:

    猜你喜欢
    • 2017-01-01
    • 1970-01-01
    • 2019-12-07
    • 2017-11-23
    • 2020-02-05
    • 2018-05-19
    • 2018-04-05
    • 2019-03-31
    • 2019-11-22
    相关资源
    最近更新 更多