Reinforcement-learning-with-tensorflow
Simple Reinforcement learning tutorials, 莫烦Python 中文AI教学
A step-by-step tutorial collection for learning reinforcement learning in Python and TensorFlow, covering algorithms from basic Q-learning up to PPO and A3C, with video companions in English and Chinese.
This repository is a collection of tutorials on reinforcement learning, a branch of machine learning where an AI agent learns by trial and error: it takes actions, receives rewards or penalties, and over time figures out which actions lead to the best outcomes. The tutorials are written in Python using TensorFlow, and they progress from simple starting examples up to more advanced methods developed in recent years.
The creator, MorvanZhou, originally produced these materials in Chinese and also offers companion videos on YouTube and a dedicated Chinese tutorial site called Mofan Python. English-language video explanations are available via a YouTube playlist linked from the README.
The tutorial list covers a wide range of standard reinforcement learning algorithms. It starts with basic methods like Q-learning and Sarsa (which are table-based approaches where the agent memorizes what to do in each situation), then moves into Deep Q Networks (which replace the table with a neural network so the agent can handle more complex situations). From there it covers more specialized variations such as Double DQN, Prioritized Experience Replay, Dueling DQN, Policy Gradients, Actor-Critic, Deep Deterministic Policy Gradient, A3C (a faster parallel training method), Dyna-Q, Proximal Policy Optimization, and a curiosity-driven learning model.
Alongside the algorithm tutorials, the repository includes several experiment folders where these methods are applied to specific challenges: a simulated 2D car, a robot arm, and standard benchmark environments from OpenAI Gym called BipedalWalker and LunarLander. These serve as practical demonstrations of how the algorithms behave on real tasks.
The project is primarily a learning resource rather than a production library. There is no packaged install; you work directly with the Python scripts in each tutorial folder. The README includes donation links for those who find the tutorials useful.
Where it fits
- Work through progressive tutorials to learn core reinforcement learning algorithms like Q-learning, DQN, and Actor-Critic from scratch.
- Run pre-built experiments applying RL algorithms to a simulated robot arm, 2D car, or standard OpenAI Gym environments like LunarLander.
- Use the tutorial scripts as starting templates to build your own RL agent for a custom environment.