DQN Control for Inverted Pendulum with Reinforcement Learning Toolbox
Use the Deep Q-Network (DQN) algorithm in Reinforcement Learning Toolbox™ to1) create the environment, 2) create DQN agent, 3) customize policy representation, 4) train DQN agent, 5) verify trained policy, and 6) deploy trained policy with code generation.
The provided pendulum environment has predefined observations, actions, and reward. The actions include five possible torque values, while the observations include a 50x50 grayscale image as well as the angular rate of the pendulum, and the reward is the distance from the desired upward position. See how the default DQN agent feature automatically constructs a neural network representation of the Q-function, used by the DQN agent to approximate long-term reward. Learn how to use Deep Network Designer app to graphically customize the generated Q-function representation.
See how you can visualize the pendulum behavior and logged data during training, and monitor training progress. After training is complete, verify the policy in simulation to decide if further training is necessary. If you are happy with the design, deploy the trained policy using automatic code generation.
Published: 20 Sep 2023
Related Products
Learn More
Featured Product
Reinforcement Learning Toolbox
Up Next:
Related Videos:
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia-Pacifico
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)