AI Unit1
AI Unit1
Prepared By :
Prof. Parth D. Joshi
L J College of Computer Applications, Vastrapur, Ahmedabad
Unit 1: Fundamentals of Artificial Intelligence and Intelligent Agents
01 Introduction to AI
- What is Artificial Intelligence
- Approaches of Artificial Intelligence
--Acting Humanly : The Turing Test Approach
--Thinking Humanly : The cognitive science model Approach
--Thinking Rationally : The “Laws of thought” Approach
--Acting Rationally : The rational agent approach
- State of the Art (Application of AI)
- Agents and Its Environment
- The Concept of Rationality
- The Nature of Environment
- The Structure of Agents
Artificial intelligence (AI) is wide-ranging branch of computer science concerned with building smart machines
capable of performing tasks that typically require human intelligence. AI is an interdisciplinary science with
multiple approaches. AI is an art which is used to make machines which can understand likes humans, works
like humans, predicts like humans and make decisions like humans.
Artificial Intelligence is a way of creating a computer or mobile, a robot, or an application which can
think intelligently, just in the way a normal human think and process his/her thoughts.
It is an area of computer science that emphasizes the creation of intelligent machines which work and react
like humans.
Various application of AI includes gaming, natural language processing, expert systems, speech recognition,
handwriting recognition, and intelligent robots.
The term “Robotics” was introduced in 1945. AI saw major advantages after 1990 in various fields.
Definitions of artificial intelligence according to eight recent textbooks are shown in the table below. These
definitions vary along two main dimensions. The ones on top are concerned with thought
processes and reasoning, whereas the ones on the bottom address behavior. Also, the definitions on the left
measure success in terms of human performance, whereas the ones on the right measure against
an ideal concept of intelligence, which we will call rationality. A system is rational if it does the right thing.
``The automation of activities that we associate with human ``The study of the computations that make it possible to
thinking, activities such as decision-making, problem solving, perceive, reason, and act'' (Winston, 1992)
learning ...'' (Bellman, 1978)
``The art of creating machines that perform functions that ``A field of study that seeks to explain and emulate intelligent
require intelligence when performed by people'' (Kurzweil, behavior in terms of computational processes'' (Schalkoff,
1990)`` 1990)
The study of how to make computers do things at which, at the ``The branch of computer science that is concerned with the
moment, people are better'' (Rich and Knight, 1991) automation of intelligent behavior'' (Luger and Stubblefield,
1993)
Thinking Rationally
- Laws of Thoughts Approaches
Acting Rationally
- The Rational Agent Approaches
During the test, one of the humans functions as the questioner, while
the second human and the computer function as respondents. The
questioner interrogates the respondents within a specific subject
area, using a specified format and context. After a preset length of
time or number of questions, the questioner is then asked to decide
which respondent was human and which was a computer.
The test is repeated many times. If the questioner makes the correct
determination in half of the test runs or less, the computer is
considered to have artificial intelligence because the questioner
regards it as "just as human" as the human respondent.
Autonomous Processing
Knowledge Representation
In the Total Turing Test, verbal behaviours are not the sole
standard for intelligence: other behaviours are examined
too. “‘The candidate must be able to do, in the real world of
objects and people, everything that real people can do”. In
other words, the Total Turing Test can only be applied to a
robot, or some other agent that is situated and embodied in
the physical world.
Robotics
Computer Vision
For example, Newell and Simon, who developed GPS, the ``General Problem Solver'' (Newell and Simon,
1961), were not content to have their program correctly solve problems. They were more concerned with
comparing the trace of its reasoning steps to traces of human subjects solving the same problems. This is
in contrast to other researchers of the same time (such as Wang (1960)), who were concerned with
getting the right answers regardless of how humans might do it. The interdisciplinary field of cognitive
science brings together computer models from AI and experimental techniques from psychology to try to
construct precise and testable theories of the workings of the human mind. Although cognitive science is a
fascinating field in itself, we are not going to be discussing it all that much in this book. We will
occasionally comment on similarities or differences between AI techniques and human cognition. Real
cognitive science, however, is necessarily based on experimental investigation of actual humans or
animals, and we assume that the reader only has access to a computer for experimentation. We will
simply note that AI and cognitive science continue to fertilize each other, especially in the areas of vision,
natural language, and learning.
Prepared By : Prof. Parth D. Joshi
L J College of Computer Applications, Vastrapur, Ahmedabad
Thinking Rationally: The Laws of thought Approach
The Greek philosopher Aristotle was one of the first to attempt to codify ``right thinking,'' that is, irrefutable reasoning
processes. His famous syllogisms provided patterns for argument structures that always gave correct conclusions
given correct premises. For example, ``Socrates is a man; all men are mortal; therefore Socrates is mortal.'' These laws
of thought were supposed to govern the operation of the mind, and initiated the field of logic.
The development of formal logic in the late nineteenth and early twentieth centuries, which we describe in more detail in
Chapter 6, provided a precise notation for statements about all kinds of things in the world and the relations between
them. (Contrast this with ordinary arithmetic notation, which provides mainly for equality and inequality statements
about numbers.) By 1965, programs existed that could, given enough time and memory, take a description of a problem
in logical notation and find the solution to the problem, if one exists. (If there is no solution, the program might never
stop looking for it.) The so-called logicist tradition within artificial intelligence hopes to build on such programs to create
intelligent systems.
There are two main obstacles to this approach. First, it is not easy to take informal knowledge and state it in the formal
terms required by logical notation, particularly when the knowledge is less than 100% certain. Second, there is a big
difference between being able to solve a problem ``in principle'' and doing so in practice. Even problems with just a few
dozen facts can exhaust the computational resources of any computer unless it has some guidance as to which
reasoning steps to try first. Although both of these obstacles apply to any attempt to build computational reasoning
systems, they appeared first in the logicist tradition because the power of the representation and reasoning systems
are well-defined and fairly well understood.
There are also ways to act rationally that do not seem to involve inference, e.g., reflex actions.
❖ It is more general than the logical approach because correct inference is only a useful
mechanism for achieving rationality, not a necessary one.
Achieving perfect rationality in complex environments is not possible because the computational demands
are too high. However, we will study perfect rationality as a starting place.
2. Speech Recognition
4. Game Playing
5. Spam Fighting
6. Robotics
7. Machine Translation
8. Logistics Planning
Speech Recognition
A traveler calling United Airlines to book a flight can have the entire conversation guided by an automated
speech recognition and dialog management system.
Robotics
The iRobot Corporation has sold over two million Roomba robotic vacuum cleaners for home use. The
company also deploys the more rugged PackBot to Iraq and Afghanistan, where it is used to handle
hazardous materials, clear explosives, and identify the location of snipers.
Game Playing
IBM’s DEEP BLUE became the first computer program to defeat the world champion in a chess match
when it bested Garry Kasparov by a score of 3.5 to 2.5 in an exhibition match (Goodman and Keene,
1997). Kasparov said that he felt a “new kind of intelligence” across the board from him. Newsweek
magazine described the match as “The brain’s last stand.” The value of IBM’s stock increased by $18
billion. Human champions studied Kasparov’s loss and were able to draw a few matches in subsequent
years, but the most recent human-computer matches have been won convincingly by the computer.
Logistics Planning
During the Persian Gulf crisis of 1991, U.S. forces deployed a Dynamic Analysis and Replanning Tool,
DART (Cross and Walker, 1994), to do automated logistics planning and scheduling for transportation.
This involved up to 50,000 vehicles, cargo, and people at a time, and had to account for starting points,
destinations, routes, and conflict resolution among all parameters. The AI planning techniques generated
in hours a plan that would have taken weeks with older methods. The Defense Advanced Research
Project Agency (DARPA) stated that this single application more than paid back DARPA’s 30-year
investment in AI.
•An agent is something that has senses and it can act, though it is
not a human or a living creature.
Behavior of Agent − It is the action that agent performs after any given sequence of percepts.
Percept Sequence − It is the history of all that an agent has perceived till date.
What is environment?
It is the global space where an agent performs given actions. With the help of sensors, actions, percepts
(ability to see, hear, understood etc. Agent’s perceptual inputs at a given instance) and effectors(agents act in
the environment with help of effectors), agent work in the environment.
A rational agent always performs right action, where the right action means the
action that causes the agent to be most successful in the given percept
sequence. The problem the agent solves is characterized by Performance
Measure, Environment, Actuators, and Sensors (PEAS).
Discrete / Continuous − If there are a limited number of distinct, clearly defined, states of the
environment, the environment is discrete (For example, chess); otherwise it is continuous (For
example, driving).
Static / Dynamic − If the environment does not change while an agent is acting, then it is static;
otherwise it is dynamic.
Single agent / Multiple agents − The environment may contain other agents which may be of the
same or different kind as that of the agent.
Following are the main three terms involved in the structure of an AI agent:
Agent program: Agent program is an implementation of agent function. An agent program executes on the
physical architecture to produce function f.
•Goal-based agents
•The Simple reflex agent does not consider any part of percepts history during their decision and action
process.
•The Simple reflex agent works on Condition-action rule, which means it maps the current state to action. Such
as a Room Cleaner agent, it works only if there is dirt in the room.
oIn left figure, rectangles are used to denote the current internal state of the agent’s decision process, and ovals to
represent the background information used in the process.
oIn right, The INTERPRET-INPUT function generates an abstracted description of the current state from the
percept; the RULE-MATCH function returns the first rule in the set of rules which matches with provided state
description.
When the environment is fully observable, only then right figure will be succeed.
Prepared By : Prof. Parth D. Joshi
L J College of Computer Applications, Vastrapur, Ahmedabad
Model Based Reflex Agents
•The Model-based agent can work in a partially observable environment, and track the situation.
•Model: It is knowledge about "how things happen in the world," so it is called a Model-based agent.
•These agents have the model, "which is knowledge of the world" and based on the model they perform
actions.
Model based reflex agents keep track of current state of the world, using its own internal model; and then selects the
action. In the right figure, UPDATE-STATE is responsible for creating the new internal state description.
•The agent needs to know its goal which describes desirable situations.
•Goal-based agents expand the capabilities of the model-based agent by having the "goal" information.
•These agents may have to consider a long sequence of possible actions before deciding whether the goal is
achieved or not. Such considerations of different scenario are called searching and planning, which makes an
agent proactive.
•Utility-based agent act based not only goals but also the best way to achieve the goal.
•The Utility-based agent is useful when there are multiple possible alternatives, and an agent has to choose in
order to perform the best action.
•The utility function maps each state to a real number to check how efficiently each action achieves the goals.
•It starts to act with basic knowledge and then able to act and adapt automatically through learning.
•Critic: Learning element takes feedback from critic which describes that how well the agent is doing with
respect to a fixed performance standard.
•Problem generator: This component is responsible for suggesting actions that will lead to new and
informative experiences.
•Hence, learning agents are able to learn, analyze performance, and look for new ways to improve the
performance.