E-Book, Englisch, 379 Seiten
Norris Beginning Artificial Intelligence with the Raspberry Pi
1. ed
ISBN: 978-1-4842-2743-5
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
E-Book, Englisch, 379 Seiten
ISBN: 978-1-4842-2743-5
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
Gain a gentle introduction to the world of Artificial Intelligence (AI) using the Raspberry Pi as the computing platform. Most of the major AI topics will be explored, including expert systems, machine learning both shallow and deep, fuzzy logic control, and more!
AI in action will be demonstrated using the Python language on the Raspberry Pi. The Prolog language will also be introduced and used to demonstrate fundamental AI concepts. In addition, the Wolfram language will be used as part of the deep machine learning demonstrations.
A series of projects will walk you through how to implement AI concepts with the Raspberry Pi. Minimal expense is needed for the projects as only a few sensors and actuators will be required. Beginners and hobbyists can jump right in to creating AI projects with the Raspberry PI using this book.
What You'll LearnWhat AI is and-as importantly-what it is not
Inference and expert systems
Machine learning both shallow and deep
Fuzzy logic and how to apply to an actual control system
When AI might be appropriate to include in a system
Constraints and limitations of the Raspberry Pi AI implementationWho This Book Is For
Hobbyists, makers, engineers involved in designing autonomous systems and wanting to gain an education in fundamental AI concepts, and non-technical readers who want to understand what AI is and how it might affect their lives.
Donald J. Norris has a degree in electrical engineering and an MBA specializing in production management. He teaches undergrad and grad courses in the IT subject area at Southern New Hampshire University. He also created and teaches several robotics courses there. He has over 36 years of teaching experience as an adjunct professor at a variety of colleges and universities. Mr. Norris retired from civilian government service with the U.S. Navy, where he specialized in acoustics related to nuclear submarines and associated advanced digital signal processing. Since then, he has spent more than 22 years as a professional software developer using C, C#, C++, Python, Node.js and Java, as well as 5 years as a certified IT security consultant. Mr. Norris started a consultancy, Norris Embedded Software Solutions (dba NESS LLC), that specializes in developing application solutions using microprocessors and microcontrollers. He likes to think of himself as a perpetual hobbyist and geek and is always trying out new approaches and out-of-the-box experiments. He is a licensed private pilot, photography buff, amateur radio operator, and avid runner.
Autoren/Hrsg.
Weitere Infos & Material
1;Contents at a Glance;5
2;Contents;6
3;About the Author;13
4;About the Technical Reviewer;14
5;Preface;15
6;Chapter 1: Introduction to Artificial Intelligence;18
6.1;AI Historical Origins;18
6.2;Intelligence;24
6.3;Strong AI vs. Weak AI, Broad AI vs. Narrow AI;26
6.4;Reasoning;27
6.5;AI Categories;28
6.6;AI and Big Data;30
6.7;Summary;32
7;Chapter 2: Basic AI Concepts;33
7.1;Boolean Algebra;33
7.1.1;Some Additional Boolean Laws;35
7.2;Inference;35
7.3;Expert Systems;36
7.3.1;Conflict Resolution;37
7.3.2;Backward Chaining;38
7.4;Raspberry Pi Configuration;39
7.5;Introduction to SWI Prolog;39
7.6;Installing Prolog on a Raspberry Pi;40
7.7;Initial Prolog Demonstration;41
7.8;Introduction to Fuzzy Logic;43
7.8.1;Example of FL;43
7.8.2;Defuzzification;45
7.9;Problem Solving;45
7.9.1;Breadth-First Search;46
7.9.2;Depth-First Search;46
7.9.3;Depth-Limited Search;46
7.9.4;Bidirectional Search;47
7.9.5;Other Problem-Solving Examples;47
7.10;Machine Learning;47
7.10.1;Prediction;48
7.10.2;Classification;49
7.10.3;Further Classification;53
7.11;Neural Networks;55
7.12;Shallow Learning vs. Deep Learning;62
7.13;Evolutionary Computing;62
7.13.1;Genetic Algorithms;63
7.14;Summary;64
8;Chapter 3: Expert System Demonstrations;65
8.1;Demo 3-1: Office Database;66
8.2;Demo 3-2: Animal Identification;73
8.3;Demo 3-3: tic-tac-toe;78
8.4;Demo 3-4: Cold or Flu Diagnosis;83
8.5;Demo 3-5: Expert System with Raspberry Pi GPIO Control;87
8.5.1;Installing PySWIP;87
8.5.2;Hardware Setup;88
8.5.3;Rpi.GPIO Setup;90
8.5.4;Expert System with LED Control;91
8.6;Summary;92
9;Chapter 4: Games;93
9.1;Demo 4-1: Rock-Paper-Scissors;94
9.1.1;Rock-Paper-Scissors Game with Switches and LEDs;98
9.1.2;Interrupts;102
9.2;Demo 4-2: Nim;105
9.2.1;Nim with LCD and Switches;113
9.2.2;LCD Display;116
9.2.3;Loading the Adafruit LCD Library;117
9.2.4;LCD Test;119
9.2.5;automated_nim.py;119
9.3;Summary;126
10;Chapter 5: Fuzzy Logic System;127
10.1;Parts List;127
10.2;Software Installation;127
10.3;Basic FLS;128
10.4;Initialization: Define Linguistic Variables and Terms;129
10.5;Demo 5-1: Using FL to Calculate a Tip;129
10.6;Initialization: Construct Membership Functions;130
10.6.1;Membership Function Visualization;133
10.7;Initialization: Build Rule Set;134
10.8;Inference: Evaluate Fuzzy Set According to Rule Set;136
10.9;Aggregation: Combine Results from Each Rule Evaluation;139
10.10;Defuzzification: Convert Fuzzy Set to Crisp Output Values;139
10.11;Demo 5-2: Modifications to the tipping.py Program;147
10.12;Demo 5-3: FLS Heating and Cooling System;148
10.12.1;Fuzzification;151
10.12.2;Inference;152
10.12.3;Aggregation;153
10.12.4;Defuzzification;153
10.12.5;Testing the Control Program;155
10.13;Demo 5-4: Modifications to the HVAC Program;157
10.14;Summary;159
11;Chapter 6: Machine Learning;160
11.1;Parts List;160
11.2;Demo 6-1: Color Selection;161
11.2.1;Algorithm;161
11.2.2;Roulette Wheel Algorithm;164
11.3;Demo 6-2: Autonomous Robot;166
11.3.1;Autonomous Algorithm;168
11.3.2;Test Run;174
11.3.3;Additional Learning;175
11.4;Demo 6-3: Adaptive Learning with an Energy Consumption Consideration;179
11.4.1;Test Run;184
11.5;Summary;184
12;Chapter 7: Machine Learning: Artificial Neural Networks;185
12.1;Parts List;185
12.2;Hopfield Network;186
12.3;Demo 7-1: Numerical Figure Recognition Demonstration;193
12.4;Demo 7-2: Autonomous Robot Car Using ANN;200
12.5;Demo 7-3: Python Control Script for the Obstacle-Avoiding Robot Car;204
12.5.1;Test Run;209
12.6;Demo 7-4: Light-Seeking Robot;209
12.6.1;The Unknowns;212
12.6.2;Brain Mapping;213
12.6.3;Light Intensity Sensor;214
12.6.4;Python Control Script for the Goal-Seeking Robot Car;216
12.6.5;Test Run;221
12.6.6;Obstacle Avoidance and Light Seeking;222
12.7;Summary;223
13;Chapter 8: Machine Learning: Deep Learning;224
13.1;Generalized ANN;224
13.1.1;Larger ANN;230
13.1.2;Back Propagation In Three-layer ANNs;234
13.1.3;Updating the Weighting Matrix;236
13.2;The Gradient Descent Applied to an ANN;245
13.2.1;Matrix Multiplications for Weight Change Determination;248
13.3;Worked-through Example;248
13.3.1;Issues with ANN Learning;250
13.3.2;Initial Weight Selection;250
13.4;Demo 8-1: ANN Python Scripts;251
13.4.1;Initialization;252
13.4.2;Test Run;254
13.5;Demo 8-2: Training an ANN;256
13.5.1;Test Run;259
13.6;Summary;260
14;Chapter 9: Machine Learning: Practical ANN Demonstrations;261
14.1;Parts List;261
14.2;Demo 9-1: MNIST Data Set;262
14.2.1;Imaging a MNIST Record;266
14.2.2;Adjusting the Input and Output Data Sets;268
14.2.3;Configuring the ANN for Handwritten Number Detection;271
14.2.4;Test Run;273
14.3;Demo 9-2: Handwritten Number Recognition with a Pi Camera;280
14.3.1;Modifying the trainAN.py Script;286
14.3.2;Automated Number Recognition with an ANN;287
14.3.3;Test Run;290
14.4;Summary;291
15;Chapter 10: Evolutionary Computing;292
15.1;Alife;292
15.2;Evolutionary Programing;293
15.3;Demo 10-1: Manual Calculation;294
15.3.1;Python Script;294
15.4;Demo 10-2: Conway’s Game of Life;303
15.4.1;Sense HAT Hardware Installation;305
15.4.2;Sense HAT Software Installation;306
15.4.3;Game of Life: Python Version;307
15.4.4;Test Run;316
15.4.5;Single Generation of the Game of Life;318
15.5;Summary;323
16;Chapter 11: Behavior-Based Robotics;324
16.1;Parts List;324
16.2;Human Brain Structure;325
16.3;Subsumption Architecture;327
16.3.1;Traditional Approach;329
16.3.2;Behavior-Based Robotics Approach;329
16.4;Demo 11-1: The Breve Project;332
16.5;Demo 11-2: Building a Subsumption-Controlled Robot Car;342
16.6;Demo 11-3: Alfie Robot Car;346
16.6.1;Adding Another Behavior;354
16.6.2;Test Run;355
16.7;Summary;356
17;Appendix A:Build Instructions for the Alfie Robot Car;357
17.1;Robotic Car Power Supply;361
17.2;CR Servo Drive Pulse Width Modulation (PWM);362
17.3;Mount Plates;362
17.4;Electrical and Wiring Instructions;366
17.4.1;Ping Sensor;368
17.4.2;MCP3008 Analog-to-Digital Converter (ADC);369
17.5;Software Installation;371
17.6;Final Thoughts;372
18;Index;373




