Table of Contents
Foreword xv
Introduction xix
Scratch xx
Working in the Scratch Interface xxi
Coding in Scratch xxii
Saving Your Work xxiv
Machine Learning for Kids xxiv
What's Next? xxiv
1 What Is Artificial Intelligence? 1
Coding 2
Machine Learning 3
Artificial Intelligence 3
Neural Networks and Deep Learning 4
What You Learned 5
2 Introducing Machine Learning for Kids 7
Logging In 8
Creating a New ML Project 9
Phases of an ML Project 11
Train 11
Learn & Test 12
Make 13
Creating an Account 14
What You Learned 17
3 Sorting Animal Pictures 19
Build Your Project 20
Train Your Model 21
Prepare Your Project 26
Test Your Model 31
Review and Improve Your Project 32
What You Learned 35
4 Playing Rock, Paper, Scissors Against Your Computer 37
Build Your Project 38
Train Your Model 38
Prepare Your Game 42
Test Your Game 45
Review and Improve Your Project 46
What You Learned 48
5 Recognizing Movie Posters 49
Build Your Project 51
Train Your Model 52
Prepare Your Model 56
Test Your Model 65
Review and Improve Your Project 65
What You Learned 66
6 Mail Sorting 67
Build Your Project 69
Train Your Model 69
Prepare Your Project 74
Test Your Project 81
Review and Improve Your Project 82
What You Learned 82
7 Insulting a Computer 83
Build Your Project 85
Prepare Your Game 85
Code Your Game Without ML 88
Train Your Model 90
Code Your Game with ML 94
Test Your Game 96
Review and Improve Your Project 96
Using Speech Input Instead of Typing 96
Recognizing Speech That Isn't a Compliment or Insult 97
Learning from Mistakes 99
What You Learned 100
8 Recognizing Language in Newspapers 103
Build Your Project 104
Train Your Model 106
Prepare Your Project 110
Review and Improve Your Project 118
Measuring Performance: Accuracy 118
Measuring Performance: Confusion Matrix 121
Measuring Performance: Precision and Recall 126
Improving Your ML Model 127
What You Learned 128
9 Finding an Object in a Picture 129
Build Your Project 132
Train Your Model 132
Prepare Your Project 140
Test Your Project 142
Review and Improve Your Project 143
Real-World Applications for Complex Image Recognition Systems 145
What You Learned 149
10 Smart Assistants 151
Build Your Project 153
Code Your Project Without ML 153
Train Your Model 155
Code Your Project with ML 159
Test Your Project 161
Review and Improve Your Project 161
Using Your Model's Confidence Score 161
Using Speech Input Instead of Typing 163
Collecting Training Data 164
What Your Learned 165
11 Chatbots 167
Build Your Project 169
Prepare Your Character 170
Train Your Model 171
Prepare Your Project 176
Test Your Project 177
Review and Improve Your Project 177
Responding and Recording When Users Report Mistakes 178
Recognizing When a User Isn't Happy 180
Answering Only When the ML Model Is Confident 180
ML and Ethics 182
What You Learned 182
12 Avoiding the Monster 185
Build Your Project 187
Describe the State of the Game 188
Train Your Model 189
Test Your Game 197
Review and Improve Your Project 200
What You Learned 202
13 Tic Tac Toe 203
Build Your Project 205
Prepare Your Game 208
Train Your Model 217
Test Your Game 219
Review and Improve Your Project 221
What You Learned 221
14 Confusing the Computer 223
Build Your Project 225
Train Your Model 227
Prepare Your Project 230
Test Your Project 232
Review and Fix Your Project 233
What You Learned 236
15 Biasing the Computer 237
Build Your Project 238
Train Your Model 238
Prepare Your Project 241
Test Your Project 244
Introduce Bias 244
Test Your Biased Project 246
Review Your Project 247
The Case for Bias 248
AI and Ethics 248
What You Learned 250
Afterword 251
The Future 252
Next Steps 252
Index 255