Fundamentals of reinforcement learning

Reinforcement Learning with Gymnasium in Python

Fouad Trad

Machine Learning Engineer

Reinforcement learning

 

  • Agent learns through trial and error

 

Image showing two icons, one for an agent, and the other for the environment.

Reinforcement Learning with Gymnasium in Python

Reinforcement learning

 

  • Agent learns through trial and error

 

Image showing that observations are given from the environment to the agent.

Reinforcement Learning with Gymnasium in Python

Reinforcement learning

 

  • Agent learns through trial and error

 

Image showing that the environment provides the agent with observations, and then the agent performs actions accordingly.

Reinforcement Learning with Gymnasium in Python

Reinforcement learning

 

  • Agent learns through trial and error
  • Agent receives:
    • Rewards for good decisions
    • Penalties for bad decisions
  • Goal: maximize positive feedback over time

 

Image showing that the environment provides the agent with observations, then the agent performs actions, and receives rewards or penalties based on these actions.

Reinforcement Learning with Gymnasium in Python

RL as training a pet

Image showing an old man (the environment) training a pet (the agent).

Reinforcement Learning with Gymnasium in Python

RL vs. other ML types

The image shows a table with the title "Supervised Learning," indicating that the data type used is labeled data, the main objective is to predict outcomes based on input data, and it is suitable for classification and regression tasks.

Reinforcement Learning with Gymnasium in Python

RL vs. other ML types

The image shows a table comparing Supervised Learning and Unsupervised Learning. For Supervised Learning: Data Type is labeled data, Main Objective is to predict outcomes based on input data, and it's suitable for classification and regression. For Unsupervised Learning: Data Type is unlabeled data, Main Objective is to discover underlying patterns or associations in data, with suitability for clustering and association analysis.

Reinforcement Learning with Gymnasium in Python

RL vs. other ML types

The image displays a table that extends the comparison to include RL alongside Supervised and Unsupervised Learning. Supervised Learning uses labeled data to predict outcomes and is suitable for classification and regression. Unsupervised Learning uses unlabeled data to discover patterns or associations, suitable for clustering and association analysis. EL does not require predefined training data and focuses on making decisions that maximize rewards from the environment, suitable for decision-making tasks.

Reinforcement Learning with Gymnasium in Python

When to use RL?

 

  • Sequential decision-making
    • Decisions influence future observations
  • Learning through rewards and penalties
    • No direct supervision

Icon for a robot

Reinforcement Learning with Gymnasium in Python

Appropriate for RL: playing video games

  • Player makes sequential decisions
  • Receives points and loses lives depending on actions

Image showing a video game scene where the agent is taking a decision.

Reinforcement Learning with Gymnasium in Python

Inappropriate for RL: in-game object recognition

  • No sequential decision-making
  • No interaction with an environment

Image showing a video game frame where the goal is to recognize different kinds of pokemons.

Reinforcement Learning with Gymnasium in Python

RL applications

Robotics
  • Robot walking
  • Object manipulation

Image showing a robot hand.

Reinforcement Learning with Gymnasium in Python

RL applications

Robotics
  • Robot walking
  • Object manipulation

Image showing a robot hand.

Finance
  • Optimizing trading and investment
  • Maximize profit

Image depicting a large sum of money flying out of an open briefcase against a blue background, conveying the concept of financial success.

Reinforcement Learning with Gymnasium in Python

RL applications

Autonomous Vehicles
  • Enhancing safety and efficiency
  • Minimizing accident risks

Image showing several autonomous vehicles driving on the road.

Reinforcement Learning with Gymnasium in Python

RL applications

Autonomous Vehicles
  • Enhancing safety and efficiency
  • Minimizing accident risks

Image showing several autonomous vehicles driving on the road.

Chatbot development
  • Enhancing conversational skills
  • Improving user experiences

Image showing a conversational chatbot.

Reinforcement Learning with Gymnasium in Python

What's next?

In this course we will:

  • Understand RL foundations and principles
  • Identify, frame, and solve RL problems
  • Application with Gymnasium

Image for the Gymnasium logo.

Reinforcement Learning with Gymnasium in Python

Let's practice!

Reinforcement Learning with Gymnasium in Python

Preparing Video For Download...