Author(s): Hadelin de Ponteves
Year: 2019
Cover
Copyright
Packt Page
Contributors
Table of Contents
Preface
Chapter 1: Welcome to the Robot World
Beginning the AI journey
Four different AI models
The models in practice
Fundamentals
Thompson Sampling
Q-learning
Deep Q-learning
Deep convolutional Q-learning
Where can learning AI take you?
Energy
Healthcare
Transport and logistics
Education
Security
Employment
Smart homes and robots
Entertainment and happiness
Environment
Economy, business, and finance
Summary
Chapter 2: Discover Your AI Toolkit
The GitHub page
Colaboratory
Summary
Chapter 3: Python Fundamentals – Learn How to Code in Python
Displaying text
Exercise
Variables and operations
Exercise
Lists and arrays
Exercise
if statements and conditions
Exercise
for and while loops
Exercise
Functions
Exercise
Classes and objects
Exercise
Summary
Chapter 4: AI Foundation Techniques
What is Reinforcement Learning?
The five principles of Reinforcement Learning
Principle #1 – The input and output system
Principle #2 – The reward
Principle #3 – The AI environment
Principle #4 – The Markov decision process
Principle #5 – Training and inference
Training mode
Inference mode
Summary
Chapter 5: Your First AI Model – Beware the Bandits!
The multi-armed bandit problem
The Thompson Sampling model
Coding the model
Understanding the model
What is a distribution?
Tackling the MABP
The Thompson Sampling strategy in three steps
The final touch of shaping your Thompson Sampling intuition
Thompson Sampling against the standard model
Summary
Chapter 6: AI for Sales and Advertising – Sell like the Wolf of AI Street
Problem to solve
Building the environment inside a simulation
Running the simulation
Recap
AI solution and intuition refresher
AI solution
Intuition
Implementation
Thompson Sampling vs. Random Selection
Performance measure
Let's start coding
The final result
Summary
Chapter 7: Welcome to Q-Learning
The Maze
Beginnings
Building the environment
The states
The actions
The rewards
Building the AI
The Q-value
The temporal difference
The Bellman equation
Reinforcement intuition
The whole Q-learning process
Training mode
Inference mode
Summary
Chapter 8: AI for Logistics – Robots in a Warehouse
Building the environment
The states
The actions
The rewards
AI solution refresher
Initialization (first iteration)
Next iterations
Implementation
Part 1 – Building the environment
Part 2 – Building the AI Solution with Q-learning
Part 3 – Going into production
Improvement 1 – Automating reward attribution
Improvement 2 – Adding an intermediate goal
Summary
Chapter 9: Going Pro with Artificial Brains – Deep Q-Learning
Predicting house prices
Uploading the dataset
Importing libraries
Excluding variables
Data preparation
Scaling data
Building the neural network
Training the neural network
Displaying results
Deep learning theory
The neuron
Biological neurons
Artificial neurons
The activation function
The threshold activation function
The sigmoid activation function
The rectifier activation function
How do neural networks work?
How do neural networks learn?
Forward-propagation and back-propagation
Gradient Descent
Batch gradient descent
Stochastic gradient descent
Mini-batch gradient descent
Deep Q-learning
The Softmax method
Deep Q-learning recap
Experience replay
The whole deep Q-learning algorithm
Summary
Chapter 10: AI for Autonomous Vehicles – Build a Self-Driving Car
Building the environment
Defining the goal
Setting the parameters
The input states
The output actions
The rewards
AI solution refresher
Implementation
Step 1 – Importing the libraries
Step 2 – Creating the architecture of the neural network
Step 3 – Implementing experience replay
Step 4 – Implementing deep Q-learning
The demo
Installing Anaconda
Creating a virtual environment with Python 3.6
Installing PyTorch
Installing Kivy
Summary
Chapter 11: AI for Business – Minimize Costs with Deep Q-Learning
Problem to solve
Building the environment
Parameters and variables of the server environment
Assumptions of the server environment
Assumption 1 – We can approximate the server temperature
Assumption 2 – We can approximate the energy costs
Simulation
Overall functioning
Defining the states
Defining the actions
Defining the rewards
Final simulation example
AI solution
The brain
Implementation
Step 1 – Building the environment
Step 2 – Building the brain
Without dropout
With dropout
Step 3 – Implementing the deep reinforcement learning algorithm
Step 4: Training the AI
No early stopping
Early stopping
Step 5 – Testing the AI
The demo
Recap – The general AI framework/Blueprint
Summary
Chapter 12: Deep Convolutional Q-Learning
What are CNNs used for?
How do CNNs work?
Step 1 – Convolution
Step 2 – Max pooling
Step 3 – Flattening
Step 4 – Full connection
Deep convolutional Q-learning
Summary
Chapter 13: AI for Games – Become the Master at Snake
Problem to solve
Building the environment
Defining the states
Defining the actions
Defining the rewards
AI solution
The brain
The experience replay memory
Implementation
Step 1 – Building the environment
Step 2 – Building the brain
Step 3 – Building the experience replay memory
Step 4 – Training the AI
Step 5 – Testing the AI
The demo
Installation
The results
Summary
Chapter 14: Recap and Conclusion
Recap – The general AI framework/blueprint
Exploring what's next for you in AI
Practice, practice, and practice
Networking
Never stop learning
Other Books You May Enjoy
Index