91、强化学习中的泛化与应用

强化学习泛化与应用解析

强化学习中的泛化与应用

一、Q学习与SARSA对比

Q学习是一种主动学习方法,用于学习每个状态下每个动作的价值Q(s, a)。以下是Q学习代理的代码:

function Q-LEARNING-AGENT(percept) returns an action
    inputs: percept, a percept indicating the current state s′ and reward signal r
    persistent: Q, a table of action values indexed by state and action, initially zero
              Nsa, a table of frequencies for state–action pairs, initially zero
              s, a, the previous state and action, initially null
    if s is not null then
        increment Nsa[s,a]
        Q[s,a]←Q[s,a] + α(Nsa[s,a])(r + γ maxa′ Q[s′,a′] −Q[s,a])
    s,a←s′,argmaxa′ f(Q[s′,a′],Nsa[s′,a′])
    return a

Q学习比SARSA更灵活,Q学习代理可以在各种探索策略的控制下学习如何表现良好。而SARSA适用于整体策略部分由其他代理或程序控制的情况,此时学习实际会发生的Q函数更好。不过,Q学

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值