Reinforcement learning (RL) is a field in machine learning. It is distinguished from supervised learning and unsupervised learning. It emphasizes how to act based on the environment to maximize expected benefits. Basic operating steps: The agent learns agent
in the environment , performs actions based on the state of the environment (or observed ) , and guides better actions based on feedback (rewards) from the environment. For example, in the Cart pole game of this project, it is the pole in the animation, and the pole can be moved to the left or right .environment
state
observation
action
reward
agent
action
In [ ]:
## Install dependencies !pip install pygame !pip install gym !pip install atari_py !pip install parl
In [12]:
import gym import us import random import collections import paddle import paddle.nn as nn import numpy as np import paddle.nn.functional as F
1. Experience playback part
The main things that experience playback does