码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • Machine learning week 10(Andrew Ng)


    文章目录

      • Reinforcement learning
        • 1. Reinforcement learning introduction
          • 1.1. What is Reinforcement Learning?
          • 1.2. Mars rover example
          • 1.3. The return in Reinforcement learning
          • 1.4. Making decisions: Policies in reinforcement learning
          • 1.5. Review of key concepts
        • 2. State-action value function
          • 2.1. State-action value function definition
          • 2.2. State-action value function example
          • 2.3. Bellman Equation
          • 2.4. Random (stochastic) environment
        • 3. Continuous state spaces
          • 3.1. Example of continuous state space applications
          • 3.2. Lunar lander
          • 3.3. Learning the state-value function
          • 3.4. Algorithm refinement: Improved neural network architecture
          • 3.5. Algorithm refinement: ε-greedy policy
          • 3.6. Algorithm refinement: Mini-batch and soft update
          • 3.7. The state of reinforcement learning
      • Summary

    Reinforcement learning

    1. Reinforcement learning introduction

    1.1. What is Reinforcement Learning?

    The key idea is rather than you need to tell the algorithm what the right output y for every single input is, all you have to do instead is specify a reward function that tells it when it’s doing well and when it’s doing poorly.

    1.2. Mars rover example
    1.3. The return in Reinforcement learning

    在这里插入图片描述
    The first step is r 0 r^0 r0.
    在这里插入图片描述
    Select the orientation according to the first two tables

    1.4. Making decisions: Policies in reinforcement learning

    For example, π ( 2 ) \pi(2) π(2) is left while π ( 5 ) \pi(5) π(5) is right. The number expresses state.
    在这里插入图片描述

    1.5. Review of key concepts

    在这里插入图片描述
    在这里插入图片描述

    2. State-action value function

    2.1. State-action value function definition

    在这里插入图片描述
    The iteration will be used.
    在这里插入图片描述
    在这里插入图片描述

    2.2. State-action value function example
    2.3. Bellman Equation

    Q ( s , a ) = R ( s ) + r ∗ m a x Q ( s ′ , a ′ ) Q(s,a) = R(s) + r * max Q(s^{'},a^{'}) Q(s,a)=R(s)+r∗maxQ(s′,a′)
    在这里插入图片描述

    2.4. Random (stochastic) environment

    Sometimes it actually ends up accidentally slipping and going in the opposite direction.

    3. Continuous state spaces

    3.1. Example of continuous state space applications

    Every variable is continuous.

    3.2. Lunar lander

    在这里插入图片描述

    3.3. Learning the state-value function

    在这里插入图片描述
    在这里插入图片描述
    Q is a random value at first. We will train the model to find a better Q.
    在这里插入图片描述

    3.4. Algorithm refinement: Improved neural network architecture

    在这里插入图片描述

    3.5. Algorithm refinement: ε-greedy policy

    ε = 0.05
    在这里插入图片描述
    If we choose a bad ε, we may take 100 times as long.

    3.6. Algorithm refinement: Mini-batch and soft update

    The idea of mini-batch gradient descent is to not use all 100 million training examples on every single iteration through this loop. Instead, we may pick a smaller number, let me call it m prime equals say, 1,000. On every step, instead of using all 100 million examples, we would pick some subset of 1,000 or m prime examples.
    在这里插入图片描述
    在这里插入图片描述

    • Soft update
      When we set Q equals to Q n e w Q_{new} Qnew​, it can make a very abrupt change to Q.So we will adjust the parameters in Q.
      W = 0.01 ∗ W n e w + 0.99 W W = 0.01*W_{new} + 0.99 W W=0.01∗Wnew​+0.99W
      B = 0.01 ∗ B n e w + 0.99 B B = 0.01*B_{new} + 0.99 B B=0.01∗Bnew​+0.99B
    3.7. The state of reinforcement learning

    在这里插入图片描述

    Summary

    在这里插入图片描述

  • 相关阅读:
    做了9年程序员,为什么我还摆脱不了复制粘贴?
    RocketMQ Dashboard说解
    MySQL主从复制-读写分离
    c-raft分布式存储方案
    【华为OD题库-025】 找出两个整数数组中同时出现的整数-java
    Neo4j CQL
    P2002 消息扩散
    Linux内存管理(二十二):页面回收简介和 kswapd(1)
    C语言通用交换和查询函数
    Python中的三元运算符详解
  • 原文地址:https://blog.csdn.net/weixin_62012485/article/details/126639368
  • 最新文章
  • 【JVM】编译执行与解释执行的区别是什么?JVM 使用哪种方式?
    用 Hashids 优雅解决 C 端自增 ID 暴露问题
    V8引擎 精品漫游指南--Ignition篇(上) 指令 栈帧 槽位 调用约定 内存布局 基础内容
    LLVM Pass快速入门(四):代码插桩
    milkup:桌面端 markdown AI续写和即时渲染
    基于项目工程构建SBOM(软件物料清单)的研究
    鸿蒙应用开发UI基础第二节:鸿蒙应用程序框架核心解析与实操
    .NET 中如何快速实现 List 集合去重?
    扣子Coze实战:从0到1打造抖音+小红书热点监控智能体
    浅谈数据访问层
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
小工具 小游戏
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1

京公网安备 11010502049817号