MathWorks - Mobile View
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
MathWorks
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out

Videos and Webinars

  • MathWorks
  • Videos
  • Videos Home
  • Search
  • Videos Home
  • Search
  • Contact sales
  • Trial software
  Register to watch video
  • Description
  • Related Resources

Reinforcement Learning for an Inverted Pendulum with Image Data

Emmanouil Tzorakoleftherakis, MathWorks

Use Reinforcement Learning Toolbox™ and the DQN algorithm to perform image-based inversion of a simple pendulum. The workflow consists of the following steps: 1) Create the environment, 2) specify policy representation, 3) create agent, 4) train agent, and 5) verify trained policy. 

The provided pendulum environment has predefined observations, actions, and reward. The actions include five possible torque values, 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. Learn how to use Deep Network Designer app to construct a neural network representation of the Q-function, used by the DQN agent to approximate long-term reward.

See how you can visualize the pendulum behavior during training, and monitor training progress. After training is complete, verify the policy in simulation to decide if further training is necessary.

Related Products

  • Reinforcement Learning Toolbox
  • Deep Learning Toolbox
Related Information
Download ebook: Reinforcement Learning with MATLAB and Simulink

Feedback

Featured Product

Reinforcement Learning Toolbox

  • Request Trial
  • Get Pricing

Up Next:

24:56
Optimal Neural Network for Automotive Product Development

Related Videos:

7:01
Inverted Pendulum Control with SimMechanics and QUARC
42:45
Signal Processing and Machine Learning Techniques for...
2:54
Using Image to View Data Instead of surf and view(2)
4:12
Physical Modeling: Building a Rotary Pendulum

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

Select web site

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • 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
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • Contact sales
  • Trial software

Explore Products

  • MATLAB
  • Simulink
  • Student Software
  • Hardware Support
  • File Exchange

Try or Buy

  • Downloads
  • Trial Software
  • Contact Sales
  • Pricing and Licensing
  • How to Buy

Learn to Use

  • Documentation
  • Tutorials
  • Examples
  • Videos and Webinars
  • Training

Get Support

  • Installation Help
  • Answers
  • Consulting
  • License Center
  • Contact Support

About MathWorks

  • Careers
  • Newsroom
  • Social Mission
  • Contact Sales
  • About MathWorks

MathWorks

Accelerating the pace of engineering and science

MathWorks is the leading developer of mathematical computing software for engineers and scientists.

Discover…

  • Select a Web Site United States
  • Patents
  • Trademarks
  • Privacy Policy
  • Preventing Piracy
  • Application Status

© 1994-2021 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

Join the conversation