Categories: Videos

AI learns to balance a stick using Reinforcement Learning



In this video, I show step by step how I made a algorithm to learn from basic left right input how to make an agent balance a stick. This was done using the Gym environment from openAI and with Q-learning!

A good resource for Q-learning is this blogpost: https://www.learndatasci.com/tutorials/reinforcement-q-learning-scratch-python-openai-gym/
You can take a peak at my code here : https://github.com/yacineMahdid/ReinforcementLearning/tree/master/Cartpole

Q learning is defined as follow by wikipedia:
“Q-learning is a model-free reinforcement learning algorithm to learn the value of an action in a particular state. It does not require a model of the environment (hence “model-free”), and it can handle problems with stochastic transitions and rewards without requiring adaptations. ”

—-
Join the Discord for general discussion: https://discord.gg/QpkxRbQBpf

—-
Follow Me Online Here:

Twitter: https://twitter.com/CodeThisCodeTh1
GitHub: https://github.com/yacineMahdid
LinkedIn: https://www.linkedin.com/in/yacine-mahdid-809425163/
Instagram: https://www.instagram.com/yacine_mahdid/
___

Have a great week! 👋

source

staff

Share
Published by
staff

Recent Posts

Here’s HOW TO TURN ON our inclusive language analysis on your #WordPress site! 🌟

If you want to utilize our inclusive language analysis on Yoast SEO, you need to…

23 minutes ago

Using ChatGPT to Trade Stocks | Chris Camillo

Full Episode ► Money Expert: Trump Tariffs Will Make You MASSIVELY RICH - Do This…

28 minutes ago

Google Antigravity Just Killed Every AI Coding Tools (gemini 3 pro)

subscribe for more ► https://bit.ly/3zlUmiS follow me on twitter (x) ► https://twitter.com/corbin_braun join our ai…

33 minutes ago

GPT-5 is a freak

OpenAI GPT-5 full testing & review. #gpt5 #ai #ainews #aitools Thanks to our sponsor Hubspot.…

1 hour ago

Ivory Search WordPress Plugin Tutorial 2025 🔥 – (FAST & Easy!)

Ivory Search WordPress Plugin Tutorial 2025 - (FAST & Easy!) Learn everything there is to…

1 hour ago

Billionaire Ken Griffin Doubles His Stakes In These 3 AI Stocks — Why You Should Buy Them Too

This Video Is About Billionaire Ken Griffin Doubles His Stakes In These 3 AI Stocks…

1 hour ago