Book Image

Hands-On Artificial Intelligence for Beginners

By : Patrick D. Smith, David Dindi
Book Image

Hands-On Artificial Intelligence for Beginners

By: Patrick D. Smith, David Dindi

Overview of this book

Virtual Assistants, such as Alexa and Siri, process our requests, Google's cars have started to read addresses, and Amazon's prices and Netflix's recommended videos are decided by AI. Artificial Intelligence is one of the most exciting technologies and is becoming increasingly significant in the modern world. Hands-On Artificial Intelligence for Beginners will teach you what Artificial Intelligence is and how to design and build intelligent applications. This book will teach you to harness packages such as TensorFlow in order to create powerful AI systems. You will begin with reviewing the recent changes in AI and learning how artificial neural networks (ANNs) have enabled more intelligent AI. You'll explore feedforward, recurrent, convolutional, and generative neural networks (FFNNs, RNNs, CNNs, and GNNs), as well as reinforcement learning methods. In the concluding chapters, you'll learn how to implement these methods for a variety of tasks, such as generating text for chatbots, and playing board and video games. By the end of this book, you will be able to understand exactly what you need to consider when optimizing ANNs and how to deploy and maintain AI applications.
Table of Contents (15 chapters)

Q–learning

Q-learning is a reinforcement learning method that utilizes the action value function, or Q function, to solve tasks. In this section, we'll talk about both traditional Q-learning as well as Deep Q-learning.

Standard Q-learning works off the core concept of the Q-table. You can think of the Q-table as a reference table; every row represents a state and every column represents an action. The values of the table are the expected future rewards that are received for a specific combination of actions and states. Procedurally, we do the following:

  1. Initialize the Q-table
  2. Choose an action
  3. Perform that action
  4. Measure the reward that was received
  5. Update the Q- value

Let's walk through each of these steps to better understand the algorithm. First, we initialize the Q-table as zeros, and it is subsequently updated throughout the Q-learning training process....