The overall algorithm pipeline is as follows:

>

Let's implement it step by step, first imporot some python directories

The following is the main function

>

Deep Q network pipeline is as follows:

>

Class of Deep Q network

>


Action functions of Deep Q network

>






How to learn?

>



Loss curve

>



Use OpenAI gym to visualize

>