Audience Prerequisites: What Is Artificial Intelligence?
Audience Prerequisites: What Is Artificial Intelligence?
It
would come to a great help if you are about to select Artificial Intelligence as
a course subject. You can briefly know about the areas of AI in which research
is prospering.
Audience
This tutorial is prepared for the students at beginner level who aspire to learn
Artificial Intelligence.
Prerequisites
The basic knowledge of Computer Science is mandatory. The knowledge of
Mathematics, Languages, Science, Mechanical or Electrical engineering is a
plus.
Goals of AI
To Create Expert Systems − The systems which exhibit intelligent behavior,
learn, demonstrate, explain, and advice its users.
Out of the following areas, one or multiple areas can contribute to build an
intelligent system.
Programming Without and With AI
The programming without and with AI is different in following ways −
Modification is not quick and easy. It may lead to affecting Quick and Easy
the program adversely. program modification.
What is AI Technique?
In the real world, the knowledge has some unwelcomed properties −
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.
o A spying aeroplane takes photographs, which are used to figure out spatial
information or map of the areas.
o Police use computer software that can recognize the face of criminal with
the stored portrait made by forensic artist.
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
Here is the history of AI during 20th century −
1945 Isaac Asimov, a Columbia University alumni, coined the term Robotics.
1979 The first computer-controlled autonomous vehicle, Stanford Cart, was built.
1985 Harold Cohen created and demonstrated the drawing program, Aaron.
Major advances in all areas of AI −
Case-based reasoning
Multi-agent planning
1990
Scheduling
Games
The Deep Blue Chess Program beats the then world chess champion, Garry
1997
Kasparov.
While studying artificially intelligence, you need to know what intelligence is.
This chapter covers Idea of intelligence, types, and components of
intelligence.
What is Intelligence?
The ability of a system to calculate, reason, perceive relationships and
analogies, learn from experience, store and retrieve information from
memory, solve problems, comprehend complex ideas, use natural language
fluently, classify, generalize, and adapt new situations.
Types of Intelligence
As described by Howard Gardner, an American developmental psychologist,
the Intelligence comes in multifold −
Intelligence Description Example
Reasoning
Learning
Problem Solving
Perception
Linguistic Intelligence
It starts with
a general
statement and
examines the
It conducts specific observations to makes broad general
possibilities to
statements.
reach a
specific,
logical
conclusion.
Example −
"All women of
age above 60
years are
Example − "Nita is a teacher. Nita is studious. Therefore, All grandmothers.
teachers are studious." Shalini is 65
years.
Therefore,
Shalini is a
grandmother."
Problem Solving − It is the process in which one perceives and tries to arrive at
a desired solution from a present situation by taking some path, which is blocked
by known or unknown hurdles.
Problem solving also includes decision making, which is the process of selecting
the best suitable alternative out of multiple alternatives to reach the desired goal
are available.
Humans can figure out the complete object even if some part of it is missing or
distorted; whereas the machines cannot do it correctly.
Machine does not need training for Speech This recognition system needs
Recognition as it is not speaker dependent. training as it is person oriented.
1 Expert Systems
3 Neural Networks
4 Robotics
Task Classification of AI
The domain of AI is classified into Formal tasks, Mundane
tasks, and Expert tasks.
Task Domains of Artificial Intelligence
Perception
Mathematics Engineering
Planing Creativity
Robotics
Locomotive
Humans learn mundane (ordinary) tasks since their birth. They learn by
perception, speaking, using language, and locomotives. They learn Formal
Tasks and Expert Tasks later, in that order.
For humans, the mundane tasks are easiest to learn. The same was
considered true before trying to implement mundane tasks in machines.
Earlier, all work of AI was concentrated in the mundane task domain.
Later, it turned out that the machine requires more knowledge, complex
knowledge representation, and complicated algorithms for handling mundane
tasks. This is the reason why AI work is more prospering in the Expert
Tasks domain now, as the expert task domain needs expert knowledge
without common sense, which can be easier to represent and handle.
MIDTERM
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
Performance Measure of Agent − It is the criteria, which determines how
successful an agent is.
Behavior of Agent − It is the action that agent performs after any given
sequence of percepts.
Rationality
Rationality is nothing but status of being reasonable, sensible, and having
good sense of judgment.
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).
They are rational only if a correct decision is made only on the basis of current
precept.
There are conflicting goals, out of which only few can be achieved.
Goals have some uncertainty of being achieved and you need to weigh likelihood
of success against the importance of a goal.
Two persons and a machine to be evaluated participate in the test. Out of the
two persons, one plays the role of the tester. Each of them sits in different
rooms. The tester is unaware of who is machine and who is a human. He
interrogates the questions by typing and sending them to both intelligences,
to which he receives typed responses.
This test aims at fooling the tester. If the tester fails to determine machine’s
response from the human response, then the machine is said to be intelligent.
Properties of Environment
The environment has multifold properties −
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.
Searching is the universal technique of problem solving in AI. There are some
single-player games such as tile games, Sudoku, crossword, etc. The search
algorithms help you to search for a particular position in such games.
Search Terminology
Problem Space − It is the environment in which the search takes place. (A set
of states and set of operators to change those states)
Problem Space Graph − It represents problem state. States are shown by nodes
and operators are shown by edges.
Space Complexity − The maximum number of nodes that are stored in memory.
Branching Factor − The average number of child nodes in the problem space
graph.
Depth − Length of the shortest path from initial state to goal state.
Brute-Force Search Strategies
They are most simple, as they do not need any domain-specific knowledge.
They work fine with small number of possible states.
Requirements −
State description
Initial state
Breadth-First Search
It starts from the root node, explores the neighboring nodes first and moves
towards the next level neighbors. It generates one tree at a time until the
solution is found. It can be implemented using FIFO queue data structure.
This method provides shortest path to the solution.
Disadvantage − Since each level of nodes is saved for creating next one, it
consumes a lot of memory space. Space requirement to store nodes is
exponential.
Its complexity depends on the number of nodes. It can check duplicate nodes.
Depth-First Search
It is implemented in recursion with LIFO stack data structure. It creates the
same set of nodes as Breadth-First method, only in the different order.
As the nodes on the single path are stored in each iteration from root to leaf
node, the space requirement to store nodes is linear. With branching
factor band depth as m, the storage space is bm.
Bidirectional Search
It searches forward from initial state and backward from goal state till both
meet to identify a common state.
The path from initial state is concatenated with the inverse path from the
goal state. Each search is done only up to half of the total path.
It never creates a node until all lower nodes are generated. It only saves a
stack of nodes. The algorithm ends when it finds a solution at depth d. The
number of nodes created at depth d is bd and at depth d-1 is bd-1.
Time bd bm bd/2 bd bd
Space bd bm bd/2 bd bd
In each iteration, a node with a minimum heuristic value is expanded, all its
child nodes are created and placed in the closed list. Then, the heuristic
function is applied to the child nodes and they are placed in the open list
according to their heuristic value. The shorter paths are saved and the longer
ones are disposed.
A * Search
It is best-known form of Best First search. It avoids expanding paths that are
already expensive, but expands most promising paths first.
Hill-Climbing Search
It is an iterative algorithm that starts with an arbitrary solution to a problem
and attempts to find a better solution by changing a single element of the
solution incrementally. If the change produces a better solution, an
incremental change is taken as a new solution. This process is repeated until
there are no further improvements.
end
Otherwise the (initial k states and k number of successors of the states = 2k)
states are placed in a pool. The pool is then sorted numerically. The highest
k states are selected as new initial states. This process continues until a
maximum value is reached.
function BeamSearch( problem, k), returns a solution state.
start with k randomly generated states
loop
generate all successors of all k states
if any of the states = solution, then return the state
else select the k best successors
end
Simulated Annealing
Annealing is the process of heating and cooling a metal to change its internal
structure for modifying its physical properties. When the metal cools, its new
structure is seized, and the metal retains its newly obtained properties. In
simulated annealing process, the temperature is kept variable.
We initially set the temperature high and then allow it to ‘cool' slowly as the
algorithm proceeds. When the temperature is high, the algorithm is allowed
to accept worse solutions with high frequency.
Start
k = k + 1;
End
The conventional logic block that a computer can understand takes precise
input and produces a definite output as TRUE or FALSE, which is equivalent
to human’s YES or NO.
The inventor of fuzzy logic, Lotfi Zadeh, observed that unlike computers, the
human decision making includes a range of possibilities between YES and NO,
such as −
CERTAINLY YES
POSSIBLY YES
CANNOT SAY
POSSIBLY NO
CERTAINLY NO
The fuzzy logic works on the levels of possibilities of input to achieve the
definite output.
Implementation
It can be implemented in systems with various sizes and capabilities ranging from
small micro-controllers to large, networked, workstation-based control systems.
LP x is Large Positive
MP x is Medium Positive
S x is Small
MN x is Medium Negative
LN x is Large Negative
Membership Function
Membership functions allow you to quantify linguistic term and represent a
fuzzy set graphically. A membership function for a fuzzy set A on the
universe of discourse X is defined as μA:X → [0,1].
All membership functions for LP, MP, S, MN, and LN are shown as below −
The triangular membership function shapes are most common among various
other membership function shapes such as trapezoidal, singleton, and
Gaussian.
Here, the input to 5-level fuzzifier varies from -10 volts to +10 volts. Hence
the corresponding output also changes.
Convert crisp data into fuzzy data sets using membership functions.
(fuzzification)
Linguistic variables are input and output variables in the form of simple words
or sentences. For room temperature, cold, warm, hot, etc., are linguistic
terms.
Every member of this set is a linguistic term and it can cover some portion of
overall temperature values.
RoomTemp.
Very_Cold Cold Warm Hot Very_Hot
/Target
Build a set of rules into the knowledge base in the form of IF-THEN-ELSE
structures.
Fuzzy set operations perform evaluation of rules. The operations used for OR
and AND are Max and Min respectively. Combine all results of evaluation to
form a final result. This result is a fuzzy value.
Automotive Systems
Automatic Gearboxes
Four-Wheel Steering
Hi-Fi Systems
Photocopiers
Television
Domestic Goods
Microwave Ovens
Refrigerators
Toasters
Vacuum Cleaners
Washing Machines
Environment Control
Air Conditioners/Dryers/Heaters
Humidifiers
Advantages of FLSs
Mathematical concepts within fuzzy reasoning are very simple.
You can modify a FLS by just adding or deleting rules due to flexibility of fuzzy
logic.
Fuzzy logic Systems can take imprecise, distorted, noisy input information.
Fuzzy logic is a solution to complex problems in all fields of life, including medicine,
as it resembles human reasoning and decision making.
Disadvantages of FLSs
There is no systematic approach to fuzzy system designing.
They are suitable for the problems which do not need high accuracy.