Reader small image

You're reading from  Hands-On Machine Learning on Google Cloud Platform

Product typeBook
Published inApr 2018
PublisherPackt
ISBN-139781788393485
Edition1st Edition
Right arrow
Authors (3):
Giuseppe Ciaburro
Giuseppe Ciaburro
author image
Giuseppe Ciaburro

Giuseppe Ciaburro holds a PhD and two master's degrees. He works at the Built Environment Control Laboratory - Università degli Studi della Campania "Luigi Vanvitelli". He has over 25 years of work experience in programming, first in the field of combustion and then in acoustics and noise control. His core programming knowledge is in MATLAB, Python and R. As an expert in AI applications to acoustics and noise control problems, Giuseppe has wide experience in researching and teaching. He has several publications to his credit: monographs, scientific journals, and thematic conferences. He was recently included in the world's top 2% scientists list by Stanford University (2022).
Read more about Giuseppe Ciaburro

V Kishore Ayyadevara
V Kishore Ayyadevara
author image
V Kishore Ayyadevara

V Kishore Ayyadevara leads a team focused on using AI to solve problems in the healthcare space. He has 10 years' experience in data science, solving problems to improve customer experience in leading technology companies. In his current role, he is responsible for developing a variety of cutting edge analytical solutions that have an impact at scale while building strong technical teams. Prior to this, Kishore authored three books — Pro Machine Learning Algorithms, Hands-on Machine Learning with Google Cloud Platform, and SciPy Recipes. Kishore is an active learner with keen interest in identifying problems that can be solved using data, simplifying the complexity and in transferring techniques across domains to achieve quantifiable results.
Read more about V Kishore Ayyadevara

Alexis Perrier
Alexis Perrier
author image
Alexis Perrier

Alexis Perrier is a data science consultant with experience in signal processing and stochastic algorithms. He holds a master's in mathematics from Universit Pierre et Marie Curie Paris VI and a PhD in signal processing from Tlcom ParisTech. He is actively involved in the DC data science community. He is also an avid book lover and proud owner of a real chalk blackboard, where he regularly shares his fascination of mathematical equations with his kids.
Read more about Alexis Perrier

View More author details
Right arrow

Cart-Pole system

The Cart-Pole system is a classic problem of reinforced learning. The system consists of a pole (which acts like an inverted pendulum) attached to a cart via a joint, as shown in the following figure:

The system is controlled by applying a force of +1 or -1 to the cart. The force applied to the cart can be controlled, and the objective is to swing the pole upwards and stabilize it. This must be done without the cart falling to the ground. At every step, the agent can choose to move the cart left or right, and it receives a reward of 1 for every time step that the pole is balanced. If the pole ever deviates by more than 15 degrees from upright, then the procedure ends.

To run the Cart-Pole example using the OpenAI Gym library, simply type the following code:

import gym
env = gym.make('CartPole-v0')
env.reset()
for i in range(1000):
env.render()
env...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Machine Learning on Google Cloud Platform
Published in: Apr 2018Publisher: PacktISBN-13: 9781788393485

Authors (3)

author image
Giuseppe Ciaburro

Giuseppe Ciaburro holds a PhD and two master's degrees. He works at the Built Environment Control Laboratory - Università degli Studi della Campania "Luigi Vanvitelli". He has over 25 years of work experience in programming, first in the field of combustion and then in acoustics and noise control. His core programming knowledge is in MATLAB, Python and R. As an expert in AI applications to acoustics and noise control problems, Giuseppe has wide experience in researching and teaching. He has several publications to his credit: monographs, scientific journals, and thematic conferences. He was recently included in the world's top 2% scientists list by Stanford University (2022).
Read more about Giuseppe Ciaburro

author image
V Kishore Ayyadevara

V Kishore Ayyadevara leads a team focused on using AI to solve problems in the healthcare space. He has 10 years' experience in data science, solving problems to improve customer experience in leading technology companies. In his current role, he is responsible for developing a variety of cutting edge analytical solutions that have an impact at scale while building strong technical teams. Prior to this, Kishore authored three books — Pro Machine Learning Algorithms, Hands-on Machine Learning with Google Cloud Platform, and SciPy Recipes. Kishore is an active learner with keen interest in identifying problems that can be solved using data, simplifying the complexity and in transferring techniques across domains to achieve quantifiable results.
Read more about V Kishore Ayyadevara

author image
Alexis Perrier

Alexis Perrier is a data science consultant with experience in signal processing and stochastic algorithms. He holds a master's in mathematics from Universit Pierre et Marie Curie Paris VI and a PhD in signal processing from Tlcom ParisTech. He is actively involved in the DC data science community. He is also an avid book lover and proud owner of a real chalk blackboard, where he regularly shares his fascination of mathematical equations with his kids.
Read more about Alexis Perrier