### 统计代写|强化学习作业代写Reinforcement Learning代考|Challenges in Approximation

statistics-lab™ 为您的留学生涯保驾护航 在代写强化学习Reinforcement Learning方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写强化学习Reinforcement Learning代写方面经验极为丰富，各种代写强化学习Reinforcement Learning相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 统计代写|强化学习作业代写Reinforcement Learning代考|Challenges in Approximation

While we leverage the knowledge of supervised learning-based methods like gradient descent explained earlier, we have to keep two things in mind that make gradient-based methods harder to work in reinforcement learning as compared to the supervised learning.
First, in supervised learning, the training data is held constant. The data is generated from the model, and while we do, the model does not change. It is a ground truth that is given to us and that we are trying to approximate by using the data to learn about the way inputs are mapped to outputs. The data provided to the training algorithm is external to the algorithm, and it does not depend on the algorithm in any way. It is given as constant and independent of the learning algorithm. Unfortunately, in RL, especially in a model-free setup, such is not the case. The data used to generate training samples are based on the policy the agent is following, and it is not a complete picture of the underlying model. As we explore the environment, we learn more, and a new set of training data is generated. We either use the MC-based approach of observing an actual trajectory or bootstrap under TD to form an estimate of the target value, the $y(t)$. As we explore and learn more, the target $y(t)$ changes, which is not the case in supervised learning. This is known as the problem of nonstationary targets.

Second, supervised learning is based on the theoretical premise of samples being uncorrelated to each other, mathematically known as i.i.d. (for “independent identically distributed”) data. However, in RL, the data we see depends on the policy that the agent followed to generate the data. In a given episode, the states we see are dependent on the policy the agent is following at that instant. States that come in later time steps depend

on the action (decisions) the agent took earlier. In other words, the data is correlated. The next state $s_{t+1}$ we see depends on the current state $s_{t}$ and the action $a_{t}$ agent takes in that state.
These two issues make function approximation harder in an RL setup. As we go along, we will see the various approaches that have been taken to address these challenges.
With a broad understanding of the approach, it is time now to start with our usual course of first looking at value prediction/estimate to learn a function that can represent the value functions. We will then look at the control aspect, i.e., the process of the agent trying to optimize the policy. It will follow the usual pattern of using Generalized Policy Iteration (GPI), just like the approach in the previous chapter.

## 统计代写|强化学习作业代写Reinforcement Learning代考|Incremental Prediction

In this section, we will look at the prediction problem, i.e., how to estimate the state values using function approximation.

Following along, let’s try to extend the supervised training process of finding a model using training data consisting of inputs and targets to function approximation under RL using the loss function in (5.4) and weight update in (5.5). If you compare the loss function in (5.4) and MC/TD updates in (5.2) and (5.3), you can draw a parallel by thinking of MC and TD updates as operations, which are trying to minimize the error between the actual target $v_{\pi}(s)$ and the current estimate $v(s)$. We can represent the loss function as follows:
$$J(w)=E_{\pi}\left[V_{\pi}(s)-V_{t}(s)\right]^{2}$$
Following the same derivation as in (5.5) and using stochastic gradient descent (i.e., replacing expectation with update at each sample), we can write the update equation for weight vector $w$ as follows:
$$\begin{gathered} w_{t+1}=w_{t}-\alpha \cdot \nabla_{w} J(w) \ w_{t+1}=w_{t}+\alpha \cdot\left[V_{\pi}(s)-V_{t}(s ; w)\right] \cdot \nabla_{w} V_{t}(s ; w) \end{gathered}$$

However, unlike supervised learning, we do not have the actual/target output values $V_{\pi}(s)$; rather, we use estimates of these targets. With $\mathrm{MC}$, the estimate/target of $V_{\pi}(s)$ is $G_{\mathrm{r}}(s)$, while the estimate/target under $\mathrm{TD}(0)$ is $R_{t+1}+\gamma * V_{t}\left(s^{\prime}\right)$. Accordingly, the updates under $\mathrm{MC}$ and $\mathrm{TD}(0)$ with functional approximation can be written as follows.
Here is the MC update:
$$w_{t+1}=w_{t}+\alpha \cdot\left[G_{t}(s)-V_{t}(s ; w)\right] \cdot \nabla_{w} V_{t}(s ; w)$$
Here is the $\operatorname{TD}(0)$ update:
$$w_{t+1}=w_{t}+\alpha \cdot\left[R_{t+1}+\gamma * V_{t}\left(s^{\prime} ; w\right)-V_{t}(s ; w)\right] \cdot \nabla_{w} V_{t}(s ; w)$$
A similar set of equations can be written for q-values. We will see that in the next section. This is along the same lines of what we did for the MC and TD control sections in the previous chapter.

Let’s first consider the setup of linear approximation where the state value $\hat{v}(s ; w)$ can be expressed as a dot product of state vector $x(s)$ and weight vector $w$ :
$$\hat{v}(s ; w)=x(s)^{T} \cdot w=\sum_{i} x_{i}(s) * w_{i}$$
The derivative of $\hat{v}(s ; w)$ with respect to $w$ will now be simply state vector $x(s)$.
$$\Delta_{w} V_{t}(s ; w)=x(s)$$
Combining (5.11) with equation (5.7) gives us the following:
$$w_{t+1}=w_{t}+\alpha \cdot\left[V_{x}(s)-V_{t}(s ; w)\right] \cdot x(s)$$

## 统计代写|强化学习作业代写Reinforcement Learning代考|Incremental Control

Just like in the previous chapter, we will follow a similar approach. We start with function approximation to estimate the q-values.
$$\hat{q}(s, a ; w) \approx q_{\pi}(s, a)$$

Like before, we form a loss function between the target and current value.
$$J(w)=E_{\pi}\left[\left(q_{\pi}(s, a)-\hat{q}(s, a ; w)\right)^{2}\right]$$
Loss is minimized with respect to $w$ to carry out stochastic gradient descent:
$$w_{t+1}=w_{t}-\alpha \cdot \nabla_{u} J(w)$$
where,
$$\nabla_{w} J(w)=\left(q_{n}(s, a)-\hat{q}(s, a ; w)\right) . \nabla_{w} \hat{q}(s, a ; w)$$
Like before, we can simplify the equation when $\hat{q}(s, a ; w)$ uses linear approximation with $\hat{q}(s, a ; w)=x(s, a)^{T} . w$. The derivative $\nabla_{w} \hat{q}(s, a ; w)$, in a linear case as shown previously, will become $\nabla_{w} \hat{q}(s, a ; w)=x(s, a)$.

Next, as we do not know the true q-value $q_{n}(s, a)$, we replace it with the estimates using either MC or TD, giving us a set of equations.
Here is the MC update:
$$w_{t+1}=w_{t}+\alpha \cdot\left[G_{t}(s)-q_{t}(s, a ; w)\right] \cdot \nabla_{w} q_{t}(s, a)$$
Here is the $\operatorname{TD}(0)$ update:
$$w_{t+1}=w_{t}+\alpha \cdot\left[R_{t+1}+\gamma * q_{t}\left(s^{\prime}, a^{\prime} ; w\right)-q_{t}(s, a ; w)\right] \cdot \nabla_{w} q_{t}(s ; a ; w)$$
These equations allow us to carry out q-value estimation/prediction. This is the evaluation step of Generalized Policy Iteration where we carry out multiple rounds of gradient descent to improve on the q-value estimates for a given policy and get them close to the actual target values.
Evaluation is followed by greedy policy maximization to improve the policy. Figure $5-4$ shows the process of iteration under GPI with function approximation.

## 统计代写|强化学习作业代写Reinforcement Learning代考|Incremental Prediction

Ĵ(在)=和圆周率[在圆周率(s)−在吨(s)]2

Δ在在吨(s;在)=X(s)

## 统计代写|强化学习作业代写Reinforcement Learning代考|Incremental Control

q^(s,一种;在)≈q圆周率(s,一种)

Ĵ(在)=和圆周率[(q圆周率(s,一种)−q^(s,一种;在))2]

∇在Ĵ(在)=(qn(s,一种)−q^(s,一种;在)).∇在q^(s,一种;在)

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。