Skip to content
Jambity's Blog

强化学习中的数学原理 | 第一课

Lecture 1: Basic Concept in RL Learning

RL2min read...

第1课-基本概念(Part1-State,action,policy等)【强化学习的数学原理】

State: The status of the agent with respect to the environment.

State space: the set of all status

Action: For each state, there are five possible actions:

Action space of a state: the set of all possible actions of a state. action space 依赖状态,不同状态 action space 不一样

一个关于条件概率的数学表述

1786347239390

Policy tells the agent what actions to take at a state.

一个在每个状态下采取什么 action 的说明书

Based on the policy, we get paths with different starting points.

这个说明书能够让我们找到不同起点下的一条action路径

Mathematical representation: using conditional probabilty

实际编程的时候,会用一个数组来记录这样的一个表格

1786348607506

Reward: a real nummber we get after taking an action.

1786349657288

依旧可以用这种表格的形式,但是这样的话只能表示离散的情形

我们也可以用数学的条件概率的表达形式

Math: and

这里是一个deterministic 确定的的例子,reward transition也可以是stochastic随机的

A trajectory is a state-action-reward chain.

1786437149359

包含了 状态、动作、奖励

The return of this trajectory is the sum of all the rewards cooected along the trajectory:

return 是相对一个 trajectory 而言的

return 的作用是什么?

比较 which policy is better

一个轨迹可能是无限的,reward会一直加,return就会加到无穷,这是我们需要解决的问题

例如:

因此我们引入 discount rate

Discounted return:

discount rate 越接近1,越关注长期 reward ;反之更加近视

在一个 policy 下,agent 会在某个终止状态下停下,这样的一条 trajectory 就叫 episode

有些任务没有终止条件,就叫持续性任务。

在网络世界这个例子里,智能体到达目标点后,我们应该终止任务还是继续,这里有一套数学框架来把回合制任务做成持续性任务

  1. 把目标点做成吸收态,一旦 agent 进入就永远不能离开
  2. 把目标点当成普通态,但是只有离开重新进入才能拿到奖励

通过马尔科夫链,把上述的概念串起来,用正式一点的方式

Key elements of MDP:

  • Sets

    • State: the set of states
    • Action: the set of actions is associated for state .
    • Reward: the set of rewards .
  • Probability distribution

    • State transition probability: at state , taking action , the probability to transit to state is
    • Reward probability: at state , taking action , the probability to get reward is
  • Policy: at state , the probability to choose action is

  • Markov property: memoryless property 无记忆性

By using grid‑world examples, we demonstrated the following key concepts:

  • State
  • Action
  • State transition, state transition probability
  • Reward, reward probability
  • Trajectory, episode, return, discounted return
  • Markov decision process

Comments

© Jambity. All rights reserved.......