Hands-On Artificial Intelligence for Beginners: An introduction to AI concepts, algorithms, and their implementation
()
About this ebook
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.
Related to Hands-On Artificial Intelligence for Beginners
Related ebooks
Hands-On Neural Network Programming with C#: Add powerful neural network capabilities to your C# enterprise applications Rating: 0 out of 5 stars0 ratingsDeep Learning By Example: A hands-on guide to implementing advanced machine learning algorithms and neural networks Rating: 0 out of 5 stars0 ratingsPractical Convolutional Neural Networks: Implement advanced deep learning models using Python Rating: 0 out of 5 stars0 ratingsKeras Reinforcement Learning Projects: 9 projects exploring popular reinforcement learning techniques to build self-learning agents Rating: 0 out of 5 stars0 ratingsDeep Learning with PyTorch: A practical approach to building neural network models using PyTorch Rating: 0 out of 5 stars0 ratingsGo Machine Learning Projects: Eight projects demonstrating end-to-end machine learning and predictive analytics applications in Go Rating: 0 out of 5 stars0 ratingsAdvanced Deep Learning with R: Become an expert at designing, building, and improving advanced neural network models using R Rating: 0 out of 5 stars0 ratingsPython Deep Learning: Next generation techniques to revolutionize computer vision, AI, speech and data analysis Rating: 0 out of 5 stars0 ratingsPractical Network Automation,: A beginner's guide to automating and optimizing networks using Python, Ansible, and more Rating: 0 out of 5 stars0 ratingsThe Machine Learning Solutions Architect Handbook: Create machine learning platforms to run solutions in an enterprise setting Rating: 0 out of 5 stars0 ratingsMastering Machine Learning for Penetration Testing: Develop an extensive skill set to break self-learning systems using Python Rating: 0 out of 5 stars0 ratingsKeras 2.x Projects: 9 projects demonstrating faster experimentation of neural network and deep learning applications using Keras Rating: 0 out of 5 stars0 ratingsPython Machine Learning By Example: The easiest way to get into machine learning Rating: 5 out of 5 stars5/5Hands-on Machine Learning with JavaScript: Solve complex computational web problems using machine learning Rating: 0 out of 5 stars0 ratingsCodeless Time Series Analysis with KNIME: A practical guide to implementing forecasting models for time series analysis applications Rating: 0 out of 5 stars0 ratingsArchitecting Data-Intensive Applications: Develop scalable, data-intensive, and robust applications the smart way Rating: 0 out of 5 stars0 ratingsReinforcement Learning with TensorFlow: A beginner's guide to designing self-learning systems with TensorFlow and OpenAI Gym Rating: 0 out of 5 stars0 ratingsPractical Computer Vision: Extract insightful information from images using TensorFlow, Keras, and OpenCV Rating: 0 out of 5 stars0 ratingsMachine Learning with TensorFlow, Second Edition Rating: 0 out of 5 stars0 ratingsMachine Learning Algorithms: Popular algorithms for data science and machine learning Rating: 0 out of 5 stars0 ratingsHands-On Reinforcement Learning with Python: Master reinforcement and deep reinforcement learning using OpenAI Gym and TensorFlow Rating: 0 out of 5 stars0 ratingsScala Machine Learning Projects: Build real-world machine learning and deep learning projects with Scala Rating: 0 out of 5 stars0 ratingsArtificial Intelligence By Example: Develop machine intelligence from scratch using real artificial intelligence use cases Rating: 0 out of 5 stars0 ratings
Intelligence (AI) & Semantics For You
Midjourney Mastery - The Ultimate Handbook of Prompts Rating: 5 out of 5 stars5/5Summary of Super-Intelligence From Nick Bostrom Rating: 5 out of 5 stars5/5ChatGPT For Dummies Rating: 4 out of 5 stars4/5Mastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 5 out of 5 stars5/52084: Artificial Intelligence and the Future of Humanity Rating: 4 out of 5 stars4/5ChatGPT For Fiction Writing: AI for Authors Rating: 5 out of 5 stars5/5Artificial Intelligence: A Guide for Thinking Humans Rating: 4 out of 5 stars4/5The Algorithm of the Universe (A New Perspective to Cognitive AI) Rating: 5 out of 5 stars5/5Dark Aeon: Transhumanism and the War Against Humanity Rating: 5 out of 5 stars5/5THE CHATGPT MILLIONAIRE'S HANDBOOK: UNLOCKING WEALTH THROUGH AI AUTOMATION Rating: 5 out of 5 stars5/5The Secrets of ChatGPT Prompt Engineering for Non-Developers Rating: 5 out of 5 stars5/5101 Midjourney Prompt Secrets Rating: 3 out of 5 stars3/5Chat-GPT Income Ideas: Pioneering Monetization Concepts Utilizing Conversational AI for Profitable Ventures Rating: 3 out of 5 stars3/5Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Enterprise AI For Dummies Rating: 3 out of 5 stars3/5Make Money with ChatGPT: Your Guide to Making Passive Income Online with Ease using AI: AI Wealth Mastery Rating: 0 out of 5 stars0 ratingsAI for Educators: AI for Educators Rating: 5 out of 5 stars5/5Writing AI Prompts For Dummies Rating: 0 out of 5 stars0 ratingsThe Roadmap to AI Mastery: A Guide to Building and Scaling Projects Rating: 0 out of 5 stars0 ratingsHow To Become A Data Scientist With ChatGPT: A Beginner's Guide to ChatGPT-Assisted Programming Rating: 5 out of 5 stars5/5MidJourney Magnified: Crafting Visual Magic – The Novice to Pro Playbook Rating: 0 out of 5 stars0 ratings
Reviews for Hands-On Artificial Intelligence for Beginners
0 ratings0 reviews
Book preview
Hands-On Artificial Intelligence for Beginners - Patrick D. Smith
Hands-On Artificial Intelligence for Beginners
An introduction to AI concepts, algorithms, and their implementation
Patrick D. Smith
BIRMINGHAM - MUMBAI
Hands-On Artificial Intelligence for Beginners
Copyright © 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Veena Naik
Acquisition Editor: Namrata Patil
Content Development Editor: Snehal Kolte
Technical Editor: Chintan Thakkar, Dinesh Chaudhary
Copy Editor: Safis Editing
Project Coordinator: Manthan Patel
Proofreader: Safis Editing
Indexer: Priyanaka Dhadke
Graphics: Jisha Chirayil
Production Coordinator: Aparna Bhagat
First published: October 2018
Production reference: 1301018
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78899-106-3
www.packtpub.com
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
Packt.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.packt.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Patrick D. Smith is the Data Science Lead for Excella in Arlington, Virginia, where he founded the data science and machine learning team. Prior to Excella, Patrick was the lead instructor for the data science program at General Assembly in Washington, DC, as well as a data scientist with Booz Allen Hamilton's Strategic Innovations Group.
He holds a bachelor's degree from The George Washington University in International Economics, and is currently a part-time masters student in software engineering at Harvard University.
My journey into technology never would have been possible without my father, Curtis Griswold Smith, who was director of I.T. for one of the the world's first pioneering computer companies, Digital Equipment Corporation. It was he who introduced me to computing at three years old, and where my love of all technology stems from.
About the reviewer
David Dindi received a M.Sc. and a B.Sc. in chemical engineering with a focus on artificial intelligence from Stanford University. While at Stanford, David developed deep learning frameworks for predicting patient-specific adverse reactions to drugs at the Stanford Center for Biomedical Informatics. He currently advises a number of early stage start-ups in Silicon Valley and in New York.
Packt is searching for authors like you
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Table of Contents
Title Page
Copyright and Credits
Hands-On Artificial Intelligence for Beginners
Packt Upsell
Why subscribe?
Packt.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Reviews
The History of AI
The beginnings of AI –1950–1974
Rebirth –1980–1987
The modern era takes hold – 1997-2005
Deep learning and the future – 2012-Present
Summary
Machine Learning Basics
Technical requirements
Applied math basics
The building blocks – scalars, vectors, matrices, and tensors
Scalars
Vectors
Matrices
Tensors
Matrix math
Scalar operations
Element–wise operations
Basic statistics and probability theory
The probability space and general theory
Probability distributions
Probability mass functions
Probability density functions
Conditional and joint probability
Chain rule for joint probability
Bayes' rule for conditional probability
Constructing basic machine learning algorithms
Supervised learning algorithms
Random forests
Unsupervised learning algorithms
Basic tuning
Overfitting and underfitting
K-fold cross-validation
Hyperparameter optimization
Summary
Platforms and Other Essentials
Technical requirements
TensorFlow, PyTorch, and Keras
TensorFlow
Basic building blocks
The TensorFlow graph
PyTorch
Basic building blocks
The PyTorch graph
Keras
Basic building blocks
Wrapping up
Cloud computing essentials
AWS basics
EC2 and virtual machines
S3 Storage
AWS Sagemaker
Google Cloud Platform basics
GCP cloud storage
GCP Cloud ML Engine
CPUs, GPUs, and other compute frameworks
Installing GPU libraries and drivers
With Linux (Ubuntu)
With Windows
Basic GPU operations
The future – TPUs and more
Summary
Your First Artificial Neural Networks
Technical requirements
Network building blocks
Network layers
Naming and sizing neural networks
Setting up network parameters in our MNIST example
Activation functions
Historically popular activation functions
Modern approaches to activation functions
Weights and bias factors
Utilizing weights and biases in our MNIST example
Loss functions
Using a loss function for simple regression
Using cross-entropy for binary classification problems
Defining a loss function in our MNIST example
Stochastic gradient descent
Learning rates
Utilizing the Adam optimizer in our MNIST example
Regularization
The training process
Putting it all together
Forward propagation
Backpropagation
Forwardprop and backprop with MNIST
Managing a TensorFlow model
Saving model checkpoints
Summary
Convolutional Neural Networks
Overview of CNNs
Convolutional layers
Layer parameters and structure
Pooling layers
Fully connected layers
The training process
CNNs for image tagging
Summary
Recurrent Neural Networks
Technical requirements
The building blocks of RNNs
Basic structure
Vanilla recurrent neural networks
One-to-many
Many-to-one
Many-to-many
Backpropagation through time
Memory units – LSTMs and GRUs
LSTM
GRUs
Sequence processing with RNNs
Neural machine translation
Attention mechanisms
Generating image captions
Extensions of RNNs
Bidirectional RNNs
Neural turing machines
Summary
Generative Models
Technical requirements
Getting to AI – generative models
Autoencoders
Network architecture
Building an autoencoder
Variational autoencoders
Structure
Encoder
Decoder
Training and optimizing VAEs
Utilizing a VAE
Generative adversarial networks
Discriminator network
Generator network
Training GANs
Other forms of generative models
Fully visible belief nets
Hidden Markov models
Boltzmann machines
Summary
References
Reinforcement Learning
Technical requirements
Principles of reinforcement learning
Markov processes
Rewards
Policies
Value functions
The Bellman equation
Q–learning
Policy optimization
Extensions on policy optimization
Summary
Deep Learning for Intelligent Agents
Technical requirements
Word embeddings
Word2vec
Training Word2vec models
GloVe
Constructing a basic agent
Summary
Deep Learning for Game Playing
Technical requirements
Introduction
Networks for board games
Understanding game trees
AlphaGo and intelligent game-playing AIs
AlphaGo policy network
AlphaGo value network
AlphaGo in action
Networks for video games
Constructing a Deep Q–network
Utilizing a target network
Experience replay buffer
Choosing action
Training methods
Training the network
Running the network
Summary
Deep Learning for Finance
Requirements
Introduction to AI in finance
Deep learning in trading
Building a trading platform
Basic trading functions
Creating an artificial trader
Managing market data
Price prediction utilizing LSTMs
Backtesting your algorithm
Event-driven trading platforms
Gathering stock price data
Generating word embeddings
Neural Tensor Networks for event embeddings
Predicting events with a convolutional neural network
Deep learning in asset management
Summary
Deep Learning for Robotics
Technical requirements
Introduction
Setting up your environment
MuJoCo physics engine
Downloading the MuJoCo binary files
Signing up for a free trial of MuJoCo
Configuring your MuJoCo files
Installing the MuJoCo Python package
Setting up a deep deterministic policy gradients model
Experience replay buffer
Hindsight experience replay
The actor–critic network
The actor
The critic
Deep Deterministic Policy Gradients
Implementation of DDPG
Summary
References
Deploying and Maintaining AI Applications
Technical requirements
Introduction
Deploying your applications
Deploying models with TensorFlow Serving
Utilizing docker
Building a TensorFlow client
Training and deploying with the Google Cloud Platform
Training on GCP
Deploying for online learning on GCP
Using an API to Predict
Scaling your applications
Scaling out with distributed TensorFlow
Testing and maintaining your applications
Testing deep learning algorithms
Summary
References
Other Books You May Enjoy
Leave a review - let other readers know what you think
Preface
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. AI 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 AI is and how to design and build intelligent applications. This book will teach you to harness packages such as TensorFlow to create powerful AI systems. You will begin by 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, directing self-driving cars, 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.
Who this book is for
This book is designed for beginners in AI, aspiring AI developers, and machine learning enthusiasts with an interest in leveraging various algorithms to build powerful AI applications.
What this book covers
Chapter 1, The History of AI, begins by discussing the mathematical basis of AI and how certain theorems evolved. Then, we'll look at the research done in the 1980s and 90s to improve ANNs, we'll look at the AI winter, and we'll finish off with how we arrived at where we are today.
Chapter 2, Machine Learning Basics, introduces the fundamentals of machine learning and AI. Here, we will cover essential probability theory, linear algebra, and other elements that will lay the groundwork for the future chapters.
Chapter 3, Platforms and Other Essentials, introduces the deep learning libraries of Keras and TensorFlow and moves onto an introduction of basic AWS terminology and concepts that are useful for deploying your networks in production. We'll also introduce CPUs and GPUs, as well as other forms of compute architecture that you should be familiar with when building deep learning solutions.
Chapter 4, Your First Artificial Neural Networks, explains how to build our first artificial neural network. Then, we will learn ability of the core elements of ANNs and construct a simple single layer network both in Keras and TensorFlow so that you understand how the two languages work. With this simple network, we will do a basic classification task, such as the MNIST OCR task.
Chapter 5, Convolutional Neural Networks, introduces the convolutional neural network and explains its inner workings. We'll touch upon the basic building blocks of convolutions, pooling layers, and other elements. Lastly, we'll construct a Convolutional Neural Network for image tagging.
Chapter 6, Recurrent Neural Networks, introduces one of the workhorses of deep learning and AI—the recurrent neural network. We'll first introduce the conceptual underpinnings of recurrent neural networks, with a specific focus on utilizing them for natural language processing tasks. We'll show how one can generate text utilizing you of these networks and see how they can be utilized for predictive financial models.
Chapter 7, Generative Models, covers generative models primarily through the lens of GANs, and we'll look at how we can accomplish each of the above tasks with GANs.
Chapter 8, Reinforcement Learning, introduces additional forms of neural networks. First, we'll take a look at autoencoders, which are unsupervised learning algorithms that help us recreate inputs when we don't have access to input data. Afterwards, we'll touch upon other forms of networks, such as the emerging geodesic neural networks.
Chapter 9, Deep Learning for Intelligent Assistant, focuses on utilizing our knowledge of various forms of neural networks from the previous section to make an intelligent assistant, along the lines of Amazon's Alexa or Apple's Siri. We'll learn about and utilize word embeddings, recurrent neural networks, and decoders.
Chapter 10, Deep Learning for Game Playing, explains how to construct game-playing algorithms with reinforcement learning. We'll look at several different forms of games, from simple Atari-style games to more advanced board games. We'll touch upon the methods that Google Brain utilized to build AlphaGo.
Chapter 11, Deep Learning for Finance, shows how to create an advanced market prediction system in TensorFlow utilizing RNNs.
Chapter 12, Deep Learning for Robotics, uses deep learning to teach a robot to move objects. We will first train the neural network in simulated environments and then move on to real mechanical parts with images acquired from a camera.
Chapter 13, Scale, Deploy and Maintain AI Application, introduces methods for creating and scaling training pipelines and deployment architectures for AI systems.
To get the most out of this book
The codes in the chapter can be directly executed using Jupyter and Python. The code files for the book are present in the GitHub link provided in the following sections.
Download the example code files
You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
Log in or register atwww.packt.com.
Select theSUPPORTtab.
Click onCode Downloads & Errata.
Enter the name of the book in theSearchbox and follow the onscreen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
WinRAR/7-Zip for Windows
Zipeg/iZip/UnRarX for Mac
7-Zip/PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Hands-On-Artificial-Intelligence-for-Beginners. In case there's an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Conventions used
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: The tf.add function adds a layer to our network.
A block of code is set as follows:
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets(/tmp/data/
, one_hot=True)
Any command-line input or output is written as follows:
tf.train.AdamOptimizer(learning_rate=learning_rate).minimize(loss_func)
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: Select System info from the Administration panel.
Warnings or important notes appear like this.
Tips and tricks appear like this.
Get in touch
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packt.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Reviews
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!
For more information about Packt, please visit packt.com.
The History of AI
The term Artificial Intelligence (AI) carries a great deal of weight. AI has benefited from over 70 years of research and development. The history of AI is varied and winding, but one ground truth remains – tireless researchers have worked through funding growths and lapses, promise and doubt, to push us toward achieving ever more realistic AI.
Before we begin, let's weed through the buzzwords and marketing and establish what AI really is. For the purposes of this book, we will rely on this definition:
AI is a system or algorithm that allows computers to perform tasks without explicitly being programmed to do so.
AI is an interdisciplinary field. While we'll focus largely on utilizing deep learning in this book, the field also encompasses elements of robotics and IoT, and has a strong overlap (if it hasn't consumed it yet) with generalized natural language processing research. It's also intrinsically linked with fields such as Human-Computer Interaction (HCI) as it becomes increasingly important to integrate AI with our lives and the modern world around us.
AI goes through waves, and is bound to go through another (perhaps smaller) wave in the future. Each time, we push the limits of AI with the computational power that is available to us, and research and development stops. This day and age may be different, as we benefit from the confluence of increasingly large and efficient data stores, rapid fast and cheap computing power, and the funding of some of the most profitable companies in the world. To understand how we ended up here, let's start at the beginning.
In this chapter, we will cover the following topics:
The beginnings of AI – 1950–1974
Rebirth – 1980–1987
The modern era takes hold – 1997–2005
Deep learning and the future – 2012–Present
The beginnings of AI –1950–1974
Since some of the earliest mathematicians and thinkers, AI has been a long sought after concept. The ancient Greeks developed myths of the automata, a form of robot that would complete tasks for the Gods that they considered menial, and throughout early history thinkers pondered what it meant to human, and if the notion of human intelligence could be replicated. While it's impossible to pinpoint an exact beginning for AI as a field of research, its development parallels the early advances of computer science. One could argue that computer science as a field developed out of this early desire to create self-thinking machines.
During the second world war, British mathematician and code breaker Alan Turing developed some of the first computers, conceived with the vision of AI in mind. Turing wanted to create a machine that would mimic human comprehension, utilizing all available information to reason and make decisions. In 1950, he published Computing Machinery and Intelligence, which introduced what we now call the Turing test of AI. The Turing test, which is a benchmark by which to measure the aptitude of a machine to mimic human interaction, states that to pass the test, the machine must be able to sufficiently fool a discerning judge as to if it is a human or not. This might sound simple, but think about how many complex items would have to be conquered to reach this point. The machine would be able to comprehend, store information on, and respond to natural language, all the while remembering knowledge and responding to situations with what we deem common sense.
Turing could not move far beyond his initial developments; in his day, utilizing a computer for research cost almost $200,000 per month and computers could not store commands. His research and devotion to the field, however, has earned him accolades. Today, he is widely considered the father of AI and the academic study of computer science.
It was in the summer of 1956, however, that the field was truly born. Just a few months before, researchers at the RAND Corporation developed the Logic Theorist – considered the world's first AI program – which proved 38 theorems of the Principia Mathematica. Spurred on by this development and others, John McCarthy, Marvin Minsky, Nathaniel Rochester, and Claude Shannon hosted the now famous Dartmouth Summer Research Project on AI, coining the term Artificial Intelligence itself and providing the groundwork for the field. With funding from the Rockefeller Foundation, these four friends brought together some of the most preeminent researchers in AI over the course of the summer to brainstorm and effectively attempt to provide a roadmap for the field. They came from the institutions and companies that were on the leading edge of the computing revolution at the time; Harvard, Dartmouth, MIT, IBM, Bell Labs, and the RAND Corporation. Their topics of discussion were fairly forward-thinking for the time – they could have easily been those of an AI conference today—Artificial Neural Networks (ANN), natural language processing (NLP), theories of computation, and general computing frameworks. The Summer Research Project was seminal in creating the field of AI as we know it today, and many of its discussion topics spurned the growth of AI research and development through the 1950s and 1960s.
After 1956, innovation kept up a rapid pace. Years later, in 1958, a researcher at the Cornell Aeronautical Laboratory named Frank Rosenblatt invented one of the founding algorithms of AI, the Perceptron. The following diagram shows the Perceptron algorithm:
The Perceptron algorithm
Perceptrons are simple, single-layer networks that work as linear classifiers. They consist of four main architectural aspects which are mentioned as follows:
The input layer: The initial layer for reading in data
Weight and biases vectors: Weights help learn appropriate values during training for the connections between neurons, while biases help shift the activation function to fit the desired output
A summation function: A simple summation of the input
An activation function: A simple mapping of the summed weighted input to the output
As you can see, these networks use basic mathematics to perform basic mathematical operations. They failed to live up to the hype, however, and significantly contributed to the first AI winter because of the vast disappointment they created.
Another important development of this early era of research was adaline. As you can see, adaline attempted to improve upon the perceptron by utilizing continuous predicted values to learn the coefficients, unlike the perceptron, which utilizes class labels. The following diagram shows the adaline algorithm:
These golden years also brought us early advances such as the student program that solved high school algebra programs and the ELIZA Chatbot. By 1963, the advances in the field convinced the newly formed Advanced Research Projects Agency (DARPA) to begin funding AI research at MIT.
By the late 1960s, funding in the US and the UK began to dry up. In 1969, a book named Perceptrons by MIT's Marvin Minsky and Seymour Papert (https://archive.org/details/Perceptrons) proved that these networks could only mathematically compute extremely basic functions. In fact, they went so far as to suggest that Rosenblatt had greatly exaggerated his findings and the importance of the perceptron. Perceptrons were of limited functionality to the field, effectively halting research in network structures.
With both governments releasing reports that significantly criticized the usefulness of AI, the field was shuttled into what has become known as the AI winter. AI research continued throughout the late 1960s and 1970s, mostly under different terminology. The terms machine learning, knowledge-based system, and pattern recognition all come from this period, when researchers had to think up creative names for their work in order to receive funding. Around this time, however, a student at the University of Cambridge named Geoffrey Hinton began exploring ANNs and how we could utilize them to mimic the brain's memory functions. We'll talk a lot more about Hinton in the following sections and throughout this book, as he has become one of the most important figures in AI today.
Rebirth –1980–1987
The 1980s saw the birth of deep learning, the brain of AI that has become the focus of most modern AI research. With the revival of neural network research by John Hopfield and David Rumelhart, and several funding initiatives in Japan, the United States, and the United Kingdom, AI research was back on track.
In the early 1980s, while the United States was still toiling from the effects of the AI Winter, Japan was funding the fifth generation computer system project to advance AI research. In the US, DARPA once again ramped up funding for AI research, with business regaining interest in AI applications. IBM's T.J. Watson Research Center