深度学习入门(9) - Reinforcement Learning 强化学习

Reinforcement Learning

an agent performs actions in environment, and receives rewards

goal: Learn how to take actions that maximize reward

Stochasticity: Rewards and state transitions may be random

Credit assignment : Reward r t r_t rt may not directly depend on action a t a_t at

Nondifferentiable: Can't backprop through the world

Nonstationary: What the agent experiences depends on how it acts

Markov Decision Process (MDP)

Mathematical formalization of the RL problem: A tuple ( S , A , R , P , γ ) (S,A,R,P,\gamma) (S,A,R,P,γ)

S S S: Set of possible states

A A A: Set of possible actions

R R R: Distribution of reward given (state, action) pair

P P P: Transition probability: distribution over next state given (state, action)

γ \gamma γ: Discount factor (trade-off between future and present rewards)

Markov Property: The current state completely characterizes the state of the world. Rewards and next states depend only on current state, not history.

Agent executes a policy π \pi π giving distribution of actions conditioned on states.

Goal : Find best policy that maximizes cumulative discounted reward ∑ t γ t r t \sum_t \gamma^tr_t ∑tγtrt

We will try to find the maximal expected sum of rewards to reduce the randomness.

Value function V π ( s ) V^{\pi}(s) Vπ(s): expected cumulative reward from following policy π \pi π from state s s s

Q function Q π ( s , a ) Q^{ \pi}(s,a) Qπ(s,a) : expected cumulative reward from following policy π \pi π from taking action a a a in state s s s

Bellman Equation

After taking action a in state s, we get reward r and move to a new state s'. After that, the max possible reward we can get is max ⁡ a ′ Q ∗ ( s ′ , a ′ ) \max_{a'} Q^*(s',a') maxa′Q∗(s′,a′)

Idea: find a function that satisfy Bellman equation then it must be optimal

start with a random Q, and use Bellman equation as an update rule.

But if the state is large/infinite, we can't iterate them.

Approximate Q(s, a) with a neural network, use Bellman equation as loss function.

-> Deep q learning

Policy Gradients

Train a network π θ ( a , s ) \pi_{\theta}(a,s) πθ(a,s) that takes state as input, gives distribution over which action to take

Objective function: Expected future rewards when following policy π θ \pi_{\theta} πθ

Use gradient ascent -> play some tricks to make it differentiable

Other approaches:

Actor-Critic

Model-Based

Imitation Learning

Inverse Reinforcement Learning

Adversarial Learning

...

Stochastic computation graphs

相关推荐
辰辉创聚1 分钟前
重组细胞因子全解析:定义、分类与应用指南
人工智能·eclipse·emacs·白细胞介素·重组蛋白·重组细胞因子
小小测试开发2 分钟前
RAG评测:把忠实度、检索命中率、噪声敏感度做成可回归的流水线
人工智能·数据挖掘·回归·kotlin
问天_观心5 分钟前
深入学习Transformer(一)
人工智能·python·深度学习·神经网络·学习·transformer
腾讯数据架构师7 分钟前
摩尔线程 GPU 怎么接入 Kubernetes 跑 DeepSeek?CubeStudio 摩尔线程(MUSA)适配实操
人工智能·云原生·容器·kubernetes·开源·mlops·maas
liliangcsdn9 分钟前
skewness收益偏度取负因子背后逻辑的探索
人工智能·算法·机器学习
yyxx41212310 分钟前
钉钉专属版一年多少钱?2026最新价格
大数据·人工智能·物联网
雷帝木木11 分钟前
DVC数据版本控制实战:让训练数据像代码一样可追溯
人工智能·python·深度学习·机器学习
楠楠子呀12 分钟前
号码验证技术解析:从原理到实践
运维·人工智能·ai·electron·自动化
AI棒棒牛13 分钟前
YOLO26最新创新改进系列:Dirichlet 分类证据 + DER 连续框不确定性,独家超强创新!
人工智能·分类·数据挖掘
月光船幽幽13 分钟前
五层探针的哲学跃迁
人工智能·python