Python Reinforcement Learning Projects
eBook - ePub

Python Reinforcement Learning Projects

Eight hands-on projects exploring reinforcement learning algorithms using TensorFlow

Sean Saito, Yang Wenzhuo, Rajalingappaa Shanmugamani

  1. 296 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Python Reinforcement Learning Projects

Eight hands-on projects exploring reinforcement learning algorithms using TensorFlow

Sean Saito, Yang Wenzhuo, Rajalingappaa Shanmugamani

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Implement state-of-the-art deep reinforcement learning algorithms using Python and its powerful libraries

Key Features

  • Implement Q-learning and Markov models with Python and OpenAI
  • Explore the power of TensorFlow to build self-learning models
  • Eight AI projects to gain confidence in building self-trained applications

Book Description

Reinforcement learning is one of the most exciting and rapidly growing fields in machine learning. This is due to the many novel algorithms developed and incredible results published in recent years.

In this book, you will learn about the core concepts of RL including Q-learning, policy gradients, Monte Carlo processes, and several deep reinforcement learning algorithms. As you make your way through the book, you'll work on projects with datasets of various modalities including image, text, and video. You will gain experience in several domains, including gaming, image processing, and physical simulations. You'll explore technologies such as TensorFlow and OpenAI Gym to implement deep learning reinforcement learning algorithms that also predict stock prices, generate natural language, and even build other neural networks.

By the end of this book, you will have hands-on experience with eight reinforcement learning projects, each addressing different topics and/or algorithms. We hope these practical exercises will provide you with better intuition and insight about the field of reinforcement learning and how to apply its algorithms to various problems in real life.

What you will learn

  • Train and evaluate neural networks built using TensorFlow for RL
  • Use RL algorithms in Python and TensorFlow to solve CartPole balancing
  • Create deep reinforcement learning algorithms to play Atari games
  • Deploy RL algorithms using OpenAI Universe
  • Develop an agent to chat with humans
  • Implement basic actor-critic algorithms for continuous control
  • Apply advanced deep RL algorithms to games such as Minecraft
  • Autogenerate an image classifier using RL

Who this book is for

Python Reinforcement Learning Projects is for data analysts, data scientists, and machine learning professionals, who have working knowledge of machine learning techniques and are looking to build better performing, automated, and optimized deep learning models. Individuals who want to work on self-learning model projects will also find this book useful.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Python Reinforcement Learning Projects als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Python Reinforcement Learning Projects von Sean Saito, Yang Wenzhuo, Rajalingappaa Shanmugamani im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Informatique & Intelligence artificielle (IA) et sémantique. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Learning to Play Go

When considering the capabilities of AI, we often compare its performance for a particular task with what humans can achieve. AI agents are now able to surpass human-level competency in more complex tasks. In this chapter, we will build an agent that learns how to play what is considered the most complex board game of all time: Go. We will become familiar with the latest deep reinforcement learning algorithms that achieve superhuman performances, namely AlphaGo, and AlphaGo Zero, both of which were developed by Google's DeepMind. We will also learn about Monte Carlo tree search, a popular tree-searching algorithm that is an integral component of turn-based game agents.
This chapter will cover the following topics:
  • Introduction to Go and relevant research in AI
  • Overview of AlphaGo and AlphaGo Zero
  • The Monte Carlo tree search algorithm
  • Implementation of AlphaGo Zero

A brief introduction to Go

Go is a board game that was first recorded in China two millennia ago. Similar to other common board games, such as chess, shogi, and Othello, Go involves two players alternately placing black and white stones on a 19x19 board with the objective of capturing as much territory as possible by surrounding a larger total area of the board. One can capture their opponent's pieces by surrounding the opponent's pieces with their own pieces. Captured stones are removed from the board, thereby creating a void in which the opponent can no longer place stones unless the territory is captured back.
A game ends when both players refuse to place a stone or either player resigns. Upon the termination of a game, the winner is decided by counting each player's territory and the number of captured stones.

Go and other board games

Researchers have already created AI programs that outperform the best human players in board games such as chess and backgammon. In 1992, researchers from IBM developed TD-Gammon, which used classic reinforcement learning algorithms and an artificial neural network to play backgammon at the level of a top player. In 1997, Deep Blue, a chess-playing program developed by IBM and Carnegie Mellon University, defeated then world champion Garry Kasparov in a six-game face off. This was the first time that a computer program defeated the world champion in chess.
Developing Go playing agents is not a new topic, and hence one may wonder what took so long for researchers to replicate such successes in Go. The answer is simple—Go, despite its simple rules, is a far more complex game than chess. Imagine representing a board game as a tree, where each node is a snapshot of the board (which we also refer to as the board state) and its child nodes are possible moves the opponent can make. The height of the tree is essentially the number of moves a game lasts. A typical chess game lasts 80 moves, whereas a game in Go lasts 150; almost twice as long. Moreover, while the average number of possible moves in a chess turn is 35, a Go player has 250 possible plays per move. Based on these numbers, Go has 10761 total possible games, compared to 10120 games in chess. It is impossible to enumerate every possible state in Go in a computer, and the sheer complexity of the game has made it difficult for researchers to develop an agent that can play the game at a world-class level.

Go and AI research

In 2015, researchers from Google's DeepMind published a paper in Nature that detailed a novel reinforcement learning agent for Go called AlphaGo. In October of that year, AlphaGo beat Fan Hui, the European champion, 5-0. In 2016, AlphaGo challenged Lee Sedol, who, with 18 world championship titles, is considered one of the greatest players in modern history. AlphaGo won 4-1, marking a watershed moment in deep learning research and the game's history. In the following year, DeepMind published an updated version of AlphaGo, AlphaGo Zero, which defeated its predecessor 100 times in 100 games. In just a matter of days of training, AlphaGo and AlphaGo Zero were able to learn and surpass the wisdom that mankind has accumulated over the thousands of years of the game's existence.
The following sections will discuss how AlphaGo and AlphaGo Zero work, including the algorithms and techniques that they use to learn and play the game. This will be followed by an implementation of AlphaGo Zero. Our exploration begins with Monte Carlo tree search, an algorithm that is integral to both AlphaGo and AlphaGo Zero for making decisions ...

Inhaltsverzeichnis

  1. Title Page
  2. Copyright and Credits
  3. Packt Upsell
  4. Contributors
  5. Preface
  6. Up and Running with Reinforcement Learning
  7. Balancing CartPole
  8. Playing Atari Games
  9. Simulating Control Tasks
  10. Building Virtual Worlds in Minecraft
  11. Learning to Play Go
  12. Creating a Chatbot
  13. Generating a Deep Learning Image Classifier
  14. Predicting Future Stock Prices
  15. Looking Ahead
  16. Other Books You May Enjoy
Zitierstile für Python Reinforcement Learning Projects

APA 6 Citation

Saito, S., Wenzhuo, Y., & Shanmugamani, R. (2018). Python Reinforcement Learning Projects (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/825779/python-reinforcement-learning-projects-eight-handson-projects-exploring-reinforcement-learning-algorithms-using-tensorflow-pdf (Original work published 2018)

Chicago Citation

Saito, Sean, Yang Wenzhuo, and Rajalingappaa Shanmugamani. (2018) 2018. Python Reinforcement Learning Projects. 1st ed. Packt Publishing. https://www.perlego.com/book/825779/python-reinforcement-learning-projects-eight-handson-projects-exploring-reinforcement-learning-algorithms-using-tensorflow-pdf.

Harvard Citation

Saito, S., Wenzhuo, Y. and Shanmugamani, R. (2018) Python Reinforcement Learning Projects. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/825779/python-reinforcement-learning-projects-eight-handson-projects-exploring-reinforcement-learning-algorithms-using-tensorflow-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Saito, Sean, Yang Wenzhuo, and Rajalingappaa Shanmugamani. Python Reinforcement Learning Projects. 1st ed. Packt Publishing, 2018. Web. 14 Oct. 2022.