Faiml Unit 1 Notes
Faiml Unit 1 Notes
FAIML UNIT 1
What is Artificial Intelligence?
Goals of AI
● To Create Expert Systems − The systems which exhibit intelligent
behavior, learn, demonstrate, explain, and advice its users.
● To Implement Human Intelligence in Machines − Creating systems that
understand, think, learn, and behave like humans.
Modification is not quick and easy. It may Quick and Easy program
lead to affecting the program adversely. modification.
What is AI Technique?
Applications of AI
AI has been dominant in various fields such as −
● Gaming − AI plays crucial role in strategic games such as chess, poker, tic-
tac-toe, etc., where machine can think of large number of possible positions
based on heuristic knowledge.
● Natural Language Processing − It is possible to interact with the
computer that understands natural language spoken by humans.
● Expert Systems − There are some applications which integrate machine,
software, and special information to impart reasoning and advising. They
provide explanation and advice to the users.
● Vision Systems − These systems understand, interpret, and comprehend
visual input on the computer. For example,
o A spying aeroplane takes photographs, which are used to figure out
spatial information or map of the areas.
o Doctors use clinical expert system to diagnose the patient.
o Police use computer software that can recognize the face of criminal
with the stored portrait made by forensic artist.
● Speech Recognition − Some intelligent systems are capable of hearing and
comprehending the language in terms of sentences and their meanings
while a human talks to it. It can handle different accents, slang words, noise
in the background, change in human’s noise due to cold, etc.
● Handwriting Recognition − The handwriting recognition software reads
the text written on paper by a pen or on screen by a stylus. It can recognize
the shapes of the letters and convert it into editable text.
● Intelligent Robots − Robots are able to perform the tasks given by a
human. They have sensors to detect physical data from the real world such
as light, heat, temperature, movement, sound, bump, and pressure. They
have efficient processors, multiple sensors and huge memory, to exhibit
intelligence. In addition, they are capable of learning from their mistakes
and they can adapt to the new environment.
History of AI
The Deep Blue Chess Program beats the then world chess
1997
champion, Garry Kasparov.
5) Digital Assistance:
6) Faster Decisions:
7) Daily Applications:
8) New Inventions:
Artificial Intelligence also has some disadvantages. Let’s see some of them
Types of Agents
Agents can be grouped into four classes based on their degree of perceived
intelligence and capability :
● Simple Reflex Agents
● Model-Based Reflex Agents
● Goal-Based Agents
● Utility-Based Agents
● LearningAgent
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, 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 :
● Very limited intelligence.
● No knowledge of non-perceptual parts of the state.
● Usually too big to generate and store.
● If there occurs any change in the environment, then the collection of rules need
to be updated.
Model-based reflex agents
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.
Updating the state requires information about :
● how the world evolves independently from the agent, and
● how the agent’s actions affect the world.
Goal-based agents
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 its 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
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. Sometimes achieving the desired goal is not
enough. We may look for a quicker, safer, cheaper trip to reach a destination.
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.
Learning Agent :
A learning agent in AI is the type of agent that can learn from its past experiences
or it has learning capabilities. It starts to act with basic knowledge and then is able
to act and adapt automatically through learning.
A learning agent has mainly four conceptual components, which are:
1. Learning element: It is responsible for making improvements by learning from
the environment
2. Critic: The learning element takes feedback from critics which describes how
well the agent is doing with respect to a fixed performance standard.
3. Performance element: It is responsible for selecting external action
4. Problem Generator: This component is responsible for suggesting actions that
will lead to new and informative experiences.
An AI system is composed of an agent and its environment. The agents act in their
environment. The environment may contain other agents.
An agent is anything that can perceive its environment through sensors and acts
upon that environment through effectors.
● A human agent has sensory organs such as eyes, ears, nose, tongue and
skin parallel to the sensors, and other organs such as hands, legs, mouth, for
effectors.
● A robotic agent replaces cameras and infrared range finders for the
sensors, and various motors and actuators for effectors.
● A software agent has encoded bit strings as its programs and actions.
Agent Terminology
Rationality
Rationality is nothing but status of being reasonable, sensible, and having good
sense of judgment.
Rationality is concerned with expected actions and results depending upon what
the agent has perceived. Performing actions with the aim of obtaining useful
information is an important part of rationality.
What is Ideal Rational Agent?
An ideal rational agent is the one, which is capable of doing expected actions to
maximize its performance measure, on the basis of −
Machine learning
Machine learning is about extracting knowledge from the
data. It can be defined as,
o Supervised learning
o Reinforcement learning
o Unsupervised learning
In AI, we make intelligent systems to In ML, we teach machines with data to perform
perform any task like a human. a particular task and give an accurate result.
Machine learning and deep learning Deep learning is a main subset of machine
are the two main subsets of AI. learning.
AI has a very wide range of scope. Machine learning has a limited scope.
The main applications of AI are Siri, The main applications of machine learning
customer support using are Online recommender system, Google
catboats, Expert System, Online search algorithms, Facebook auto friend
game playing, intelligent humanoid tagging suggestions, etc.
robot, etc.
On the basis of capabilities, AI can be Machine learning can also be divided into
divided into three types, which mainly three types that are Supervised
are, Weak AI, General AI, learning, Unsupervised learning,
and Strong AI. and Reinforcement learning.
AI completely deals with Structured, Machine learning deals with Structured and
Agent Environment in AI
An environment is everything in the world which surrounds the agent, but it is not a part of an
agent itself. An environment can be described as a situation in which an agent is present.
The environment is where agent lives, operate and provide the agent with something to sense and
act upon it. An environment is mostly said to be non-feministic.
Features of Environment
As per Russell and Norvig, an environment can have various features from the point of view of
an agent:
1. Fully observable vs Partially Observable
2. Static vs Dynamic
3. Discrete vs Continuous
4. Deterministic vs Stochastic
5. Single-agent vs Multi-agent
6. Episodic vs sequential
7. Known vs Unknown
8. Accessible vs Inaccessible
2. Deterministic vs Stochastic:
If an agent's current state and selected action can completely determine the next state of the
environment, then such environment is called a deterministic environment.
A stochastic environment is random in nature and cannot be determined completely by an
agent.
In a deterministic, fully observable environment, agent does not need to worry about
uncertainty.
3. Episodic vs Sequential:
In an episodic environment, there is a series of one-shot actions, and only the current percept is
required for the action.
However, in Sequential environment, an agent requires memory of past actions to determine
the next best actions.
4. Single-agent vs Multi-agent
If only one agent is involved in an environment, and operating by itself then such an
environment is called single agent environment.
However, if multiple agents are operating in an environment, then such an environment is called
a multi-agent environment.
The agent design problems in the multi-agent environment are different from single agent
environment.
5. Static vs Dynamic:
If the environment can change itself while an agent is deliberating then such environment is
called a dynamic environment else it is called a static environment.
Static environments are easy to deal because an agent does not need to continue looking at the
world while deciding for an action.
However for dynamic environment, agents need to keep looking at the world at each action.
Taxi driving is an example of a dynamic environment whereas Crossword puzzles are an example
of a static environment.
6. Discrete vs Continuous:
If in an environment there are a finite number of percepts and actions that can be performed
within it, then such an environment is called a discrete environment else it is called continuous
environment.
A chess game comes under discrete environment as there is a finite number of moves that can
be performed.
A self-driving car is an example of a continuous environment.
7. Known vs Unknown
Known and unknown are not actually a feature of an environment, but it is an agent's state of
knowledge to perform an action.
In a known environment, the results for all actions are known to the agent. While in unknown
environment, agent needs to learn how it works in order to perform an action.
It is quite possible that a known environment to be partially observable and an Unknown
environment to be fully observable.
8. Accessible vs Inaccessible
If an agent can obtain complete and accurate information about the state's environment, then
such an environment is called an Accessible environment else it is called inaccessible.
An empty room whose state can be defined by its temperature is an example of an accessible
environment.
Information about an event on earth is an example of Inaccessible environment.
Turing Test in AI
In 1950, Alan Turing introduced a test to check whether a machine can think like a human or not,
this test is known as the Turing Test. In this test, Turing proposed that the computer can be said
to be an intelligent if it can mimic human response under specific conditions.
Turing Test was introduced by Turing in his 1950 paper, "Computing Machinery and
Intelligence," which considered the question, "Can Machine think?"
The Turing test is based on a party game "Imitation game," with some modifications. This game
involves three players in which one player is Computer, another player is human responder, and
the third player is a human Interrogator, who is isolated from other two players and his job is to
find that which player is machine among two of them.
The conversation between all players is via keyboard and screen so the result would not depend
on the machine's ability to convert words as speech.
The test result does not depend on each correct answer, but only how closely its responses like a
human answer. The computer is permitted to do everything possible to force a wrong
identification by the interrogator.
PlayerA (Computer): No
In this game, if an interrogator would not be able to identify which is a machine and which is
human, then the computer passes the test successfully, and the machine is said to be intelligent
and can think like a human.
"In 1991, the New York businessman Hugh Loebner announces the prize competition, offering a
$100,000 prize for the first computer to pass the Turing test. However, no AI program to till
date, come close to passing an undiluted Turing test".
Parry: Parry was a chatterbot created by Kenneth Colby in 1972. Parry was designed to simulate
a person with Paranoid schizophrenia(most common chronic mental disorder). Parry was
described as "ELIZA with attitude." Parry was tested using a variation of the Turing Test in the
early 1970s.
Eugene Goostman: Eugene Goostman was a chatbot developed in Saint Petersburg in 2001.
This bot has competed in the various number of Turing Test. In June 2012, at an event,
Goostman won the competition promoted as largest-ever Turing test content, in which it has
convinced 29% of judges that it was a human.Goostman resembled as a 13-year old virtual boy.
In the year 1980, John Searle presented "Chinese Room" thought experiment, in his paper
"Mind, Brains, and Program," which was against the validity of Turing's Test. According to
his argument, "Programming a computer may make it to understand a language, but it will
not produce a real understanding of language or consciousness in a computer."
He argued that Machine such as ELIZA and Parry could easily pass the Turing test by
manipulating keywords and symbol, but they had no real understanding of language. So it cannot
be described as "thinking" capability of a machine such as a human.