AI Module1 Notes
AI Module1 Notes
(BAD402)
MODULE-1
Introduction: What is AI? Foundations and History of AI Intelligent Agents:
Agents and environment, Concept of Rationality, The nature of environment, The
structure of agents.
Advantages of AI
Reduction in Human Error: One of the biggest benefits of Artificial Intelligence is that it
can significantly reduce errors and increase accuracy and precision.
Zero Risks: Another big benefit of AI is that humans can overcome many risks by letting AI
robots do them for us.
24x7 Availability: AI can work endlessly without breaks. They think much faster than
humans and perform multiple tasks at a time with accurate results. They can even handle
tedious repetitive jobs easily with the help of AI algorithms.
Digital Assistance: Some of the most technologically advanced companies engage with
users using digital assistants, which eliminates the need for human personnel. Many
websites utilize digital assistants to deliver user-requested content.
New Inventions: In practically every field, AI is the driving force behind numerous
innovations that will aid humans in resolving the majority of challenging issues.
Unbiased Decisions: Human beings are driven by emotions, whether we like it or not. AI
on the other hand, is devoid of emotions and highly practical and rational in its approach. A
huge advantage of Artificial Intelligence is that it doesn't have any biased views, which
ensures more accurate decision-making.
Perform Repetitive Jobs: We will be doing a lot of repetitive tasks as part of our daily
work, such as checking documents for flaws and mailing thank-you notes, among other
things. We may use artificial intelligence to efficiently automate these menial chores and
even eliminate "boring" tasks for people, allowing them to focus on being more creative.
Daily Applications: Today, our everyday lives are entirely dependent on mobile devices
and the internet. We utilize a variety of apps, including Google Maps, Alexa, Siri, Cortana on
Windows, OK Google, taking selfies, making calls, responding to emails, etc. With the use of
various AI-based techniques, we can also anticipate today’s weather and the days ahead.
AI in Risky Situations: One of the main benefits of artificial intelligence is this. By creating
an AI robot that can perform perilous tasks on our behalf, we can get beyond many of the
dangerous restrictions that humans face. It can be utilized effectively in any type of natural
or man-made calamity, whether it be going to Mars, defusing a bomb, exploring the deepest
regions of the oceans, or mining for coal and oil.
Medical Applications: AI has also made significant contributions to the field of medicine,
with applications ranging from diagnosis and treatment to drug discovery and clinical trials.
AI-powered tools can help doctors and researchers analyze patient data, identify potential
health risks, and develop personalized treatment plans. This can lead to better health
outcomes for patients and help accelerate the development of new medical treatments and
technologies.
Disadvantages of AI
High Costs
No Creativity
Unemployment
Make Humans Lazy
No Ethics
Emotionless
No Improvement
Intelligence Parameters:
1. Reasoning
2. Learning
3. Problem solving
4. Perception
5. Linguistic Intelligence
1950: Alan Turing publishes Computing Machinery and Intelligence In this paper,
Turing—famous for breaking the German ENIGMA code during WWII and often
referred to as the "father of computer science"— asks the following question: "Can
machines think?" From there, he offers a test, now famously known as the "Turing Test,"
where a human interrogator would try to distinguish between a computer and human text
response.
1956: John McCarthy coins the term "artificial intelligence" at the first-ever AI
conference at Dartmouth College. (McCarthy would go on to invent the Lisp language.)
Later that year, Allen Newell, J.C. Shaw, and Herbert Simon create the Logic Theorist,
the first-ever running AI software program.
1967: Frank Rosenblatt builds the Mark 1 Perceptron, the first computer based on a
neural network that "learned" though trial and error.
1980s: Neural networks which use a back propagation algorithm to train itself
become widely used in AI applications.
1995: Stuart Russell and Peter Norvig publish Artificial Intelligence: A Modern
Approach which becomes one of the leading textbooks in the study of AI. In it, they
delve into four potential goals or definitions of AI, which differentiates computer
systems on the basis of rationality and thinking vs. acting.
1997: IBM's Deep Blue beats then world chess champion Garry Kasparov, in a chess
match (and rematch).
2004: John McCarthy writes a paper, What Is Artificial Intelligence? and proposes
an often-cited definition of AI.
2011: IBM Watson beats champions Ken Jennings and Brad Rutter at Jeopardy!
2015: Baidu's Minwa supercomputer uses a special kind of deep neural network
called a convolutional neural network to identify and categorize images with a
higher rate of accuracy than the average human.
2016: Deep Mind’s AlphaGo program, powered by a deep neural network, beats Lee
Sodol, the world champion Go player, in a five-game match. The victory is significant
given the huge number of possible moves as the game progresses (over 14.5 trillion
after just four moves!). Later, Google purchased Deep Mind for a reported USD 400
million.
History of AI
Maturation of Artificial Intelligence (1943-1952)
Year 1943: The first work which is now recognized as AI was done by Warren
McCulloch and Walter pits in 1943. They proposed a model of artificial neurons.
Year 1949: Donald Hebb demonstrated an updating rule for modifying the connection
strength between neurons. His rule is now called Hebbian learning.
Year 1950: The Alan Turing who was an English mathematician and pioneered Machine
learning in 1950. Alan Turing publishes "Computing Machinery and Intelligence" in
which he proposed a test. The test can check the machine's ability to exhibit intelligent
behavior equivalent to human intelligence, called a Turing test.
Year 1951: Marvin Minsky and Dean Edmonds created the initial artificial neural
network (ANN) named SNARC. They utilized 3,000 vacuum tubes to mimic a network
of 40 neurons.
Year 1952: Arthur Samuel pioneered the creation of the Samuel Checkers-Playing
Program, which marked the world's first self-learning program for playing games.
Year 1955: An Allen Newell and Herbert A. Simon created the "first artificial
intelligence program"Which was named as "Logic Theorist". This program had proved
38 of 52 Mathematics theorems, and find new and more elegant proofs for some
theorems.
Year 1956: The word "Artificial Intelligence" first adopted by American Computer
scientist John McCarthy at the Dartmouth Conference. For the first time, AI coined as an
academic field.
The golden years-Early enthusiasm (1956-1974)
Year 1958: During this period, Frank Rosenblatt introduced the perceptron, one of the
early artificial neural networks with the ability to learn from data. This invention laid the
foundation for modern neural networks. Simultaneously, John McCarthy developed the
Lisp programming language, which swiftly found favor within the AI community,
becoming highly popular among developers.
Year 1959: Arthur Samuel is credited with introducing the phrase "machine learning" in
a pivotal paper in which he proposed that computers could be programmed to surpass
their creators in performance. Additionally, Oliver Selfridge made a notable contribution
to machine learning with his publication "Pandemonium: A Paradigm for Learning." This
work outlined a model capable of self-improvement, enabling it to discover patterns in
events more effectively.
Year 1964: During his time as a doctoral candidate at MIT, Daniel Bobrow created
STUDENT, one of the early programs for natural language processing (NLP), with the
specific purpose of solving algebra word problems.
Year 1965: The initial expert system, Dendral, was devised by Edward Feigenbaum,
Bruce G. Buchanan, Joshua Lederberg, and Carl Djerassi. It aided organic chemists in
identifying unfamiliar organic compounds.
Year 1966: The researchers emphasized developing algorithms that can solve
mathematical problems. Joseph Weizenbaum created the first chatbot in 1966, which was
named ELIZA. Furthermore, Stanford Research Institute created Shakey, the earliest
mobile intelligent robot incorporating AI, computer vision, navigation, and NLP. It can
be considered a precursor to today's self-driving cars and drones.
Year 1968: Terry Winograd developed SHRDLU, which was the pioneering multimodal
AI capable of following user instructions to manipulate and reason within a world of
blocks.
Year 1969: Arthur Bryson and Yu-Chi Ho outlined a learning algorithm known as
backpropagation, which enabled the development of multilayer artificial neural networks.
This represented a significant advancement beyond the perceptron and laid the
groundwork for deep learning. Additionally, Marvin Minsky and Seymour Papert
authored the book "Perceptrons," which elucidated the constraints of basic neural
networks. This publication led to a decline in neural network research and a resurgence in
symbolic AI research.
Year 1972: The first intelligent humanoid robot was built in Japan, which was named
WABOT-1.
Year 1973: James Lighthill published the report titled "Artificial Intelligence: A General
Survey," resulting in a substantial reduction in the British government's backing for AI
research.
The first AI winter (1974-1980)
The duration between years 1974 to 1980 was the first AI winter duration. AI winter
refers to the time period where computer scientist dealt with a severe shortage of funding
from government for AI researches.
During AI winters, an interest of publicity on artificial intelligence was decreased.
A boom of AI (1980-1987)
The duration between the years 1987 to 1993 was the second AI Winter duration.
Again Investors and government stopped in funding for AI research as due to high cost
but not efficient result. The expert system such as XCON was very cost effective.
Year 1997: In 1997, IBM's Deep Blue achieved a historic milestone by defeating world
chess champion Gary Kasparov, marking the first time a computer triumphed over a
reigning world chess champion. Moreover, Sepp Hochreiter and Jürgen Schmidhuber
introduced the Long Short-Term Memory recurrent neural network, revolutionizing the
capability to process entire sequences of data such as speech or video.
Year 2002: for the first time, AI entered the home in the form of Roomba, a vacuum
cleaner.
Year 2006: AI came into the Business world till the year 2006. Companies like
Facebook, Twitter, and Netflix also started using AI.
Year 2009: Rajat Raina, Anand Madhavan, and Andrew Ng released the paper titled
"Utilizing Graphics Processors for Extensive Deep Unsupervised Learning," introducing
the concept of employing GPUs for the training of expansive neural networks.
Year 2011: Jürgen Schmidhuber, Dan Claudiu Cire?an, Ueli Meier, and Jonathan Masci
created the initial CNN that attained "superhuman" performance by emerging as the
victor in the German Traffic Sign Recognition competition. Furthermore, Apple launched
Siri, a voice-activated personal assistant capable of generating responses and executing
actions in response to voice commands.
Year 2011: In 2011, IBM's Watson won Jeopardy, a quiz show where it had to solve
complex questions as well as riddles. Watson had proved that it could understand natural
language and can solve tricky questions quickly.
Year 2012: Google launched an Android app feature, "Google Now", which was able to
provide information to the user as a prediction. Further, Geoffrey Hinton, Ilya Sutskever,
and Alex Krizhevsky presented a deep CNN structure that emerged victorious in the
ImageNet challenge, sparking the proliferation of research and application in the field of
deep learning.
Year 2013: China's Tianhe-2 system achieved a remarkable feat by doubling the speed of
the world's leading supercomputers to reach 33.86 petaflops. It retained its status as the
world's fastest system for the third consecutive time. Furthermore, Deep Mind unveiled
deep reinforcement learning, a CNN that acquired skills through repetitive learning and
rewards, ultimately surpassing human experts in playing games. Also, Google researcher
Tomas Mikolov and his team introduced Word2vec, a tool designed to automatically
discern the semantic connections among words.
Year 2014: In the year 2014, Chatbot "Eugene Goostman" won a competition in the
infamous "Turing test." Whereas Ian Goodfellow and his team pioneered generative
adversarial networks (GANs), a type of machine learning framework employed for
producing images, altering pictures, and crafting deepfakes, and Diederik Kingma and
Max Welling introduced variational autoencoders (VAEs) for generating images, videos,
and text. Also, Facebook engineered the DeepFace deep learning facial recognition
system, capable of identifying human faces in digital images with accuracy nearly
comparable to human capabilities.
Year 2016: DeepMind's AlphaGo secured victory over the esteemed Go player Lee
Sedol in Seoul, South Korea, prompting reminiscence of the Kasparov chess match
against Deep Blue nearly two decades earlier.Whereas Uber initiated a pilot program for
self-driving cars in Pittsburgh, catering to a limited group of users.
Year 2018: The "Project Debater" from IBM debated on complex topics with two master
debaters and also performed extremely well.
Google has demonstrated an AI program, "Duplex," which was a virtual assistant that had
taken hairdresser appointments on call, and the lady on the other side didn't notice that
she was talking with the machine.
Year 2021: OpenAI unveiled the Dall-E multimodal AI system, capable of producing
images based on textual prompts.
Year 2022: In November, OpenAI launched ChatGPT, offering a chat-oriented interface
to its GPT-3.5 LLM.
Now AI has developed to a remarkable level. The concept of Deep learning, big data, and
data science are now trending like a boom. Nowadays companies like Google, Facebook,
IBM, and Amazon are working with AI and creating amazing devices. The future of
Artificial Intelligence is inspiring and will come with high intelligence.
AI Agent
An agent is a program or software designed to perform specific tasks. It interacts with the
environment through sensors to perceive the state of the environment and uses actuators to
perform desired actions. Sensors are devices that detect changes in the environment and convert
them into electrical signals to be processed by a computer. Actuators are devices that perform
actions based on the signals received from a computer.
An agent is something that perceives and acts in an environment. The agent function for
an agent specifies the action taken by the agent in response to any percept sequence. An AI agent
is a computer program or system that is designed to perceive its environment, make decisions
and take actions to achieve a specific goal or set of goals.
Perceiving its environment through sensors and acting upon that environment through
actuators.
Examples of an AI agents
Intelligent personal assistants: These are agents that are designed to help users with
various tasks, such as scheduling appointments, sending messages, and setting reminders.
Examples of intelligent personal assistants include Siri, Alexa, and Google Assistant.
Autonomous robots: These are agents that are designed to operate autonomously in the
physical world. They can perform tasks such as cleaning, sorting, and delivering goods.
Examples of autonomous robots include the Roomba vacuum cleaner and the Amazon
delivery robot.
Gaming agents: These are agents that are designed to play games, either against human
opponents or other agents. Examples of gaming agents include chess-playing agents and
poker-playing agents.
Fraud detection agents: These are agents that are designed to detect fraudulent behavior
in financial transactions. They can analyze patterns of behavior to identify suspicious
activity and alert authorities. Examples of fraud detection agents include those used by
banks and credit card companies.
Traffic management agents: These are agents that are designed to manage traffic flow
in cities. They can monitor traffic patterns, adjust traffic lights, and reroute vehicles to
minimize congestion. Examples of traffic management agents include those used in smart
cities around the world.
A software agent has Keystrokes, files contents, received network packages that act as
sensors and displays on the screen, files, and sent network packets acting as actuators. A
Human-agent has eyes, ears, and other organs which act as sensors, and hands, legs,
mouth, and other body parts act as actuators.
A Robotic agent has Cameras and infrared range finders which act as sensors and
various motors act as actuators.
Structure of an AI Agent
Architecture is the machinery that the agent executes on. It is a device with sensors
and actuators, for example, a robotic car, a camera, and a PC.
An agent program is an implementation of an agent function. An agent function is a
map from the percept sequence (history of all that an agent has perceived to date)
to an action.
A simple reflex agent acts according to a rule whose condition matches the current
state, as defined by the percept. The agent in the above figure will work only if the
correct decision can be made on the basis of only the current percept-that is, only if
the environment is fully observable.
Simple reflex agents ignore the rest of the percept history and act only on the basis
of the current percept. Percept history is the history of all that an agent has
perceived to date. The agent function is based on the condition-action rule. A
condition-action rule is a rule that maps a state i.e., a condition to an action. If the
condition is true, then the action is taken, else not. This agent function only succeeds
when the environment is fully observable. For simple reflex agents operating in
partially observable environments, infinite loops are often unavoidable. It may be
possible to escape from infinite loops if the agent can randomize its actions.
Problems with Simple reflex agents are:
A model based reflex agent keeps track of the current state of the world using an
internal model. It then chooses an action in the same way as the reflex agent. Here
the agent should maintain some sort of internal state that depends on the percept
history and thereby reflects at least some of the unobserved aspects of the current
state.
It works by finding a rule whose condition matches the current situation. A model-
based agent can handle partially observable environments by the use of a model
about the world. The agent has to keep track of the internal state which is adjusted
by each percept and that depends on the percept history. The current state is stored
inside the agent which maintains some kind of structure describing the part of the
world which cannot be seen.
Goal-Based Agents
A Goal based agent keeps track of the world state as well as a set of goals it is trying
to achieve, and chooses an action that will (eventually) lead to the achievement of
its goals.
These kinds of agents take decisions based on how far they are currently from their
goal (description of desirable situations).
Their every action is intended to reduce their distance from the goal. This allows the
agent a way to choose among multiple possibilities, selecting the one which reaches
a goal state.
The knowledge that supports its decisions is represented explicitly and can be
modified, which makes these agents more flexible. They usually require search and
planning. The goal-based agent’s behavior can easily be changed.
Utility-Based Agents
A utility based agent uses a model of the world, along with a utility function that
measures its preferences among states of the world. Then it chooses the action that
leads to the best expected utility, where expected utility is computed by averaging
over all possible outcome states, weighted by the probability of the outcome.
The agents which are developed having their end uses as building blocks are called
utility-based agents. When there are multiple possible alternatives, then to decide
which one is best, utility-based agents are used.
They choose actions based on a preference (utility) for each state. Agent happiness
should be taken into consideration.
Utility describes how “happy” the agent is. Because of the uncertainty in the world, a
utility agent chooses the action that maximizes the expected utility.
A utility function maps a state onto a real number which describes the associated
degree of happiness.
Environment types in AI
Deterministic vs Stochastic
When uniqueness in the agent’s current state completely determines the next state
of the agent, the environment is said to be deterministic.
Example: Chess – there would be only a few possible moves for a coin at the current state
and these moves can be determined.
The stochastic environment is random in nature which is not unique and cannot
be completely determined by the agent.
Example: Self-Driving Cars- the actions of a self-driving car are not unique, it varies time to
time.
Dynamic vs Static
An environment that keeps constantly changing itself when the agent is up with
some action is said to be dynamic.
Example: A roller coaster ride is dynamic as it is set in motion and the environment keeps
changing every instant.
Example: An empty house is static as there’s no change in the surroundings when an agent
enters.
Fully Observable
When an agent sensor is capable to sense or access the complete state of an agent at
each point in time, it is said to be a fully observable environment else it is partially
observable.
Example: Chess – the board is fully observable, and so are the opponent’s moves.
Partially Observable
Example: Driving – the environment is partially observable because what’s around the
corner is not known.
Single-agent vs Multi-agent
Single-agent
Multi-agent
Discrete vs Continuous
Discrete
Example: The game of chess is discrete as it has only a finite number of moves.
The number of moves might vary with every game, but still, it’s finite.
Continuous
The environment in which the actions are performed cannot be numbered i.e. is not
discrete, is said to be continuous.
Rational Agent:
A Rational agent is one that can choose actions that maximize the performance
measure based on its prior knowledge and percept sequence.
In other words, it must perform actions that lead to the desired changes in the
environment. A rational agent is always preferred over an irrational one as it
ensures the best result in terms of the performance measure.
It is one that does the right thing. Doing right thing is better than doing wrong thing.
Right action is the one that will cause the agent to be most successful. To measure
success in the agents, measures of rationality are used.
Concept of Rationality:
The concept of rationality refers to the ability of an AI agent to work as per the desired
actions. In other words, a rational agent must perform actions that satisfy a performance
measure. A performance measure is a function that maps a given percept sequence to a
measure of the performance of the agent. Whereas Rationality is the ability to make
decisions based on logical reasoning and optimize behavior to achieve its goals, considering
its perception of the environment and the performance measure.
Performance Measure
The performance measure is a function that maps the percept sequence to the measure of
the performance of the agent. To put it simply, it is a way to evaluate the effectiveness of
the agent. For instance, in the case of a self-driving car, the performance measure would be
to reach the destination safely and on time.
Agent's Prior Knowledge
An agent's prior knowledge is the knowledge that it has acquired from the environment. It
determines the actions that the agent can perform. For example, a self-driving car's agent
has prior knowledge of the traffic rules and road conditions.
Actuator Dependency
A rational agent must take actions that satisfy the performance measure. To do so, it
depends on the actuators to perform the required actions.
The percept sequence is the history of what the agent has perceived from the environment.
It is based on the sensors that detect changes in the environment.
APPLICATIONS OF AI
Robotics
Education
Healthcare
Marketing
Business
Banking
Agriculture
Cyber Security
Finance
Digital Marketing
Industry
Construction industry
Manufacturing industry
Automotive industry
Pharmaceutical industry
Fashion industry
Hospitals
Food industry
Retail industry
Music industry
Module-1
Important Questions:
1. Discuss the advantages and disadvantages of AI in present scenario.
2. What is meant by Intelligence? And illustrate the intelligence Parameters.
3. Describe the History of Artificial Intelligence (AI).
4. Clarify the different types of AI and summarize their functions.
5. Explain AI agent with examples.
6. With neat diagram describe the Model-Based reflex agents.
7. Demonstrate the Goal-Based agents with neat diagram.
8. Define Environment in AI and summarize its types.
9. Define rational agent and concept of Rationality?
10. Justify the four measures of Rationality.
11. Illustrate in brief the role of AI in various applications.