Unit 1
Goal in Problem Solving
Introduction: - "Developing
computers programs to solve complex problems by the application of processes
that are analogous to human resourcing process"
AI is the ability of a program
to perform the same kinds of functions that characterize human thoughts which
includes.
i) Systems
that thinks like human
ii) Systems
that thinks acts like human
iii) Systems
that thinks think rationally
iv) Systems
that thinks acts rationally
i) Systems that thinks like humans: - This
requires getting inside of the human mind to see how it works and then
comparing our computer programs to this. This is what cognitive science afferents
to do. An others way to do this is to observe a human problems solving and rogue
that one's programs go about problem solving in similar way.
ii) Systems that act like human: - To
be considered intelligent a program must be able to act sufficiently like a
human to fool an interrogator. The machine and the human are isolated from the
person carrying out the test and messages are exchanged via a keyboard and
screen. If the person cannot distinguish between the computer and the human
being then the computer must be intelligent.
iii) System that think rationally: - For
example all computers use energy. Using energy always generates heat. Therefore
all computers generate heat. This initiates the field of logic. Formal logic
was developed in the lot nineteen century. This was the first step forwards
enabling computer programs to reason logically.
iv) System that act rationally: - Acting
rationally means acting so as to achieve one's goals given one's beliefs. An
agent is just something that perceives and acts. In the logical approach to AI
the emphasis is on correct inferences.
Function of AI
- Philosophy: - Logic methods of
reasoning mind as physical system foundations of Learning, Language, and
Rationality.
- Mathematics: - Formal representation
and proof algorithm, computation, decidability, tractability, probability.
Philosophers staked out most of the important ideas of AI but to move to a
formal science requires a level of mathematics formulism in three main areas
computation logic and probability.
- Economics: - Utility decision theory
- Neap Science: - Physical substrate
for mental activity
- Psychology: - Phenomena of perception
and motor control, experimental techniques. The principle characteristic of
cognitive. Psychology is the brain processes and process information.
- Computer Engineering: - Building fast
computers
- Control Theory: - Design systems that
maximize an objective function over time
- Linguistics: - Knowledge
representation grammar having a theory of how human successfully process
natural language is an AI complete problem if we could solve this problem then
we would have created a model of intelligence.
Application area of an AI: - Today's AI
systems have been able to active limited success in some of these tasks.
- In computer
vision the systems are capable of face recognition
- In Robotics
we have been able to make vehicles that are mostly automats.
- In natural
language processing we have systems that are capable of simple machine
translation
- Today's
Expert systems can carry out medical diagnosis in a narrow domain
- Speech
understanding systems are capable of recognizing several thousand words
continuous speech
- Planning
and scheduling systems had been employed in scheduling experiments with the
Hubble Telescope.
- The
Learning systems are capable of doing text categorization into about a 1000
topics
- In games AI
systems can play at the Grand Master level in chess (World Champion) checkers
etc.
What can AI system NOT do yet?
- Understand
natural language robustly (e.g. read and understand articles in a newspaper)
- Surf the
web
- Interpret
an arbitrary visual science
- Learn a
natural language
- Construct
plans in dynamic real time domains
- Exhibit
true autonomy and intelligence
Goal Schemas: - To build a system to
solve a particular problem we need to do four things.
- Define the
problem precisely. This definition must include precise specifications of what
the initial situations will be as well as what final situations constitute
acceptable solutions to the problem.
- Analyze the
problem. A few very important features can have an immense impact on the
appropriateness of various possible techniques for solving the problem
- Isolate and
represent the task knowledge that is necessary to solve the problem.
- Choose the
best problem solving techniques and apply them to the particular problem
i) Search Problem: - It is
characterized by an initial state and a goal state description. The guesses are
called the operators where a single operator transforms a state into another
state which is expected to be closer to a goal state. Here the objective may be
to find a goal state or to find a sequence of operators to a goal state.
Additionally the problem may require finding just any solution or an optimum
solution.
ii) Planning: - The purpose of planning
is to find a sequence of actions that achieves a given goal when performed
starting in a given state. In other words given a set of operator instances
(defining the possible primitive actions by the agent) an initial state
description and a goal state description or predicate the planning agent
computers a plan.
Simple Planning Agent: - The problem – solving agents are able to
plan a head to consider the consequences of sequences of actions before acting.
And a knowledge – based agents can
select actions based on explicit, logical representations of the current state
and the effects of actions
Problem
Solving Agents + Knowledge – based Agents = Planning Agents
Linear Planning: - Basic idea work and
one goal until completely solved before moving on to the next goal planning
algorithm maintains goal stack
i) Implications
- No inter
leaving of goal achievement
- Efficient
search if goals do not interact
ii) Advantages
- Reduced
search space since goals are solved one at a time
-
Advantageous if goals are (mainly) independent
- Linear
planning is sound
Iii) Disadvantages
- Linear
planning may produce sub optional solutions
- Linear
planning is incomplete
Concept of non – linear planning
Use goal set instead of goal
stack. Include in the search space all possible sub goal ordering. Handles goal
interactions by interleaving.
Advantages
- Non –
linear planning is sound
- Non –
linear planning is complete
- Non –
linear planning may be optimal with respect to plan length (depending on search
strategy employed)
Disadvantage
- Larger
search space since all possible goal orderings may have to be considered
- Somewhat
more complex algorithm more bookkeeping
Means – Ends Analysis: - The means –
ends analysis concentrates around the detection of differences between the
current state and the goal state. Once such difference is isolated an operator
that can reduce the difference must be found. However perhaps that operator
cannot be applied to the current state. Hence, we setup a sub – problem of
getting to a state in which it can be applied. The kind of backward chaining in
which the operators are selected and then sub goals are setup to establish the
preconditions of the operators is known as operator sub – goal.
Just like the other problem
solving techniques, means – ends analysis relies on a set of rules that can
transform one problem state into another. However these rules usually are not
represented with complete state descriptions on each side. Instead, they are
represented as left side, which describes the conditions that must be met for
the rule to be applicable and a right side, which describes those aspects of
the problem state that will be changed by the application of rule. A separate
data structure called a difference table indexes the rules by the differences
that they can be used to reduce.
Algorithm: Means – Ends Analysis
- Compare
CURRENT to GOAL. If there are no differences between them, then return.
- Otherwise,
select the most important difference are reduce it by doing the following until
success or failure is signaled
a) Select a
new operator O, which is applicable to the current difference. If there are no
such operators then signal failure.
b) Apply O to
CURRENT. Generate descriptions of two states, O – START a state in which O's
preconditions are satisfied and O – RESULT, the state that would result if O
were applied in O – START
Production Rules Systems: - Since
search is a very important process in the solution of hard problems for which
no more direct techniques are available, it is useful to structure AI programs
in a way that enables describing and performing the search process. Production
systems provide such structures. A production systems consists of:
- A set of
rules each consisting of a left side that determines the applicability of the
rule and a right side that describes the operation to be performed if the rule
is applied.
- One or more
knowledge or databases that contain whatever information is appropriate for the
particular task.
- A control
strategy that specifies the order in which the rules way of resolving the
conflicts that arise when several rules match at once.
i) Forward Chaining Systems: - In a
forward chaining system the facts in the system are represented in a working
memory which is continually updated. Rules in the system represent possible
actions to take when specified conditions hold on items in the working memory
they are sometimes called condition – action rules. The conditions are usually
patterns that must match items in the working memory while the actions usually
involve adding or deleting items from the working memory.
The interpreter controls the
application of the rules, given the working memory, thus controlling the
system's activity. It is based on a cycle of activity sometimes known as a
recognize act cycle. The system first checks to find all the rules whose
conditions hold, given the current state of working memory. It then selects one
and performs the actions in the action part of the rule. The actions will
result in a new working memory and the cycle begins again. This cycle will be
repeated until either no rules fine or some specified goal state is satisfied.
ii) Backward Chaining Systems: - So far
we have looked at how rule based systems can be used to draw new conclusions
from existing data adding these conclusions to a working memory. This approach
is most use full when you know all the initial facts, but don't have much idea
what the conclusion might be.
If we do know what the
conclusion might be, or have some specific hypothesis to test forward chaining
systems may be inefficient. We could keep on forward chaining until no more
rules apply or you have added your hypothesis to the working memory. But in the
process the system is likely to do a lot of irrelevant work adding
uninteresting conclusions to working memory.
iii) My CIN Style Probability and its
Application: - In artificial intelligence, My CIN was an early expert
system designed to identify bacteria causing severe in factions, such as
bacteremia and meningitis, and to recommend antibiotics, with the amount
adjusted for patient's body weight the name derived from the antibiotics
themselves, as many antibiotics have the suffix "MYCIN". The MYCIN
system was also used for the diagnosis of blood clotting diseases.
MYCIN was developed over five or
six years in the early 1970s at Stanford University in Lisp by Edward short
life. MYCIN was never actually used in practice but research indicated that it
proposed an acceptable therapy in about 69% of cases, which was better than the
performance of infectious disease experts who were judged using the same
criteria. MYCIN operated using a fairly simple inference engine, and a
knowledge base rules. It would query the physician running the program via a
long series of simple Yes/No or textual question. At the end it provided a list
of possible culprit bacteria ranked from high to low based on the probability
of each diagnosis, its confidence in each diagnosis probability, the reasoning
behind each diagnosis and its recommended course of drug treatment.
Practical use/Application: - MYCIN was
never actually used in practice. This wasn't because of any weakness in its
performance. As mentioned in tests it output formed members of the Stanford
medical school faculty. Some observers raised ethical and legal issues related
to the use of computers in medicine if a program gives the wrong diagnosis or
recommends the wrong therapy, who should be held responsible?
Unit 2 Intelligence
Introduction of Intelligence: - Artificial
intelligence is concerned with the design of intelligence in and artificial
device. The turn was invented by MC Cathy in 1956.
Artificial intelligence is about
designing system that are as intelligent as human. This view involves trying to
understand human through and an effort to build machines that emulate the human
though process. This view is the cognitive science approach to AI.
Common Sense Reasoning: - Common sense
is ability to analyze the situation best on it context, using millions of
integrated pieces of common knowledge depends on being able to do common sense resining
central part of intelligent behavior.
Example every know that drawing
a glass of water the glass will break and water will spill. However this
information is not obtained by formula or equation. Common sense knowledge
means what everyone knows. Example: -
- Every
person is younger then the person's mother
- People
don't like being repeatedly interrupted
- If you hold
a knife by its blade then the blade may cut you.
- People
generally sleep at right
Agents: - An agent is anything that can
be viewed as perceiving its environment through sensors and acting upon that
environment through actuators
- Human
agent; eyes, and other organs for sensors; hands, legs, mouth and other body
parts for actuators
- Robotic
agent; cameras and infrared range finders for sensors; various motors for
actuators agents and environments
Figure: -
Personality of Agent
Environment Type
- Fully
observable (Vs. partially observable): An agents sensors give it access to the
complete state of the environment at each point in time
-
Deterministic (Vs. stochastic): The next state of the environment is completely
determined by the current state and the action executed by the agent.
- Episodic (Vs.
sequential): The gent's experience is divided into atomic "episodes",
and the choice of action in each episodes depends only on the episode itself
- Static (Vs.
dynamic): The environment in unchanged while an agent is deliberating. (The
environment is semi dynamic if the environment itself does not change with the
passage of time but the agent's performance score does)
- Discrete (Vs.
continuous): A limited number of distinct clearly defined percepts and actions.
Agent Types
Four basic types in order of
increasing generality
- Simple
reflex agents
- Model based
reflex agents
- Goal based
agents
- Utility
based agents
- Simple Reflex Agents: - The agent
select an action best on the current precept ignoring the rest of the precept
history
Figure: -
Simple Reflex Agent
- Model Based Reflex Agent: - The agent
decides its actions best on of predefined set of condition action rules. For
e.g.: - a telephone operator answering machine
Figure: -
Model based reflex agent
- Goal based Agent: - The agent decides
its action best on a known a goal. For e.g.: - a GPS system finding a path to
certain destination
Figure: -
Goal Based Agent
Unit 3
Knowledge Representation
Knowledge Representation and Reasoning: - Intelligent
should have capacity for
- Receiving: - That is representing its
understanding of the world
- Knowledge Representation: - That is
representing its understanding of the world
- Reasoning: - That is inferring the
implications of what it knows and of the choices ithas.
- Acting: - That is choosing what it
want to do and carry it out.
Representation of knowledge and
the reasoning process are central to the entire field of artificial intelligent.
The primary component of a knowledge best agent is its knowledge base. A
knowledge best is a set of sentences. Each sentence is expressed in a language.
Sentences represent some assertion about the world. There must be mechanisms to
derive new sentences from old sentences. This process is known as inference or
reasoning. Inference must obey primary requirement that the new sentences
should follow logically from the previous one.
Approaches to knowledge Representation: - A
good system for the representation knowledge in a particular dement should
possess the following properties
-Representational Adequacy: - The
ability to represent all of the kinds of knowledge that are needed in that
domain.
-Inferential Adequacy: - The ability to
manipulate the representation structures in such a way as to derive new
structure cross ponding to new knowledge inferred from old.
- Inferential Efficiency: - The ability
to incorporate in to the knowledge structure additional information that can be
used to focus the attention of the inference mechanism in the most promising
direction.
- Inquisitional Efficiency: - The
ability to acquire new information easily. The simplest case involve direct
instruction of new knowledge into the database.
Logic: - Logic is the primary vehicle
for representing and resuming about knowledge. The advantage of using formal
logic as a language of AI is that it is price and deferent. These allows
program to be written which are declarative. This however leads to seven
limitation. Clearly a large person of the reasoning carried out by human depended
on handling knowledge that is on certain. Logic cannot represent this uncertainty
well. Similarly natural language resurging require inferring hidden state like
the intention of the speaker.
A logic consist of two parts, a
language and method of measuring. The logical language intern as two aspects,
syntax and semantics. They are
- Syntax: - The atomic symbols of the
logical language and the rules for constructing well formed a non-atomic expression
of the logic. Syntax specifies the symbols in the language and how they can be
combined to form sentences.
- Semantics: - The meanings of the
symbol of the logic, and rules there for demining the meaning of non – atomic
expression of the logic. It specifics what facts in the world a syntax refers
to. A fact is a claim about the world and may be true or false some popular
logics are propositional logic, first order predicate logic high order
predicate logic and fuzzy logic.
- Propositional Logic: - In PropositionalLogical
(PL) and user defines a set of propositional symbols like P&Q. User defines
the semantics for each of these symbol. For e.g.: -
P means
"It is hot"
Q means
"It is humid"
R means
"It is raining"
- A symbol
- If S is a
sentence than "~" is a sentence, where "~" is the not
logical operator?
- If sand PR
sentences then (S˅T), (S˄T) (S→T) and (S<→T) are also sentences for e.g.: -
(P˄Q)→R
It is hot and
humid then it is raining
Q→P
If it is
humid then it is hot R It is raining
- Given the
truth value of all of the constituent symbol in a sentence that sentence can be
content the value true or fails. This is called an inter pretention of the
sentence
- A model is
an inter pretention of a set of sentences such that each sentence is true. A model
is just a formal mathematical structure that stands in for the world.
- A valid
sentence (also called as tautology) is a sentence that is true under all inter
pretention. Hence no matter what the world is actually like or what the
semantic is the sentence is true.
- An
inconstant sentence (called on satisfy able or a contradiction) is a sentence
that is false under all inter reaction. Hence the world is never like that it
describes
First Order Logic
Syntax: - Syntax are symbol users the
symbols or alphabet be aware that there are all sorts of solidly different ways
to define first order logic
a) Alphabet: - There are different
types of symbols they are
- Logical Symbol: - These are symbols
that have a standard meaning like AND, OR, NOT, ALL, EXIT, IMPLIES if FALSE,
TRUE etc.
- Non Logical Symbol: - They are one
dimensional array two dimensional array N dimensional array functions (1 ary 2
array …….. n …….ary) variables etc.
b) Terms: - A term is either and
individual constant or a variable are any function applied to a terms.
c) Atomic Formula: - An atomic formulae
is either false are an n dimensional array predicate applied to ‘n’ terms
d) Literals: - A literals is either an
atomic formula (Positive literal) or the negation of an atomic formula (a negative
literals) a ground literal is avariable free literal
e) Clauses: - Clause is a disjunction
of literals a ground cause is a variable free clause a Horn clause is a clause
with at most one +ve literal a definite is a hornclause with exactly one +ve literal
Logical Agents
In logical agents we design
agents that can form representation of the world, use a process of in France to
derive new representation about the world and use these new representations to
reduce what to do?
- Knowledge
base agent the central component of knowledge base agent is its knowledge base.
A knowledge base is a set of sentences. Each sentence is expressed in a
language called a knowledge presentation language and represents some accretion
about the world.
|
Function: - KB – AGENT (percepts) return
an action
Static: - KB, a knowledge base t, a
counter initially 0.
TELL (KB, MAKE – PERCEPT – SENTENCE
(Percept t)
Action ← ASK (KB, MAKE – ACTION – QUERY (
TELL (KB MAKE – ACTION – SENTENCE (action
t))
T = ++1
Return action
|
Fig: - A
generic knowledge base agent
Figure shows the outline of a
knowledge best agent program. Like all our agents it text a percept as I/P and
returns an action. The agent Montana a Knowledge Base (KB) which may initially
content some background knowledge base what it perceives, second, it asks the
knowledge base what action should perform. In the process of answering this
query, extensive reasoning may be done about the current state of the world,
about the outcomes of possible action sequences and so on. Third, the agent
recorders its choice with tell and executed the action.
Formal Logic Connectives Syntax, Semantics
Syntax
- Rules for
constructing legal sentences in the logic
- Which
symbol we can use
- How we are
allowed to combine symbols
-
Propositions
- Connective
and, or, not,
implies, if (
)
Semantics
-
How we interpret (read) sentences in the logic
-
Assign a meaning to each sentences
-
Use true the table to work out the truth of statement
Semantic Network
Figure:
The idea behind the semantic
network is that knowledge is often best understood as a set of concept that are
related to one another. The meaning of a concept is defined by its relationship
to another concept. A semantic network consist of a set of node that are
connected by labeled arcs. The nodes represent concepts and the arcs represents
relations between concepts.
Common Sematic Relations
INSTANCE
X
is an INSTANCE of Y, if X is a specific example of the general concept Y.
ISA
X
ISA Y, if X is a subset of the more general concept Y e.g.: - sparrow ISA bird.
Haspart
X
has part Y, if the concept Y is a part of the concept X. e.g.: sparrow has part
tail.
- Semantic Tree
A
semantic tree is a representation that is a semantic net I which shorten links
are called branches. Each branch connects two node. The head node is called
parent node and tail node is called child node. One node has no parent; it is
called the root node. Other nodes have exactly one parents. Some nodes have no
children; they are leaf node when two nodes are connected to each other by a
chain of two or more branches one is set to be the ancestor; the other is set
to be the descendent.
- Inheritance
Inheritance
is a key concept in semantic n/w and can be represented naturally by following
ISA link. In general, if concept X has property P, then all concepts that are a
subset of X should also have property P. In practice, inherited properties are
usually treated has default values. If a node has direct link that contradicts
inherited property, then the default is over rider.
- Multiple Inheritance
Ø
Multiple inheritance allows an object to
inherit properties from multiple concept
Ø
Multiple inheritance can sometime allow
an object to inherit conflicting properties.
Ø
Conflicts are potentiallyunatonable so conflict
resolution strategies are needed
Predicate Calculus (Predicate Logic)
In
mathematical logic, predicate logic is generic turn for symbolic formal systems
like first order logic, second order logic or many sorted logic. This formal
system is distinguished from other system in that its formula content variables
which can be quantified. Two common quantifies are existential ᴲ (“There
exist”) and universal U (“for all”) quantifies. Predicate calculus symbols may
represent either Constance variable, function, predicate. Constance name
specific objects are properties in the domain of this coursed. Thus tree tall
and blue are examples of well form constant symbols. The constant true and false
are included. Functions denote mapping of one or more elements in a set called
the domain of the function. In to a unique element of another set. Elements of
the domain and range are objects in the old of discourse. Every function
symbols have an associated entity indicating the number of element in the
domain mapped on to each element of range.
Predicate
logic uses three additional notation they are
i) Predicate
A predicate is a relation that
binds two items together for example: Krishna like apple. Know we can write
like (Krishna, like apple) where like is predicate that links two items Krishna
and Apple.
Thus predicate can be
generalized as like X, Y where X and Y are the variable it means X likes Y
ii) Terms (Literals)
Terms are arguments in a
predicate logic example Ravi’s father is Ranis father that is father (father
iii) Quantifiers
A quantifiers is a symbol that
permits to declare or identify the range or scope of variables in a logical
expression. There are two types of quantifiers they are
-
Universal quantifiers
-
Existential quantifiers
- Universal Quantifiers
If
A is a variable the ¥a is read as
i)
for all A
ii)
for each A
iii)
for every
- Existential Quantifiers
If B is a variable then ϶b is
read as
i)
there exist B
ii)
for some B
iii)
for at histone B
Resolution
Robinson
in 1965 introduce the resolution principle which can be directly apply to any
set of clues. The principle is given any two clues A and B, if there is lateral
Bin A and which has complementary term >p in B, delete P from A and B an
construct a new close of the remaining clues. The clues so constructed is
called “resolving of A and B”.
Substitution
Resolution
works on the principle of identifying complementary literals in two clues a
deleting then there by forming a new literal. The process is simple an state
forward where are variables the problem becomes complicated and there is
necessary to make proper substitution.
There
are three major types of substitution
-
Substitution of variable by a constant
-
Substitution of variable by another variable
-
Substitution of variable by function that does not have same variable
Unification
In
prepositional logic it is easy to determine that how literals cannot both be
tree at the same time for example: man (John) &Ʌ man (john) thus
in order to determine contradiction win need a machine procedure that compares
two literals at discourse where their exist a set of substitution that made
them identical there is a state forward recursive procedure called unification
algorithm. The basic idea of unified two literals we fast check if their
initial predicate symbols are the same. If so we can processed otherwise there
is no way to unified regard less of their arguments.Suppose we want to unify an
expressions P(K,Y) & P(K,Z) here the predicate is same so we can unify by
substituting Z by Y.
Frame
Frame
is a collection of attribute slots and associated values that describe some
real word entity. Frames on their own are not particularly help full but frames
systems are powerful way of encoding information to reasoning process. A frame
structure provides facilities for describing objects facts over situation
procedure on what to do when a situation is encounter.
Types of Frames
- Declaration Frame: - A
frame that contains description about an object is called a declarative frame.
The computer center frame describable it a typical example of subscribe frame
- Procedural Frame: - It
is possible to have procedural knowledge represented in a frame. Such frame
which have procedural knowledge embedded in it are called procedurals frames.
The procedural frames as following slots
a) Actor Slots: - It
holds information about who is performing the activity
b) Object Slots: - This
slots as information about the item to perform on
c) Source Slots: - Source
slots holds information from where the action as to end
e) Task Slots: - This
generates the necessary sub slots required to perform the operation
Approach to Knowledge Representation: - A
good system for knowledge representation should passes the following property
- Representation Adequacy: -
The ability to represent all kinds of knowledge that are needed in that domain
- Interracial Adequacy: -
The ability to manipulate the representation structure in such a way as to
derive new structures of new knowledge inference form old.
- Acquisitioned Efficiency: - The
ability to acquire the new information easily. The simplex case involves direct
insertion by a person as new knowledge in to the knowledge base.
- Inferential Efficiency: - The
ability to incorporate into the knowledge structure additional information that
can use to fours the attention of the inference mechanism in most per mistingdirection
Knowledge
Representation Technique
(a) Simple relational knowledge: -
The simple way of storing facts page to use a simple relational method where
each fact about a set of object which set at systematically in columns. This
representation gives little opportunityfor inference but it can be used as
knowledge bases for inference engine.
(b)Inheritable knowledge: - Relational
knowledge is made up of constitute of institute and cross ponding associated
values we extend the base more by allowing inference mechanism for property in
heritance is used. In property inheritance of a class.
(c)Inferential knowledge: - In
inferential knowledge logic knowledge is represented as formal for example all
dogs have tell an in formal logic it is return as
Advantage
-
A set of strict rule
-
Can be used to derive
-
Make
-
Popular in AI system
(d) Procedural knowledge: -It
is also called operational knowledge which specifies what to do when. In this
control information is necessary to use the knowledge in embedded in the
knowledge base itself
Unit 4
Inference and Reasoning
State Space Representation Technique: - A
set of all possible states for a give problem is known as state space of the
problem. For example let us consider us consider an 8 tiles puzzle game. The
puzzle consist of a squire frame contenting at tiles and an empty slot. The
tiles are number from 1 to 8. It is possible to move the tiles in the squire field
by moving a tile in to the empty slot. The objective is to get the squire in a
numerical order
Rules: - The
operator for this problems are
Up: - If the heal is not
touching the top frame move it up.
Down: - If
the heal is not touching the bottom frame move it down.
Left: - If
the heal is not touching the left frame move it left.
Right: - If
the heal is not touching the Right frame move it right.
Figure
The state space is a directed
graph with all the state has nodes. A node is set to be existed if it is
possible to up tent it form the initial state by application of a set of
operators. A small fragment of state space for the 8 tile puzzle game as soon
above.
State space representation are
highly perinatal in AI because they provide all possible states operations and
the goal. If the entire state space representation for a problem it’s given it
is possible trace the part from the initial state to the goal state and
identifies the sequence of operators. The major disadvantage of this method is
that it is not possible to visualize all states for a given problem. More ever,
the resources of the computer system are limited to handle huge state space
representation.
Heuristic Search
Breath
first searching is a uniforms search because they do not have any domain
specific knowledge. Heuristics are approximations use to minimize the searching
process. The process of searching can be drastically reduced by the use of
heuristic. Generally two categories of problems are heuristic
-
Problem for which no exact algorithms are known and one needs to find an
approximation and satisfying solution
-
Problem for which exact solution is known but computationally in fusible.
The heuristic which are needed
for serving problems are generally represented as a heuristic function which
maps the problem state in to numbers. This numbers are then approximately used
to guide search. The following algorithm make use a drastic evaluation function
- Hill Climbing Search: - This
algorithm is also called discrete optimization algorithm which uses a simple
heuristic function to calculate the amount of distance the node is from the
goal. In fact there is no different between hill climbing search and deft
search except that the children of the node that has been expended are shorted
by remaining distant
Algorithm
- Put the initial list on
start
-
If start = empty or start = goal terminate search
-
Remove the first node from the start called this node A
-
If A = goal terminate search with success
-
If node has a successor generate all of them. Find out how far they are from
the goal node sort they by remaining distance from the goal and at them to the
- Best First Search: - This
is also heuristic search the heuristic function used here are called evaluation
function each and indicates how far the node is from the goal node. Goal node
have an evaluation function value of O (Zero)
It is explained using a search
give above. First the start node is expended. It has three children A, B and C
with evaluation function 3, 6 and 5 respectively. These values approximately
indicate how far they are from the goal node. The child with minimum value ‘A’
is chosen. The children’s of ‘A’ are generated. They are ‘D’ and ‘E’ with evaluation
function 9 and 8 with evaluation at. The search process has how four node to
search that is the node ‘D’ with evaluation function 9, ‘E’ with 8, ‘B’ with 6
and ‘C’ with 5 where ‘C’ has got the minimum value which is expanded to give
node ‘H’ which value is 7. At this point the node available for search are (D:
9), (E: 6) (H: 7)
Algorithm
-
Put the initial node on a list START
-
If START empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successes generate all of them find out how far they are
from the goal node. Short all the child generated so far by the remaining
distance from the goal
-
Replace start with START
-
Go to step 2
- A* Search (Aversa Search): - In
best first search we brought in a heuristic value called evaluation function
value. It is a value that estimates how far a particular estimate node is from
the goal node. A part from the evaluation function value one can also bring
that is cost function. Cost function indicates how much resources take time
energy money etc. has been spent in reading a particular node from the start.
If it is possible for one to obtain the evaluation values and cost function
values the A* algorithm can be used.
Algorithm
-
Put the initial node unless START
-
If START = empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successor generate all of them. Estimate the fitness
number (The sum of evaluation function and cost along the reading to that state
is called fitness number) of the successes by totaling the evaluation function
values and cost function value. Short the list by fitness number
-
Need the new list as START 1
-
Replace start with START 1
-
Go to step 2
AO* Search
Game Playing in AI: - There
are two major components in game playing they are
i) Plausible Move Generator: - If
we are to employee a simple move generator then it might not be possible to
examine all the states. Has it is essential that only very selected moves or
pats the examine for this purpose only one has a flexible move generator that
expends are generates only selected moves
ii) Static Evaluation Function
Generator: - This
is the most important components of the game playing program. Based on
heuristic this generates the static evaluation function value for each and
every move that is being made. The study evaluation function gives a snapshot
of a particular move. More the static evaluation function value more in the possibility
for victory. The basic method available for game playing are
- Min – Max Strategy: - Min
– max strategy is a simple strategy for two person gene playing. Here players
are called maximizer and minimizer both are opponent to each other. Maximizer
and minimizer fights it out to see that the opponent get minimum benefit and
they get the maximum benefit. The play sable move generator generate necessary
for the farther evaluation and the static evaluation function ranks each of the
position
Figure
Let AB the initial state of the
game, the plausible move generator generates children’s for that move and the
static evaluation function generate assign the value given along with each of
the state. It is assume that that the static evaluation function generators
returns a value from – 20 to +20 where a value of +20 indicates a win for
maximizer and a value of -20 indicates a wine for minimizer makes first move
the maximizer always tries to go the position where the static evaluation
function value is maximizer positive value.
The maximizer being the player
to make the first move will to node D because static evaluation function value
of that maximum node. If the minimizer has to move he will go node be because
the static evaluation function value for that node is minimum
Figure
Fig:
- game tree explained by two level their association static evaluation function
value but a game playing strategy never stops with one level but loops a head
that is move a couple of levels down ward to those the optimal movies
Let’s examines this with the
help of above fig: Let’s assume that it is the maximizer who will to play first
floated by minimizer. Before the maximizer move to N, O, P he will have to
thing which move would be highly beneficial to him. It maximizer move to N next
will be minimizer term. The minimizer always this to other and he will move to
are (static evaluation function value = -6) this value is backed off to N.
If M move to O, then the minimizer
will move to V, which is the minimum of +4, +7 and 0 so, the value of 0 is
backed up as 0. Similarly the value of P will backed of -3.
The maximizer will know have to
choose between M, N, O, and P with the value of -6, 0 and -3. Being a maximizer
he will choose node 0 because if provides the maximize value corresponding to
other
- Min – Max Strategy with alphabet cut –
offs: -
Figure:
-
This is the modified version of
min max strategy algorithm where two threshold value are maintain for features
expansion. One threshold value is called alpha, which is lower bound on the
value the maximizer can be originated and other is beta (P) which represent the
upper bound of the value the minimizer can be assigned.
In this figure the maximizer has
to play first floated by the minimizer as done in min – max strategy. The
maximizer assign A value of 6 at Q (minimum at the values sand t). This values
is backed up P so the maximizer as assured of A value of 6 when he move to Q.
Now let see what happened at R. The value at V is -2 and U is unknown. Since,
the move is minimizing 1 by moving to R, P can get only A value of -2 or less
that is unacceptable for P because by moving to Q he is assured of value up 6 hence
he will never tries move other than children of R
Role of Alpha (α)
Figure: -
For P the maximizer A value of 6
is assured by moving a node Q. this value P is compared with that of value at
R, P be the maximizer could flow any path which value is greater than 6. Hence,
this value of 6 being the least at a maximizing move and set as value of α.
This value of alpha is now used as reference point. Any node which value is
greater than alpha is acceptable and all the node which values are less than
alpha is rejected.
Role of Beta (β)
Figure: -
In this figure is the minimizer
and the path for extension are chosen from values at the leaf node. Since 5 and
T are maximizer the maximum value of their children are back up as static
evaluation function value. Node Q being minimizer always moves to 5 rather than
T. the value at 5 (6) is not we used by Q as a reference point. The value is
called β is acceptable and values more than β are seldom.
Bayesian Networks
-
Bayesian networks also known as Bayes Nets, Belief Nets cause nets and
probability nets, are a space efficient data structure for encoding all of the
information in the full joint probability distribution for the set of random
variables defining a domain
-
Represents all of the direct causal relationships between variables
-
In punitively to construct a Bayesian net for a given set of variables draw are
from cause variables to immediate effects.
-
Space efficient because it exploits the fact that in many real world problem
domains the dependencies between variables are generally local, so there are a
lot of conditionally independent variables
-
Captures both qualitative and quantitative relationships between variables
-
Can be used to reason: -
i)
Forward (top – down) from causes to effects predictive reasoning (aka causal
reasoning)
ii)
Backward (bottom – up) from effects to causes diagnostic reasoning
-
Formally a Bayesian Net is a directed a cyclic graph (DAG) where is a node for
each random variable and a directed are from A to B whenever A is a direct
causal influence
-
Each node A in a net is conditionally independent of any subset of nodes that
are not descendant of a given the parents of A.
Case based Reasoning: - In
case based reasoning the cases are stored and accessed to solve a new problem.
To get a prediction for a new example, these cases that are similar or close to
the new example this is at one extreme of the learning problem where unlike
decision trees and neural networks relatively little work must be done offline
and virtually all of the work is performed at query time.
Case based reasoning can be used
for classification and regression. It is also applicable when the cases are
complicated, such as in legal cases where the cases are complex legal rulings
and in planning, where the cases are previous solutions to complex problems
If the cases are simple one
algorithm that works well is to use the k – nearest neighbors for some given
number K. given a new example the K training examples that have the input
features closest to that example are used to predict the forget value for the
new example.
The prediction can be the mode
average or some interpolation between the predication of these k. training
examples perhaps weighting closer examples more than distant examples.
For this method to work a
distance metric is required that measures the closeness of two examples. First
define a metric for the domain of each feature in which the values of the
features are converted to a numerical scale that can be used to compare values.
Unit 5
Machine Learning
Learning: - The
process of knowledge as equation is called learning. There are various types of
learning.
- Rote Learning (Learning by
Memorizations): - Knowledge a equation itself includes many
different activities. Simple storing of computing information or rote learning
is the most basic learning activities may computer programs examples database
systems can be used to learn in this sense slough most people could not called
such simple storage as learning however many IT programs rote learning
techniques. When a computer stored a paces of data it is performing a rote
learning such learning are used full for improving the performance of the
systems.
- Learning by Analogy
a) Transformational Analogy
Suppose
we are asked to prove theorem in plane geometry we might look for a previous
theorem that is very similar and copies its proof, making substitution when
necessary. The idea is to transform a solutions to a previous problem into a
solutions for the current problem such learning is called learning by
transformation analogy.
The example for transformational
analogy is five below
Figure:
-
b) Derivational Analogy
Figure:
-
Transformation analogy if does
not look at how the old problem was solved it look at the final solution after
the twist and terms in solving an old problem are relevant to solving a new
problem. The detail history of problem solving is called its derivation
analogical reasoning that tables these histories in to account is called
derivational analogy.
Explanation Based Learning (EBL): - An
explanation based learning system accepts and example (i.e. training example)
an explains what it learns from the example. The EBL system takes only the
relevant aspects of the training. These explanations is translated in to
particular form that a problem solving program can understand so that it can
used to solve other problem
We can think EBL program as
specifying the following input.
-
A training example: - what the training program size in the world.
-
A goal concept: - A high level description of which the problem is supposed to
known
-
A operationally (
): - A description of which concept are useable
-
A domain theory: - A set of groups that gives the relationship between the
activities between domains
Inductive Bias Learning: - A
major problem in machine learning is that of inductive bias how to choose a
learners hypothesis space so that it is large enough to contain a solution to
the problem being learnt yet small enough to ensure reliable generalization
from reasonably sized training sets. Typically such bias is supplied by hand
through the skill and insights of experts. In this paper a model for
automatically learning bias is investigated. The central assumption of the
model is that the learner is embedded within an environment of related learning
tasks.
Within such an environment the
learner can sample from multiple tasks and hence it can search for a hypothec
is space that contains good solutions to many of the contains on the set of all
hypothesis spaces available to the learners we show that a hypothesis space
that performs well on a sufficiently large number of training tasks novel task
in the same environment. Explicit bounds are also derived demonstrating that
learning multiple tasks can potentially give much better generalization than
learning a single task.
Genetic Algorithms: - This
is an introduction to genetic algorithm methods for optimization. The
continuing price/performance improvements of computational systems has made
them attractive for some types of optimization. In particular genetic
algorithms work very well on mixed. Combinational problems. But they tend to be
computationally expensive. To use a genetic algorithm you must represent a
solution to your problem as a genome. This presentation outlines some of the
basics of genetic algorithms. The three most important aspects of using genetic
algorithms are
-
Definition of the objective function
-
Definition and implementation of the genetic representation and
-
Definition and implementation of the genetic operators
Once these three have been
defined the generic algorithm should work fairly well. Beyond that you can try
many different variations to improve performance find multiple optima or
parallelize the algorithms.
Application of AI
Export System: - Export
system are knowledge intensive programs that solve problem in a domain that
require considerable amount of technical information the Brattice computer
society community of the specialist prove on export system as formed the
following generation
-
The embodiment within a computer of a knowledge based component from on export
skill in such a form that the machine can offers that intelligence take
intelligence design about of the specification.
A desirable additional characteristics
which may regard fundamental each the capability of the system on demand to
justified its own line of reasoning in a manner directly to the enquire
Characteristics Expert System (CES)
Following
are the different characteristics expert system
-
They should solve difficult problem in a domain as good as or better than on
expert
-
They should process vast quantities of domain specific knowledge in the detail
-
These system promote the use of heuristic search process. It must be cleared
that brought search techniques are in practical and to managed the problem
heuristic search procedure process the management
-
They explain why they question and justify their confusion. Explanation
facilities enhance treatability system in the mind of human
-
They accept advice modify update and expand
-
They communicate with the users in their own natural language
-
They provides extensive facility part simply processing greater than numeric
processing
Goal in Problem Solving
Introduction: - "Developing
computers programs to solve complex problems by the application of processes
that are analogous to human resourcing process"
AI is the ability of a program
to perform the same kinds of functions that characterize human thoughts which
includes.
i) Systems
that thinks like human
ii) Systems
that thinks acts like human
iii) Systems
that thinks think rationally
iv) Systems
that thinks acts rationally
i) Systems that thinks like humans: - This
requires getting inside of the human mind to see how it works and then
comparing our computer programs to this. This is what cognitive science afferents
to do. An others way to do this is to observe a human problems solving and rogue
that one's programs go about problem solving in similar way.
ii) Systems that act like human: - To
be considered intelligent a program must be able to act sufficiently like a
human to fool an interrogator. The machine and the human are isolated from the
person carrying out the test and messages are exchanged via a keyboard and
screen. If the person cannot distinguish between the computer and the human
being then the computer must be intelligent.
iii) System that think rationally: - For
example all computers use energy. Using energy always generates heat. Therefore
all computers generate heat. This initiates the field of logic. Formal logic
was developed in the lot nineteen century. This was the first step forwards
enabling computer programs to reason logically.
iv) System that act rationally: - Acting
rationally means acting so as to achieve one's goals given one's beliefs. An
agent is just something that perceives and acts. In the logical approach to AI
the emphasis is on correct inferences.
Function of AI
- Philosophy: - Logic methods of
reasoning mind as physical system foundations of Learning, Language, and
Rationality.
- Mathematics: - Formal representation
and proof algorithm, computation, decidability, tractability, probability.
Philosophers staked out most of the important ideas of AI but to move to a
formal science requires a level of mathematics formulism in three main areas
computation logic and probability.
- Economics: - Utility decision theory
- Neap Science: - Physical substrate
for mental activity
- Psychology: - Phenomena of perception
and motor control, experimental techniques. The principle characteristic of
cognitive. Psychology is the brain processes and process information.
- Computer Engineering: - Building fast
computers
- Control Theory: - Design systems that
maximize an objective function over time
- Linguistics: - Knowledge
representation grammar having a theory of how human successfully process
natural language is an AI complete problem if we could solve this problem then
we would have created a model of intelligence.
Application area of an AI: - Today's AI
systems have been able to active limited success in some of these tasks.
- In computer
vision the systems are capable of face recognition
- In Robotics
we have been able to make vehicles that are mostly automats.
- In natural
language processing we have systems that are capable of simple machine
translation
- Today's
Expert systems can carry out medical diagnosis in a narrow domain
- Speech
understanding systems are capable of recognizing several thousand words
continuous speech
- Planning
and scheduling systems had been employed in scheduling experiments with the
Hubble Telescope.
- The
Learning systems are capable of doing text categorization into about a 1000
topics
- In games AI
systems can play at the Grand Master level in chess (World Champion) checkers
etc.
What can AI system NOT do yet?
- Understand
natural language robustly (e.g. read and understand articles in a newspaper)
- Surf the
web
- Interpret
an arbitrary visual science
- Learn a
natural language
- Construct
plans in dynamic real time domains
- Exhibit
true autonomy and intelligence
Goal Schemas: - To build a system to
solve a particular problem we need to do four things.
- Define the
problem precisely. This definition must include precise specifications of what
the initial situations will be as well as what final situations constitute
acceptable solutions to the problem.
- Analyze the
problem. A few very important features can have an immense impact on the
appropriateness of various possible techniques for solving the problem
- Isolate and
represent the task knowledge that is necessary to solve the problem.
- Choose the
best problem solving techniques and apply them to the particular problem
i) Search Problem: - It is
characterized by an initial state and a goal state description. The guesses are
called the operators where a single operator transforms a state into another
state which is expected to be closer to a goal state. Here the objective may be
to find a goal state or to find a sequence of operators to a goal state.
Additionally the problem may require finding just any solution or an optimum
solution.
ii) Planning: - The purpose of planning
is to find a sequence of actions that achieves a given goal when performed
starting in a given state. In other words given a set of operator instances
(defining the possible primitive actions by the agent) an initial state
description and a goal state description or predicate the planning agent
computers a plan.
Simple Planning Agent: - The problem – solving agents are able to
plan a head to consider the consequences of sequences of actions before acting.
And a knowledge – based agents can
select actions based on explicit, logical representations of the current state
and the effects of actions
Problem
Solving Agents + Knowledge – based Agents = Planning Agents
Linear Planning: - Basic idea work and
one goal until completely solved before moving on to the next goal planning
algorithm maintains goal stack
i) Implications
- No inter
leaving of goal achievement
- Efficient
search if goals do not interact
ii) Advantages
- Reduced
search space since goals are solved one at a time
-
Advantageous if goals are (mainly) independent
- Linear
planning is sound
Iii) Disadvantages
- Linear
planning may produce sub optional solutions
- Linear
planning is incomplete
Concept of non – linear planning
Use goal set instead of goal
stack. Include in the search space all possible sub goal ordering. Handles goal
interactions by interleaving.
Advantages
- Non –
linear planning is sound
- Non –
linear planning is complete
- Non –
linear planning may be optimal with respect to plan length (depending on search
strategy employed)
Disadvantage
- Larger
search space since all possible goal orderings may have to be considered
- Somewhat
more complex algorithm more bookkeeping
Means – Ends Analysis: - The means –
ends analysis concentrates around the detection of differences between the
current state and the goal state. Once such difference is isolated an operator
that can reduce the difference must be found. However perhaps that operator
cannot be applied to the current state. Hence, we setup a sub – problem of
getting to a state in which it can be applied. The kind of backward chaining in
which the operators are selected and then sub goals are setup to establish the
preconditions of the operators is known as operator sub – goal.
Just like the other problem
solving techniques, means – ends analysis relies on a set of rules that can
transform one problem state into another. However these rules usually are not
represented with complete state descriptions on each side. Instead, they are
represented as left side, which describes the conditions that must be met for
the rule to be applicable and a right side, which describes those aspects of
the problem state that will be changed by the application of rule. A separate
data structure called a difference table indexes the rules by the differences
that they can be used to reduce.
Algorithm: Means – Ends Analysis
- Compare
CURRENT to GOAL. If there are no differences between them, then return.
- Otherwise,
select the most important difference are reduce it by doing the following until
success or failure is signaled
a) Select a
new operator O, which is applicable to the current difference. If there are no
such operators then signal failure.
b) Apply O to
CURRENT. Generate descriptions of two states, O – START a state in which O's
preconditions are satisfied and O – RESULT, the state that would result if O
were applied in O – START
Production Rules Systems: - Since
search is a very important process in the solution of hard problems for which
no more direct techniques are available, it is useful to structure AI programs
in a way that enables describing and performing the search process. Production
systems provide such structures. A production systems consists of:
- A set of
rules each consisting of a left side that determines the applicability of the
rule and a right side that describes the operation to be performed if the rule
is applied.
- One or more
knowledge or databases that contain whatever information is appropriate for the
particular task.
- A control
strategy that specifies the order in which the rules way of resolving the
conflicts that arise when several rules match at once.
i) Forward Chaining Systems: - In a
forward chaining system the facts in the system are represented in a working
memory which is continually updated. Rules in the system represent possible
actions to take when specified conditions hold on items in the working memory
they are sometimes called condition – action rules. The conditions are usually
patterns that must match items in the working memory while the actions usually
involve adding or deleting items from the working memory.
The interpreter controls the
application of the rules, given the working memory, thus controlling the
system's activity. It is based on a cycle of activity sometimes known as a
recognize act cycle. The system first checks to find all the rules whose
conditions hold, given the current state of working memory. It then selects one
and performs the actions in the action part of the rule. The actions will
result in a new working memory and the cycle begins again. This cycle will be
repeated until either no rules fine or some specified goal state is satisfied.
ii) Backward Chaining Systems: - So far
we have looked at how rule based systems can be used to draw new conclusions
from existing data adding these conclusions to a working memory. This approach
is most use full when you know all the initial facts, but don't have much idea
what the conclusion might be.
If we do know what the
conclusion might be, or have some specific hypothesis to test forward chaining
systems may be inefficient. We could keep on forward chaining until no more
rules apply or you have added your hypothesis to the working memory. But in the
process the system is likely to do a lot of irrelevant work adding
uninteresting conclusions to working memory.
iii) My CIN Style Probability and its
Application: - In artificial intelligence, My CIN was an early expert
system designed to identify bacteria causing severe in factions, such as
bacteremia and meningitis, and to recommend antibiotics, with the amount
adjusted for patient's body weight the name derived from the antibiotics
themselves, as many antibiotics have the suffix "MYCIN". The MYCIN
system was also used for the diagnosis of blood clotting diseases.
MYCIN was developed over five or
six years in the early 1970s at Stanford University in Lisp by Edward short
life. MYCIN was never actually used in practice but research indicated that it
proposed an acceptable therapy in about 69% of cases, which was better than the
performance of infectious disease experts who were judged using the same
criteria. MYCIN operated using a fairly simple inference engine, and a
knowledge base rules. It would query the physician running the program via a
long series of simple Yes/No or textual question. At the end it provided a list
of possible culprit bacteria ranked from high to low based on the probability
of each diagnosis, its confidence in each diagnosis probability, the reasoning
behind each diagnosis and its recommended course of drug treatment.
Practical use/Application: - MYCIN was
never actually used in practice. This wasn't because of any weakness in its
performance. As mentioned in tests it output formed members of the Stanford
medical school faculty. Some observers raised ethical and legal issues related
to the use of computers in medicine if a program gives the wrong diagnosis or
recommends the wrong therapy, who should be held responsible?
Unit 2 Intelligence
Introduction of Intelligence: - Artificial
intelligence is concerned with the design of intelligence in and artificial
device. The turn was invented by MC Cathy in 1956.
Artificial intelligence is about
designing system that are as intelligent as human. This view involves trying to
understand human through and an effort to build machines that emulate the human
though process. This view is the cognitive science approach to AI.
Common Sense Reasoning: - Common sense
is ability to analyze the situation best on it context, using millions of
integrated pieces of common knowledge depends on being able to do common sense resining
central part of intelligent behavior.
Example every know that drawing
a glass of water the glass will break and water will spill. However this
information is not obtained by formula or equation. Common sense knowledge
means what everyone knows. Example: -
- Every
person is younger then the person's mother
- People
don't like being repeatedly interrupted
- If you hold
a knife by its blade then the blade may cut you.
- People
generally sleep at right
Agents: - An agent is anything that can
be viewed as perceiving its environment through sensors and acting upon that
environment through actuators
- Human
agent; eyes, and other organs for sensors; hands, legs, mouth and other body
parts for actuators
- Robotic
agent; cameras and infrared range finders for sensors; various motors for
actuators agents and environments
Figure: -
Personality of Agent
Environment Type
- Fully
observable (Vs. partially observable): An agents sensors give it access to the
complete state of the environment at each point in time
-
Deterministic (Vs. stochastic): The next state of the environment is completely
determined by the current state and the action executed by the agent.
- Episodic (Vs.
sequential): The gent's experience is divided into atomic "episodes",
and the choice of action in each episodes depends only on the episode itself
- Static (Vs.
dynamic): The environment in unchanged while an agent is deliberating. (The
environment is semi dynamic if the environment itself does not change with the
passage of time but the agent's performance score does)
- Discrete (Vs.
continuous): A limited number of distinct clearly defined percepts and actions.
Agent Types
Four basic types in order of
increasing generality
- Simple
reflex agents
- Model based
reflex agents
- Goal based
agents
- Utility
based agents
- Simple Reflex Agents: - The agent
select an action best on the current precept ignoring the rest of the precept
history
Figure: -
Simple Reflex Agent
- Model Based Reflex Agent: - The agent
decides its actions best on of predefined set of condition action rules. For
e.g.: - a telephone operator answering machine
Figure: -
Model based reflex agent
- Goal based Agent: - The agent decides
its action best on a known a goal. For e.g.: - a GPS system finding a path to
certain destination
Figure: -
Goal Based Agent
Unit 3
Knowledge Representation
Knowledge Representation and Reasoning: - Intelligent
should have capacity for
- Receiving: - That is representing its
understanding of the world
- Knowledge Representation: - That is
representing its understanding of the world
- Reasoning: - That is inferring the
implications of what it knows and of the choices ithas.
- Acting: - That is choosing what it
want to do and carry it out.
Representation of knowledge and
the reasoning process are central to the entire field of artificial intelligent.
The primary component of a knowledge best agent is its knowledge base. A
knowledge best is a set of sentences. Each sentence is expressed in a language.
Sentences represent some assertion about the world. There must be mechanisms to
derive new sentences from old sentences. This process is known as inference or
reasoning. Inference must obey primary requirement that the new sentences
should follow logically from the previous one.
Approaches to knowledge Representation: - A
good system for the representation knowledge in a particular dement should
possess the following properties
-Representational Adequacy: - The
ability to represent all of the kinds of knowledge that are needed in that
domain.
-Inferential Adequacy: - The ability to
manipulate the representation structures in such a way as to derive new
structure cross ponding to new knowledge inferred from old.
- Inferential Efficiency: - The ability
to incorporate in to the knowledge structure additional information that can be
used to focus the attention of the inference mechanism in the most promising
direction.
- Inquisitional Efficiency: - The
ability to acquire new information easily. The simplest case involve direct
instruction of new knowledge into the database.
Logic: - Logic is the primary vehicle
for representing and resuming about knowledge. The advantage of using formal
logic as a language of AI is that it is price and deferent. These allows
program to be written which are declarative. This however leads to seven
limitation. Clearly a large person of the reasoning carried out by human depended
on handling knowledge that is on certain. Logic cannot represent this uncertainty
well. Similarly natural language resurging require inferring hidden state like
the intention of the speaker.
A logic consist of two parts, a
language and method of measuring. The logical language intern as two aspects,
syntax and semantics. They are
- Syntax: - The atomic symbols of the
logical language and the rules for constructing well formed a non-atomic expression
of the logic. Syntax specifies the symbols in the language and how they can be
combined to form sentences.
- Semantics: - The meanings of the
symbol of the logic, and rules there for demining the meaning of non – atomic
expression of the logic. It specifics what facts in the world a syntax refers
to. A fact is a claim about the world and may be true or false some popular
logics are propositional logic, first order predicate logic high order
predicate logic and fuzzy logic.
- Propositional Logic: - In PropositionalLogical
(PL) and user defines a set of propositional symbols like P&Q. User defines
the semantics for each of these symbol. For e.g.: -
P means
"It is hot"
Q means
"It is humid"
R means
"It is raining"
- A symbol
- If S is a
sentence than "~" is a sentence, where "~" is the not
logical operator?
- If sand PR
sentences then (S˅T), (S˄T) (S→T) and (S<→T) are also sentences for e.g.: -
(P˄Q)→R
It is hot and
humid then it is raining
Q→P
If it is
humid then it is hot R It is raining
- Given the
truth value of all of the constituent symbol in a sentence that sentence can be
content the value true or fails. This is called an inter pretention of the
sentence
- A model is
an inter pretention of a set of sentences such that each sentence is true. A model
is just a formal mathematical structure that stands in for the world.
- A valid
sentence (also called as tautology) is a sentence that is true under all inter
pretention. Hence no matter what the world is actually like or what the
semantic is the sentence is true.
- An
inconstant sentence (called on satisfy able or a contradiction) is a sentence
that is false under all inter reaction. Hence the world is never like that it
describes
First Order Logic
Syntax: - Syntax are symbol users the
symbols or alphabet be aware that there are all sorts of solidly different ways
to define first order logic
a) Alphabet: - There are different
types of symbols they are
- Logical Symbol: - These are symbols
that have a standard meaning like AND, OR, NOT, ALL, EXIT, IMPLIES if FALSE,
TRUE etc.
- Non Logical Symbol: - They are one
dimensional array two dimensional array N dimensional array functions (1 ary 2
array …….. n …….ary) variables etc.
b) Terms: - A term is either and
individual constant or a variable are any function applied to a terms.
c) Atomic Formula: - An atomic formulae
is either false are an n dimensional array predicate applied to ‘n’ terms
d) Literals: - A literals is either an
atomic formula (Positive literal) or the negation of an atomic formula (a negative
literals) a ground literal is avariable free literal
e) Clauses: - Clause is a disjunction
of literals a ground cause is a variable free clause a Horn clause is a clause
with at most one +ve literal a definite is a hornclause with exactly one +ve literal
Logical Agents
In logical agents we design
agents that can form representation of the world, use a process of in France to
derive new representation about the world and use these new representations to
reduce what to do?
- Knowledge
base agent the central component of knowledge base agent is its knowledge base.
A knowledge base is a set of sentences. Each sentence is expressed in a
language called a knowledge presentation language and represents some accretion
about the world.
|
Function: - KB – AGENT (percepts) return
an action
Static: - KB, a knowledge base t, a
counter initially 0.
TELL (KB, MAKE – PERCEPT – SENTENCE
(Percept t)
Action ← ASK (KB, MAKE – ACTION – QUERY (
TELL (KB MAKE – ACTION – SENTENCE (action
t))
T = ++1
Return action
|
Fig: - A
generic knowledge base agent
Figure shows the outline of a
knowledge best agent program. Like all our agents it text a percept as I/P and
returns an action. The agent Montana a Knowledge Base (KB) which may initially
content some background knowledge base what it perceives, second, it asks the
knowledge base what action should perform. In the process of answering this
query, extensive reasoning may be done about the current state of the world,
about the outcomes of possible action sequences and so on. Third, the agent
recorders its choice with tell and executed the action.
Formal Logic Connectives Syntax, Semantics
Syntax
- Rules for
constructing legal sentences in the logic
- Which
symbol we can use
- How we are
allowed to combine symbols
-
Propositions
- Connective
and, or, not,
implies, if (
)
Semantics
-
How we interpret (read) sentences in the logic
-
Assign a meaning to each sentences
-
Use true the table to work out the truth of statement
Semantic Network
Figure:
The idea behind the semantic
network is that knowledge is often best understood as a set of concept that are
related to one another. The meaning of a concept is defined by its relationship
to another concept. A semantic network consist of a set of node that are
connected by labeled arcs. The nodes represent concepts and the arcs represents
relations between concepts.
Common Sematic Relations
INSTANCE
X
is an INSTANCE of Y, if X is a specific example of the general concept Y.
ISA
X
ISA Y, if X is a subset of the more general concept Y e.g.: - sparrow ISA bird.
Haspart
X
has part Y, if the concept Y is a part of the concept X. e.g.: sparrow has part
tail.
- Semantic Tree
A
semantic tree is a representation that is a semantic net I which shorten links
are called branches. Each branch connects two node. The head node is called
parent node and tail node is called child node. One node has no parent; it is
called the root node. Other nodes have exactly one parents. Some nodes have no
children; they are leaf node when two nodes are connected to each other by a
chain of two or more branches one is set to be the ancestor; the other is set
to be the descendent.
- Inheritance
Inheritance
is a key concept in semantic n/w and can be represented naturally by following
ISA link. In general, if concept X has property P, then all concepts that are a
subset of X should also have property P. In practice, inherited properties are
usually treated has default values. If a node has direct link that contradicts
inherited property, then the default is over rider.
- Multiple Inheritance
Ø
Multiple inheritance allows an object to
inherit properties from multiple concept
Ø
Multiple inheritance can sometime allow
an object to inherit conflicting properties.
Ø
Conflicts are potentiallyunatonable so conflict
resolution strategies are needed
Predicate Calculus (Predicate Logic)
In
mathematical logic, predicate logic is generic turn for symbolic formal systems
like first order logic, second order logic or many sorted logic. This formal
system is distinguished from other system in that its formula content variables
which can be quantified. Two common quantifies are existential ᴲ (“There
exist”) and universal U (“for all”) quantifies. Predicate calculus symbols may
represent either Constance variable, function, predicate. Constance name
specific objects are properties in the domain of this coursed. Thus tree tall
and blue are examples of well form constant symbols. The constant true and false
are included. Functions denote mapping of one or more elements in a set called
the domain of the function. In to a unique element of another set. Elements of
the domain and range are objects in the old of discourse. Every function
symbols have an associated entity indicating the number of element in the
domain mapped on to each element of range.
Predicate
logic uses three additional notation they are
i) Predicate
A predicate is a relation that
binds two items together for example: Krishna like apple. Know we can write
like (Krishna, like apple) where like is predicate that links two items Krishna
and Apple.
Thus predicate can be
generalized as like X, Y where X and Y are the variable it means X likes Y
ii) Terms (Literals)
Terms are arguments in a
predicate logic example Ravi’s father is Ranis father that is father (father
iii) Quantifiers
A quantifiers is a symbol that
permits to declare or identify the range or scope of variables in a logical
expression. There are two types of quantifiers they are
-
Universal quantifiers
-
Existential quantifiers
- Universal Quantifiers
If
A is a variable the ¥a is read as
i)
for all A
ii)
for each A
iii)
for every
- Existential Quantifiers
If B is a variable then ϶b is
read as
i)
there exist B
ii)
for some B
iii)
for at histone B
Resolution
Robinson
in 1965 introduce the resolution principle which can be directly apply to any
set of clues. The principle is given any two clues A and B, if there is lateral
Bin A and which has complementary term >p in B, delete P from A and B an
construct a new close of the remaining clues. The clues so constructed is
called “resolving of A and B”.
Substitution
Resolution
works on the principle of identifying complementary literals in two clues a
deleting then there by forming a new literal. The process is simple an state
forward where are variables the problem becomes complicated and there is
necessary to make proper substitution.
There
are three major types of substitution
-
Substitution of variable by a constant
-
Substitution of variable by another variable
-
Substitution of variable by function that does not have same variable
Unification
In
prepositional logic it is easy to determine that how literals cannot both be
tree at the same time for example: man (John) &Ʌ man (john) thus
in order to determine contradiction win need a machine procedure that compares
two literals at discourse where their exist a set of substitution that made
them identical there is a state forward recursive procedure called unification
algorithm. The basic idea of unified two literals we fast check if their
initial predicate symbols are the same. If so we can processed otherwise there
is no way to unified regard less of their arguments.Suppose we want to unify an
expressions P(K,Y) & P(K,Z) here the predicate is same so we can unify by
substituting Z by Y.
Frame
Frame
is a collection of attribute slots and associated values that describe some
real word entity. Frames on their own are not particularly help full but frames
systems are powerful way of encoding information to reasoning process. A frame
structure provides facilities for describing objects facts over situation
procedure on what to do when a situation is encounter.
Types of Frames
- Declaration Frame: - A
frame that contains description about an object is called a declarative frame.
The computer center frame describable it a typical example of subscribe frame
- Procedural Frame: - It
is possible to have procedural knowledge represented in a frame. Such frame
which have procedural knowledge embedded in it are called procedurals frames.
The procedural frames as following slots
a) Actor Slots: - It
holds information about who is performing the activity
b) Object Slots: - This
slots as information about the item to perform on
c) Source Slots: - Source
slots holds information from where the action as to end
e) Task Slots: - This
generates the necessary sub slots required to perform the operation
Approach to Knowledge Representation: - A
good system for knowledge representation should passes the following property
- Representation Adequacy: -
The ability to represent all kinds of knowledge that are needed in that domain
- Interracial Adequacy: -
The ability to manipulate the representation structure in such a way as to
derive new structures of new knowledge inference form old.
- Acquisitioned Efficiency: - The
ability to acquire the new information easily. The simplex case involves direct
insertion by a person as new knowledge in to the knowledge base.
- Inferential Efficiency: - The
ability to incorporate into the knowledge structure additional information that
can use to fours the attention of the inference mechanism in most per mistingdirection
Knowledge
Representation Technique
(a) Simple relational knowledge: -
The simple way of storing facts page to use a simple relational method where
each fact about a set of object which set at systematically in columns. This
representation gives little opportunityfor inference but it can be used as
knowledge bases for inference engine.
(b)Inheritable knowledge: - Relational
knowledge is made up of constitute of institute and cross ponding associated
values we extend the base more by allowing inference mechanism for property in
heritance is used. In property inheritance of a class.
(c)Inferential knowledge: - In
inferential knowledge logic knowledge is represented as formal for example all
dogs have tell an in formal logic it is return as
Advantage
-
A set of strict rule
-
Can be used to derive
-
Make
-
Popular in AI system
(d) Procedural knowledge: -It
is also called operational knowledge which specifies what to do when. In this
control information is necessary to use the knowledge in embedded in the
knowledge base itself
Unit 4
Inference and Reasoning
State Space Representation Technique: - A
set of all possible states for a give problem is known as state space of the
problem. For example let us consider us consider an 8 tiles puzzle game. The
puzzle consist of a squire frame contenting at tiles and an empty slot. The
tiles are number from 1 to 8. It is possible to move the tiles in the squire field
by moving a tile in to the empty slot. The objective is to get the squire in a
numerical order
Rules: - The
operator for this problems are
Up: - If the heal is not
touching the top frame move it up.
Down: - If
the heal is not touching the bottom frame move it down.
Left: - If
the heal is not touching the left frame move it left.
Right: - If
the heal is not touching the Right frame move it right.
Figure
The state space is a directed
graph with all the state has nodes. A node is set to be existed if it is
possible to up tent it form the initial state by application of a set of
operators. A small fragment of state space for the 8 tile puzzle game as soon
above.
State space representation are
highly perinatal in AI because they provide all possible states operations and
the goal. If the entire state space representation for a problem it’s given it
is possible trace the part from the initial state to the goal state and
identifies the sequence of operators. The major disadvantage of this method is
that it is not possible to visualize all states for a given problem. More ever,
the resources of the computer system are limited to handle huge state space
representation.
Heuristic Search
Breath
first searching is a uniforms search because they do not have any domain
specific knowledge. Heuristics are approximations use to minimize the searching
process. The process of searching can be drastically reduced by the use of
heuristic. Generally two categories of problems are heuristic
-
Problem for which no exact algorithms are known and one needs to find an
approximation and satisfying solution
-
Problem for which exact solution is known but computationally in fusible.
The heuristic which are needed
for serving problems are generally represented as a heuristic function which
maps the problem state in to numbers. This numbers are then approximately used
to guide search. The following algorithm make use a drastic evaluation function
- Hill Climbing Search: - This
algorithm is also called discrete optimization algorithm which uses a simple
heuristic function to calculate the amount of distance the node is from the
goal. In fact there is no different between hill climbing search and deft
search except that the children of the node that has been expended are shorted
by remaining distant
Algorithm
- Put the initial list on
start
-
If start = empty or start = goal terminate search
-
Remove the first node from the start called this node A
-
If A = goal terminate search with success
-
If node has a successor generate all of them. Find out how far they are from
the goal node sort they by remaining distance from the goal and at them to the
- Best First Search: - This
is also heuristic search the heuristic function used here are called evaluation
function each and indicates how far the node is from the goal node. Goal node
have an evaluation function value of O (Zero)
It is explained using a search
give above. First the start node is expended. It has three children A, B and C
with evaluation function 3, 6 and 5 respectively. These values approximately
indicate how far they are from the goal node. The child with minimum value ‘A’
is chosen. The children’s of ‘A’ are generated. They are ‘D’ and ‘E’ with evaluation
function 9 and 8 with evaluation at. The search process has how four node to
search that is the node ‘D’ with evaluation function 9, ‘E’ with 8, ‘B’ with 6
and ‘C’ with 5 where ‘C’ has got the minimum value which is expanded to give
node ‘H’ which value is 7. At this point the node available for search are (D:
9), (E: 6) (H: 7)
Algorithm
-
Put the initial node on a list START
-
If START empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successes generate all of them find out how far they are
from the goal node. Short all the child generated so far by the remaining
distance from the goal
-
Replace start with START
-
Go to step 2
- A* Search (Aversa Search): - In
best first search we brought in a heuristic value called evaluation function
value. It is a value that estimates how far a particular estimate node is from
the goal node. A part from the evaluation function value one can also bring
that is cost function. Cost function indicates how much resources take time
energy money etc. has been spent in reading a particular node from the start.
If it is possible for one to obtain the evaluation values and cost function
values the A* algorithm can be used.
Algorithm
-
Put the initial node unless START
-
If START = empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successor generate all of them. Estimate the fitness
number (The sum of evaluation function and cost along the reading to that state
is called fitness number) of the successes by totaling the evaluation function
values and cost function value. Short the list by fitness number
-
Need the new list as START 1
-
Replace start with START 1
-
Go to step 2
AO* Search
Game Playing in AI: - There
are two major components in game playing they are
i) Plausible Move Generator: - If
we are to employee a simple move generator then it might not be possible to
examine all the states. Has it is essential that only very selected moves or
pats the examine for this purpose only one has a flexible move generator that
expends are generates only selected moves
ii) Static Evaluation Function
Generator: - This
is the most important components of the game playing program. Based on
heuristic this generates the static evaluation function value for each and
every move that is being made. The study evaluation function gives a snapshot
of a particular move. More the static evaluation function value more in the possibility
for victory. The basic method available for game playing are
- Min – Max Strategy: - Min
– max strategy is a simple strategy for two person gene playing. Here players
are called maximizer and minimizer both are opponent to each other. Maximizer
and minimizer fights it out to see that the opponent get minimum benefit and
they get the maximum benefit. The play sable move generator generate necessary
for the farther evaluation and the static evaluation function ranks each of the
position
Figure
Let AB the initial state of the
game, the plausible move generator generates children’s for that move and the
static evaluation function generate assign the value given along with each of
the state. It is assume that that the static evaluation function generators
returns a value from – 20 to +20 where a value of +20 indicates a win for
maximizer and a value of -20 indicates a wine for minimizer makes first move
the maximizer always tries to go the position where the static evaluation
function value is maximizer positive value.
The maximizer being the player
to make the first move will to node D because static evaluation function value
of that maximum node. If the minimizer has to move he will go node be because
the static evaluation function value for that node is minimum
Figure
Fig:
- game tree explained by two level their association static evaluation function
value but a game playing strategy never stops with one level but loops a head
that is move a couple of levels down ward to those the optimal movies
Let’s examines this with the
help of above fig: Let’s assume that it is the maximizer who will to play first
floated by minimizer. Before the maximizer move to N, O, P he will have to
thing which move would be highly beneficial to him. It maximizer move to N next
will be minimizer term. The minimizer always this to other and he will move to
are (static evaluation function value = -6) this value is backed off to N.
If M move to O, then the minimizer
will move to V, which is the minimum of +4, +7 and 0 so, the value of 0 is
backed up as 0. Similarly the value of P will backed of -3.
The maximizer will know have to
choose between M, N, O, and P with the value of -6, 0 and -3. Being a maximizer
he will choose node 0 because if provides the maximize value corresponding to
other
- Min – Max Strategy with alphabet cut –
offs: -
Figure:
-
This is the modified version of
min max strategy algorithm where two threshold value are maintain for features
expansion. One threshold value is called alpha, which is lower bound on the
value the maximizer can be originated and other is beta (P) which represent the
upper bound of the value the minimizer can be assigned.
In this figure the maximizer has
to play first floated by the minimizer as done in min – max strategy. The
maximizer assign A value of 6 at Q (minimum at the values sand t). This values
is backed up P so the maximizer as assured of A value of 6 when he move to Q.
Now let see what happened at R. The value at V is -2 and U is unknown. Since,
the move is minimizing 1 by moving to R, P can get only A value of -2 or less
that is unacceptable for P because by moving to Q he is assured of value up 6 hence
he will never tries move other than children of R
Role of Alpha (α)
Figure: -
For P the maximizer A value of 6
is assured by moving a node Q. this value P is compared with that of value at
R, P be the maximizer could flow any path which value is greater than 6. Hence,
this value of 6 being the least at a maximizing move and set as value of α.
This value of alpha is now used as reference point. Any node which value is
greater than alpha is acceptable and all the node which values are less than
alpha is rejected.
Role of Beta (β)
Figure: -
In this figure is the minimizer
and the path for extension are chosen from values at the leaf node. Since 5 and
T are maximizer the maximum value of their children are back up as static
evaluation function value. Node Q being minimizer always moves to 5 rather than
T. the value at 5 (6) is not we used by Q as a reference point. The value is
called β is acceptable and values more than β are seldom.
Bayesian Networks
-
Bayesian networks also known as Bayes Nets, Belief Nets cause nets and
probability nets, are a space efficient data structure for encoding all of the
information in the full joint probability distribution for the set of random
variables defining a domain
-
Represents all of the direct causal relationships between variables
-
In punitively to construct a Bayesian net for a given set of variables draw are
from cause variables to immediate effects.
-
Space efficient because it exploits the fact that in many real world problem
domains the dependencies between variables are generally local, so there are a
lot of conditionally independent variables
-
Captures both qualitative and quantitative relationships between variables
-
Can be used to reason: -
i)
Forward (top – down) from causes to effects predictive reasoning (aka causal
reasoning)
ii)
Backward (bottom – up) from effects to causes diagnostic reasoning
-
Formally a Bayesian Net is a directed a cyclic graph (DAG) where is a node for
each random variable and a directed are from A to B whenever A is a direct
causal influence
-
Each node A in a net is conditionally independent of any subset of nodes that
are not descendant of a given the parents of A.
Case based Reasoning: - In
case based reasoning the cases are stored and accessed to solve a new problem.
To get a prediction for a new example, these cases that are similar or close to
the new example this is at one extreme of the learning problem where unlike
decision trees and neural networks relatively little work must be done offline
and virtually all of the work is performed at query time.
Case based reasoning can be used
for classification and regression. It is also applicable when the cases are
complicated, such as in legal cases where the cases are complex legal rulings
and in planning, where the cases are previous solutions to complex problems
If the cases are simple one
algorithm that works well is to use the k – nearest neighbors for some given
number K. given a new example the K training examples that have the input
features closest to that example are used to predict the forget value for the
new example.
The prediction can be the mode
average or some interpolation between the predication of these k. training
examples perhaps weighting closer examples more than distant examples.
For this method to work a
distance metric is required that measures the closeness of two examples. First
define a metric for the domain of each feature in which the values of the
features are converted to a numerical scale that can be used to compare values.
Unit 5
Machine Learning
Learning: - The
process of knowledge as equation is called learning. There are various types of
learning.
- Rote Learning (Learning by
Memorizations): - Knowledge a equation itself includes many
different activities. Simple storing of computing information or rote learning
is the most basic learning activities may computer programs examples database
systems can be used to learn in this sense slough most people could not called
such simple storage as learning however many IT programs rote learning
techniques. When a computer stored a paces of data it is performing a rote
learning such learning are used full for improving the performance of the
systems.
- Learning by Analogy
a) Transformational Analogy
Suppose
we are asked to prove theorem in plane geometry we might look for a previous
theorem that is very similar and copies its proof, making substitution when
necessary. The idea is to transform a solutions to a previous problem into a
solutions for the current problem such learning is called learning by
transformation analogy.
The example for transformational
analogy is five below
Figure:
-
b) Derivational Analogy
Figure:
-
Transformation analogy if does
not look at how the old problem was solved it look at the final solution after
the twist and terms in solving an old problem are relevant to solving a new
problem. The detail history of problem solving is called its derivation
analogical reasoning that tables these histories in to account is called
derivational analogy.
Explanation Based Learning (EBL): - An
explanation based learning system accepts and example (i.e. training example)
an explains what it learns from the example. The EBL system takes only the
relevant aspects of the training. These explanations is translated in to
particular form that a problem solving program can understand so that it can
used to solve other problem
We can think EBL program as
specifying the following input.
-
A training example: - what the training program size in the world.
-
A goal concept: - A high level description of which the problem is supposed to
known
-
A operationally (
): - A description of which concept are useable
-
A domain theory: - A set of groups that gives the relationship between the
activities between domains
Inductive Bias Learning: - A
major problem in machine learning is that of inductive bias how to choose a
learners hypothesis space so that it is large enough to contain a solution to
the problem being learnt yet small enough to ensure reliable generalization
from reasonably sized training sets. Typically such bias is supplied by hand
through the skill and insights of experts. In this paper a model for
automatically learning bias is investigated. The central assumption of the
model is that the learner is embedded within an environment of related learning
tasks.
Within such an environment the
learner can sample from multiple tasks and hence it can search for a hypothec
is space that contains good solutions to many of the contains on the set of all
hypothesis spaces available to the learners we show that a hypothesis space
that performs well on a sufficiently large number of training tasks novel task
in the same environment. Explicit bounds are also derived demonstrating that
learning multiple tasks can potentially give much better generalization than
learning a single task.
Genetic Algorithms: - This
is an introduction to genetic algorithm methods for optimization. The
continuing price/performance improvements of computational systems has made
them attractive for some types of optimization. In particular genetic
algorithms work very well on mixed. Combinational problems. But they tend to be
computationally expensive. To use a genetic algorithm you must represent a
solution to your problem as a genome. This presentation outlines some of the
basics of genetic algorithms. The three most important aspects of using genetic
algorithms are
-
Definition of the objective function
-
Definition and implementation of the genetic representation and
-
Definition and implementation of the genetic operators
Once these three have been
defined the generic algorithm should work fairly well. Beyond that you can try
many different variations to improve performance find multiple optima or
parallelize the algorithms.
Application of AI
Export System: - Export
system are knowledge intensive programs that solve problem in a domain that
require considerable amount of technical information the Brattice computer
society community of the specialist prove on export system as formed the
following generation
-
The embodiment within a computer of a knowledge based component from on export
skill in such a form that the machine can offers that intelligence take
intelligence design about of the specification.
A desirable additional characteristics
which may regard fundamental each the capability of the system on demand to
justified its own line of reasoning in a manner directly to the enquire
Characteristics Expert System (CES)
Following
are the different characteristics expert system
-
They should solve difficult problem in a domain as good as or better than on
expert
-
They should process vast quantities of domain specific knowledge in the detail
-
These system promote the use of heuristic search process. It must be cleared
that brought search techniques are in practical and to managed the problem
heuristic search procedure process the management
-
They explain why they question and justify their confusion. Explanation
facilities enhance treatability system in the mind of human
-
They accept advice modify update and expand
-
They communicate with the users in their own natural language
-
They provides extensive facility part simply processing greater than numeric
processing
Goal in Problem Solving
Introduction: - "Developing
computers programs to solve complex problems by the application of processes
that are analogous to human resourcing process"
AI is the ability of a program
to perform the same kinds of functions that characterize human thoughts which
includes.
i) Systems
that thinks like human
ii) Systems
that thinks acts like human
iii) Systems
that thinks think rationally
iv) Systems
that thinks acts rationally
i) Systems that thinks like humans: - This
requires getting inside of the human mind to see how it works and then
comparing our computer programs to this. This is what cognitive science afferents
to do. An others way to do this is to observe a human problems solving and rogue
that one's programs go about problem solving in similar way.
ii) Systems that act like human: - To
be considered intelligent a program must be able to act sufficiently like a
human to fool an interrogator. The machine and the human are isolated from the
person carrying out the test and messages are exchanged via a keyboard and
screen. If the person cannot distinguish between the computer and the human
being then the computer must be intelligent.
iii) System that think rationally: - For
example all computers use energy. Using energy always generates heat. Therefore
all computers generate heat. This initiates the field of logic. Formal logic
was developed in the lot nineteen century. This was the first step forwards
enabling computer programs to reason logically.
iv) System that act rationally: - Acting
rationally means acting so as to achieve one's goals given one's beliefs. An
agent is just something that perceives and acts. In the logical approach to AI
the emphasis is on correct inferences.
Function of AI
- Philosophy: - Logic methods of
reasoning mind as physical system foundations of Learning, Language, and
Rationality.
- Mathematics: - Formal representation
and proof algorithm, computation, decidability, tractability, probability.
Philosophers staked out most of the important ideas of AI but to move to a
formal science requires a level of mathematics formulism in three main areas
computation logic and probability.
- Economics: - Utility decision theory
- Neap Science: - Physical substrate
for mental activity
- Psychology: - Phenomena of perception
and motor control, experimental techniques. The principle characteristic of
cognitive. Psychology is the brain processes and process information.
- Computer Engineering: - Building fast
computers
- Control Theory: - Design systems that
maximize an objective function over time
- Linguistics: - Knowledge
representation grammar having a theory of how human successfully process
natural language is an AI complete problem if we could solve this problem then
we would have created a model of intelligence.
Application area of an AI: - Today's AI
systems have been able to active limited success in some of these tasks.
- In computer
vision the systems are capable of face recognition
- In Robotics
we have been able to make vehicles that are mostly automats.
- In natural
language processing we have systems that are capable of simple machine
translation
- Today's
Expert systems can carry out medical diagnosis in a narrow domain
- Speech
understanding systems are capable of recognizing several thousand words
continuous speech
- Planning
and scheduling systems had been employed in scheduling experiments with the
Hubble Telescope.
- The
Learning systems are capable of doing text categorization into about a 1000
topics
- In games AI
systems can play at the Grand Master level in chess (World Champion) checkers
etc.
What can AI system NOT do yet?
- Understand
natural language robustly (e.g. read and understand articles in a newspaper)
- Surf the
web
- Interpret
an arbitrary visual science
- Learn a
natural language
- Construct
plans in dynamic real time domains
- Exhibit
true autonomy and intelligence
Goal Schemas: - To build a system to
solve a particular problem we need to do four things.
- Define the
problem precisely. This definition must include precise specifications of what
the initial situations will be as well as what final situations constitute
acceptable solutions to the problem.
- Analyze the
problem. A few very important features can have an immense impact on the
appropriateness of various possible techniques for solving the problem
- Isolate and
represent the task knowledge that is necessary to solve the problem.
- Choose the
best problem solving techniques and apply them to the particular problem
i) Search Problem: - It is
characterized by an initial state and a goal state description. The guesses are
called the operators where a single operator transforms a state into another
state which is expected to be closer to a goal state. Here the objective may be
to find a goal state or to find a sequence of operators to a goal state.
Additionally the problem may require finding just any solution or an optimum
solution.
ii) Planning: - The purpose of planning
is to find a sequence of actions that achieves a given goal when performed
starting in a given state. In other words given a set of operator instances
(defining the possible primitive actions by the agent) an initial state
description and a goal state description or predicate the planning agent
computers a plan.
Simple Planning Agent: - The problem – solving agents are able to
plan a head to consider the consequences of sequences of actions before acting.
And a knowledge – based agents can
select actions based on explicit, logical representations of the current state
and the effects of actions
Problem
Solving Agents + Knowledge – based Agents = Planning Agents
Linear Planning: - Basic idea work and
one goal until completely solved before moving on to the next goal planning
algorithm maintains goal stack
i) Implications
- No inter
leaving of goal achievement
- Efficient
search if goals do not interact
ii) Advantages
- Reduced
search space since goals are solved one at a time
-
Advantageous if goals are (mainly) independent
- Linear
planning is sound
Iii) Disadvantages
- Linear
planning may produce sub optional solutions
- Linear
planning is incomplete
Concept of non – linear planning
Use goal set instead of goal
stack. Include in the search space all possible sub goal ordering. Handles goal
interactions by interleaving.
Advantages
- Non –
linear planning is sound
- Non –
linear planning is complete
- Non –
linear planning may be optimal with respect to plan length (depending on search
strategy employed)
Disadvantage
- Larger
search space since all possible goal orderings may have to be considered
- Somewhat
more complex algorithm more bookkeeping
Means – Ends Analysis: - The means –
ends analysis concentrates around the detection of differences between the
current state and the goal state. Once such difference is isolated an operator
that can reduce the difference must be found. However perhaps that operator
cannot be applied to the current state. Hence, we setup a sub – problem of
getting to a state in which it can be applied. The kind of backward chaining in
which the operators are selected and then sub goals are setup to establish the
preconditions of the operators is known as operator sub – goal.
Just like the other problem
solving techniques, means – ends analysis relies on a set of rules that can
transform one problem state into another. However these rules usually are not
represented with complete state descriptions on each side. Instead, they are
represented as left side, which describes the conditions that must be met for
the rule to be applicable and a right side, which describes those aspects of
the problem state that will be changed by the application of rule. A separate
data structure called a difference table indexes the rules by the differences
that they can be used to reduce.
Algorithm: Means – Ends Analysis
- Compare
CURRENT to GOAL. If there are no differences between them, then return.
- Otherwise,
select the most important difference are reduce it by doing the following until
success or failure is signaled
a) Select a
new operator O, which is applicable to the current difference. If there are no
such operators then signal failure.
b) Apply O to
CURRENT. Generate descriptions of two states, O – START a state in which O's
preconditions are satisfied and O – RESULT, the state that would result if O
were applied in O – START
Production Rules Systems: - Since
search is a very important process in the solution of hard problems for which
no more direct techniques are available, it is useful to structure AI programs
in a way that enables describing and performing the search process. Production
systems provide such structures. A production systems consists of:
- A set of
rules each consisting of a left side that determines the applicability of the
rule and a right side that describes the operation to be performed if the rule
is applied.
- One or more
knowledge or databases that contain whatever information is appropriate for the
particular task.
- A control
strategy that specifies the order in which the rules way of resolving the
conflicts that arise when several rules match at once.
i) Forward Chaining Systems: - In a
forward chaining system the facts in the system are represented in a working
memory which is continually updated. Rules in the system represent possible
actions to take when specified conditions hold on items in the working memory
they are sometimes called condition – action rules. The conditions are usually
patterns that must match items in the working memory while the actions usually
involve adding or deleting items from the working memory.
The interpreter controls the
application of the rules, given the working memory, thus controlling the
system's activity. It is based on a cycle of activity sometimes known as a
recognize act cycle. The system first checks to find all the rules whose
conditions hold, given the current state of working memory. It then selects one
and performs the actions in the action part of the rule. The actions will
result in a new working memory and the cycle begins again. This cycle will be
repeated until either no rules fine or some specified goal state is satisfied.
ii) Backward Chaining Systems: - So far
we have looked at how rule based systems can be used to draw new conclusions
from existing data adding these conclusions to a working memory. This approach
is most use full when you know all the initial facts, but don't have much idea
what the conclusion might be.
If we do know what the
conclusion might be, or have some specific hypothesis to test forward chaining
systems may be inefficient. We could keep on forward chaining until no more
rules apply or you have added your hypothesis to the working memory. But in the
process the system is likely to do a lot of irrelevant work adding
uninteresting conclusions to working memory.
iii) My CIN Style Probability and its
Application: - In artificial intelligence, My CIN was an early expert
system designed to identify bacteria causing severe in factions, such as
bacteremia and meningitis, and to recommend antibiotics, with the amount
adjusted for patient's body weight the name derived from the antibiotics
themselves, as many antibiotics have the suffix "MYCIN". The MYCIN
system was also used for the diagnosis of blood clotting diseases.
MYCIN was developed over five or
six years in the early 1970s at Stanford University in Lisp by Edward short
life. MYCIN was never actually used in practice but research indicated that it
proposed an acceptable therapy in about 69% of cases, which was better than the
performance of infectious disease experts who were judged using the same
criteria. MYCIN operated using a fairly simple inference engine, and a
knowledge base rules. It would query the physician running the program via a
long series of simple Yes/No or textual question. At the end it provided a list
of possible culprit bacteria ranked from high to low based on the probability
of each diagnosis, its confidence in each diagnosis probability, the reasoning
behind each diagnosis and its recommended course of drug treatment.
Practical use/Application: - MYCIN was
never actually used in practice. This wasn't because of any weakness in its
performance. As mentioned in tests it output formed members of the Stanford
medical school faculty. Some observers raised ethical and legal issues related
to the use of computers in medicine if a program gives the wrong diagnosis or
recommends the wrong therapy, who should be held responsible?
Unit 2 Intelligence
Introduction of Intelligence: - Artificial
intelligence is concerned with the design of intelligence in and artificial
device. The turn was invented by MC Cathy in 1956.
Artificial intelligence is about
designing system that are as intelligent as human. This view involves trying to
understand human through and an effort to build machines that emulate the human
though process. This view is the cognitive science approach to AI.
Common Sense Reasoning: - Common sense
is ability to analyze the situation best on it context, using millions of
integrated pieces of common knowledge depends on being able to do common sense resining
central part of intelligent behavior.
Example every know that drawing
a glass of water the glass will break and water will spill. However this
information is not obtained by formula or equation. Common sense knowledge
means what everyone knows. Example: -
- Every
person is younger then the person's mother
- People
don't like being repeatedly interrupted
- If you hold
a knife by its blade then the blade may cut you.
- People
generally sleep at right
Agents: - An agent is anything that can
be viewed as perceiving its environment through sensors and acting upon that
environment through actuators
- Human
agent; eyes, and other organs for sensors; hands, legs, mouth and other body
parts for actuators
- Robotic
agent; cameras and infrared range finders for sensors; various motors for
actuators agents and environments
Figure: -
Personality of Agent
Environment Type
- Fully
observable (Vs. partially observable): An agents sensors give it access to the
complete state of the environment at each point in time
-
Deterministic (Vs. stochastic): The next state of the environment is completely
determined by the current state and the action executed by the agent.
- Episodic (Vs.
sequential): The gent's experience is divided into atomic "episodes",
and the choice of action in each episodes depends only on the episode itself
- Static (Vs.
dynamic): The environment in unchanged while an agent is deliberating. (The
environment is semi dynamic if the environment itself does not change with the
passage of time but the agent's performance score does)
- Discrete (Vs.
continuous): A limited number of distinct clearly defined percepts and actions.
Agent Types
Four basic types in order of
increasing generality
- Simple
reflex agents
- Model based
reflex agents
- Goal based
agents
- Utility
based agents
- Simple Reflex Agents: - The agent
select an action best on the current precept ignoring the rest of the precept
history
Figure: -
Simple Reflex Agent
- Model Based Reflex Agent: - The agent
decides its actions best on of predefined set of condition action rules. For
e.g.: - a telephone operator answering machine
Figure: -
Model based reflex agent
- Goal based Agent: - The agent decides
its action best on a known a goal. For e.g.: - a GPS system finding a path to
certain destination
Figure: -
Goal Based Agent
Unit 3
Knowledge Representation
Knowledge Representation and Reasoning: - Intelligent
should have capacity for
- Receiving: - That is representing its
understanding of the world
- Knowledge Representation: - That is
representing its understanding of the world
- Reasoning: - That is inferring the
implications of what it knows and of the choices ithas.
- Acting: - That is choosing what it
want to do and carry it out.
Representation of knowledge and
the reasoning process are central to the entire field of artificial intelligent.
The primary component of a knowledge best agent is its knowledge base. A
knowledge best is a set of sentences. Each sentence is expressed in a language.
Sentences represent some assertion about the world. There must be mechanisms to
derive new sentences from old sentences. This process is known as inference or
reasoning. Inference must obey primary requirement that the new sentences
should follow logically from the previous one.
Approaches to knowledge Representation: - A
good system for the representation knowledge in a particular dement should
possess the following properties
-Representational Adequacy: - The
ability to represent all of the kinds of knowledge that are needed in that
domain.
-Inferential Adequacy: - The ability to
manipulate the representation structures in such a way as to derive new
structure cross ponding to new knowledge inferred from old.
- Inferential Efficiency: - The ability
to incorporate in to the knowledge structure additional information that can be
used to focus the attention of the inference mechanism in the most promising
direction.
- Inquisitional Efficiency: - The
ability to acquire new information easily. The simplest case involve direct
instruction of new knowledge into the database.
Logic: - Logic is the primary vehicle
for representing and resuming about knowledge. The advantage of using formal
logic as a language of AI is that it is price and deferent. These allows
program to be written which are declarative. This however leads to seven
limitation. Clearly a large person of the reasoning carried out by human depended
on handling knowledge that is on certain. Logic cannot represent this uncertainty
well. Similarly natural language resurging require inferring hidden state like
the intention of the speaker.
A logic consist of two parts, a
language and method of measuring. The logical language intern as two aspects,
syntax and semantics. They are
- Syntax: - The atomic symbols of the
logical language and the rules for constructing well formed a non-atomic expression
of the logic. Syntax specifies the symbols in the language and how they can be
combined to form sentences.
- Semantics: - The meanings of the
symbol of the logic, and rules there for demining the meaning of non – atomic
expression of the logic. It specifics what facts in the world a syntax refers
to. A fact is a claim about the world and may be true or false some popular
logics are propositional logic, first order predicate logic high order
predicate logic and fuzzy logic.
- Propositional Logic: - In PropositionalLogical
(PL) and user defines a set of propositional symbols like P&Q. User defines
the semantics for each of these symbol. For e.g.: -
P means
"It is hot"
Q means
"It is humid"
R means
"It is raining"
- A symbol
- If S is a
sentence than "~" is a sentence, where "~" is the not
logical operator?
- If sand PR
sentences then (S˅T), (S˄T) (S→T) and (S<→T) are also sentences for e.g.: -
(P˄Q)→R
It is hot and
humid then it is raining
Q→P
If it is
humid then it is hot R It is raining
- Given the
truth value of all of the constituent symbol in a sentence that sentence can be
content the value true or fails. This is called an inter pretention of the
sentence
- A model is
an inter pretention of a set of sentences such that each sentence is true. A model
is just a formal mathematical structure that stands in for the world.
- A valid
sentence (also called as tautology) is a sentence that is true under all inter
pretention. Hence no matter what the world is actually like or what the
semantic is the sentence is true.
- An
inconstant sentence (called on satisfy able or a contradiction) is a sentence
that is false under all inter reaction. Hence the world is never like that it
describes
First Order Logic
Syntax: - Syntax are symbol users the
symbols or alphabet be aware that there are all sorts of solidly different ways
to define first order logic
a) Alphabet: - There are different
types of symbols they are
- Logical Symbol: - These are symbols
that have a standard meaning like AND, OR, NOT, ALL, EXIT, IMPLIES if FALSE,
TRUE etc.
- Non Logical Symbol: - They are one
dimensional array two dimensional array N dimensional array functions (1 ary 2
array …….. n …….ary) variables etc.
b) Terms: - A term is either and
individual constant or a variable are any function applied to a terms.
c) Atomic Formula: - An atomic formulae
is either false are an n dimensional array predicate applied to ‘n’ terms
d) Literals: - A literals is either an
atomic formula (Positive literal) or the negation of an atomic formula (a negative
literals) a ground literal is avariable free literal
e) Clauses: - Clause is a disjunction
of literals a ground cause is a variable free clause a Horn clause is a clause
with at most one +ve literal a definite is a hornclause with exactly one +ve literal
Logical Agents
In logical agents we design
agents that can form representation of the world, use a process of in France to
derive new representation about the world and use these new representations to
reduce what to do?
- Knowledge
base agent the central component of knowledge base agent is its knowledge base.
A knowledge base is a set of sentences. Each sentence is expressed in a
language called a knowledge presentation language and represents some accretion
about the world.
|
Function: - KB – AGENT (percepts) return
an action
Static: - KB, a knowledge base t, a
counter initially 0.
TELL (KB, MAKE – PERCEPT – SENTENCE
(Percept t)
Action ← ASK (KB, MAKE – ACTION – QUERY (
TELL (KB MAKE – ACTION – SENTENCE (action
t))
T = ++1
Return action
|
Fig: - A
generic knowledge base agent
Figure shows the outline of a
knowledge best agent program. Like all our agents it text a percept as I/P and
returns an action. The agent Montana a Knowledge Base (KB) which may initially
content some background knowledge base what it perceives, second, it asks the
knowledge base what action should perform. In the process of answering this
query, extensive reasoning may be done about the current state of the world,
about the outcomes of possible action sequences and so on. Third, the agent
recorders its choice with tell and executed the action.
Formal Logic Connectives Syntax, Semantics
Syntax
- Rules for
constructing legal sentences in the logic
- Which
symbol we can use
- How we are
allowed to combine symbols
-
Propositions
- Connective
and, or, not,
implies, if (
)
Semantics
-
How we interpret (read) sentences in the logic
-
Assign a meaning to each sentences
-
Use true the table to work out the truth of statement
Semantic Network
Figure:
The idea behind the semantic
network is that knowledge is often best understood as a set of concept that are
related to one another. The meaning of a concept is defined by its relationship
to another concept. A semantic network consist of a set of node that are
connected by labeled arcs. The nodes represent concepts and the arcs represents
relations between concepts.
Common Sematic Relations
INSTANCE
X
is an INSTANCE of Y, if X is a specific example of the general concept Y.
ISA
X
ISA Y, if X is a subset of the more general concept Y e.g.: - sparrow ISA bird.
Haspart
X
has part Y, if the concept Y is a part of the concept X. e.g.: sparrow has part
tail.
- Semantic Tree
A
semantic tree is a representation that is a semantic net I which shorten links
are called branches. Each branch connects two node. The head node is called
parent node and tail node is called child node. One node has no parent; it is
called the root node. Other nodes have exactly one parents. Some nodes have no
children; they are leaf node when two nodes are connected to each other by a
chain of two or more branches one is set to be the ancestor; the other is set
to be the descendent.
- Inheritance
Inheritance
is a key concept in semantic n/w and can be represented naturally by following
ISA link. In general, if concept X has property P, then all concepts that are a
subset of X should also have property P. In practice, inherited properties are
usually treated has default values. If a node has direct link that contradicts
inherited property, then the default is over rider.
- Multiple Inheritance
Ø
Multiple inheritance allows an object to
inherit properties from multiple concept
Ø
Multiple inheritance can sometime allow
an object to inherit conflicting properties.
Ø
Conflicts are potentiallyunatonable so conflict
resolution strategies are needed
Predicate Calculus (Predicate Logic)
In
mathematical logic, predicate logic is generic turn for symbolic formal systems
like first order logic, second order logic or many sorted logic. This formal
system is distinguished from other system in that its formula content variables
which can be quantified. Two common quantifies are existential ᴲ (“There
exist”) and universal U (“for all”) quantifies. Predicate calculus symbols may
represent either Constance variable, function, predicate. Constance name
specific objects are properties in the domain of this coursed. Thus tree tall
and blue are examples of well form constant symbols. The constant true and false
are included. Functions denote mapping of one or more elements in a set called
the domain of the function. In to a unique element of another set. Elements of
the domain and range are objects in the old of discourse. Every function
symbols have an associated entity indicating the number of element in the
domain mapped on to each element of range.
Predicate
logic uses three additional notation they are
i) Predicate
A predicate is a relation that
binds two items together for example: Krishna like apple. Know we can write
like (Krishna, like apple) where like is predicate that links two items Krishna
and Apple.
Thus predicate can be
generalized as like X, Y where X and Y are the variable it means X likes Y
ii) Terms (Literals)
Terms are arguments in a
predicate logic example Ravi’s father is Ranis father that is father (father
iii) Quantifiers
A quantifiers is a symbol that
permits to declare or identify the range or scope of variables in a logical
expression. There are two types of quantifiers they are
-
Universal quantifiers
-
Existential quantifiers
- Universal Quantifiers
If
A is a variable the ¥a is read as
i)
for all A
ii)
for each A
iii)
for every
- Existential Quantifiers
If B is a variable then ϶b is
read as
i)
there exist B
ii)
for some B
iii)
for at histone B
Resolution
Robinson
in 1965 introduce the resolution principle which can be directly apply to any
set of clues. The principle is given any two clues A and B, if there is lateral
Bin A and which has complementary term >p in B, delete P from A and B an
construct a new close of the remaining clues. The clues so constructed is
called “resolving of A and B”.
Substitution
Resolution
works on the principle of identifying complementary literals in two clues a
deleting then there by forming a new literal. The process is simple an state
forward where are variables the problem becomes complicated and there is
necessary to make proper substitution.
There
are three major types of substitution
-
Substitution of variable by a constant
-
Substitution of variable by another variable
-
Substitution of variable by function that does not have same variable
Unification
In
prepositional logic it is easy to determine that how literals cannot both be
tree at the same time for example: man (John) &Ʌ man (john) thus
in order to determine contradiction win need a machine procedure that compares
two literals at discourse where their exist a set of substitution that made
them identical there is a state forward recursive procedure called unification
algorithm. The basic idea of unified two literals we fast check if their
initial predicate symbols are the same. If so we can processed otherwise there
is no way to unified regard less of their arguments.Suppose we want to unify an
expressions P(K,Y) & P(K,Z) here the predicate is same so we can unify by
substituting Z by Y.
Frame
Frame
is a collection of attribute slots and associated values that describe some
real word entity. Frames on their own are not particularly help full but frames
systems are powerful way of encoding information to reasoning process. A frame
structure provides facilities for describing objects facts over situation
procedure on what to do when a situation is encounter.
Types of Frames
- Declaration Frame: - A
frame that contains description about an object is called a declarative frame.
The computer center frame describable it a typical example of subscribe frame
- Procedural Frame: - It
is possible to have procedural knowledge represented in a frame. Such frame
which have procedural knowledge embedded in it are called procedurals frames.
The procedural frames as following slots
a) Actor Slots: - It
holds information about who is performing the activity
b) Object Slots: - This
slots as information about the item to perform on
c) Source Slots: - Source
slots holds information from where the action as to end
e) Task Slots: - This
generates the necessary sub slots required to perform the operation
Approach to Knowledge Representation: - A
good system for knowledge representation should passes the following property
- Representation Adequacy: -
The ability to represent all kinds of knowledge that are needed in that domain
- Interracial Adequacy: -
The ability to manipulate the representation structure in such a way as to
derive new structures of new knowledge inference form old.
- Acquisitioned Efficiency: - The
ability to acquire the new information easily. The simplex case involves direct
insertion by a person as new knowledge in to the knowledge base.
- Inferential Efficiency: - The
ability to incorporate into the knowledge structure additional information that
can use to fours the attention of the inference mechanism in most per mistingdirection
Knowledge
Representation Technique
(a) Simple relational knowledge: -
The simple way of storing facts page to use a simple relational method where
each fact about a set of object which set at systematically in columns. This
representation gives little opportunityfor inference but it can be used as
knowledge bases for inference engine.
(b)Inheritable knowledge: - Relational
knowledge is made up of constitute of institute and cross ponding associated
values we extend the base more by allowing inference mechanism for property in
heritance is used. In property inheritance of a class.
(c)Inferential knowledge: - In
inferential knowledge logic knowledge is represented as formal for example all
dogs have tell an in formal logic it is return as
Advantage
-
A set of strict rule
-
Can be used to derive
-
Make
-
Popular in AI system
(d) Procedural knowledge: -It
is also called operational knowledge which specifies what to do when. In this
control information is necessary to use the knowledge in embedded in the
knowledge base itself
Unit 4
Inference and Reasoning
State Space Representation Technique: - A
set of all possible states for a give problem is known as state space of the
problem. For example let us consider us consider an 8 tiles puzzle game. The
puzzle consist of a squire frame contenting at tiles and an empty slot. The
tiles are number from 1 to 8. It is possible to move the tiles in the squire field
by moving a tile in to the empty slot. The objective is to get the squire in a
numerical order
Rules: - The
operator for this problems are
Up: - If the heal is not
touching the top frame move it up.
Down: - If
the heal is not touching the bottom frame move it down.
Left: - If
the heal is not touching the left frame move it left.
Right: - If
the heal is not touching the Right frame move it right.
Figure
The state space is a directed
graph with all the state has nodes. A node is set to be existed if it is
possible to up tent it form the initial state by application of a set of
operators. A small fragment of state space for the 8 tile puzzle game as soon
above.
State space representation are
highly perinatal in AI because they provide all possible states operations and
the goal. If the entire state space representation for a problem it’s given it
is possible trace the part from the initial state to the goal state and
identifies the sequence of operators. The major disadvantage of this method is
that it is not possible to visualize all states for a given problem. More ever,
the resources of the computer system are limited to handle huge state space
representation.
Heuristic Search
Breath
first searching is a uniforms search because they do not have any domain
specific knowledge. Heuristics are approximations use to minimize the searching
process. The process of searching can be drastically reduced by the use of
heuristic. Generally two categories of problems are heuristic
-
Problem for which no exact algorithms are known and one needs to find an
approximation and satisfying solution
-
Problem for which exact solution is known but computationally in fusible.
The heuristic which are needed
for serving problems are generally represented as a heuristic function which
maps the problem state in to numbers. This numbers are then approximately used
to guide search. The following algorithm make use a drastic evaluation function
- Hill Climbing Search: - This
algorithm is also called discrete optimization algorithm which uses a simple
heuristic function to calculate the amount of distance the node is from the
goal. In fact there is no different between hill climbing search and deft
search except that the children of the node that has been expended are shorted
by remaining distant
Algorithm
- Put the initial list on
start
-
If start = empty or start = goal terminate search
-
Remove the first node from the start called this node A
-
If A = goal terminate search with success
-
If node has a successor generate all of them. Find out how far they are from
the goal node sort they by remaining distance from the goal and at them to the
- Best First Search: - This
is also heuristic search the heuristic function used here are called evaluation
function each and indicates how far the node is from the goal node. Goal node
have an evaluation function value of O (Zero)
It is explained using a search
give above. First the start node is expended. It has three children A, B and C
with evaluation function 3, 6 and 5 respectively. These values approximately
indicate how far they are from the goal node. The child with minimum value ‘A’
is chosen. The children’s of ‘A’ are generated. They are ‘D’ and ‘E’ with evaluation
function 9 and 8 with evaluation at. The search process has how four node to
search that is the node ‘D’ with evaluation function 9, ‘E’ with 8, ‘B’ with 6
and ‘C’ with 5 where ‘C’ has got the minimum value which is expanded to give
node ‘H’ which value is 7. At this point the node available for search are (D:
9), (E: 6) (H: 7)
Algorithm
-
Put the initial node on a list START
-
If START empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successes generate all of them find out how far they are
from the goal node. Short all the child generated so far by the remaining
distance from the goal
-
Replace start with START
-
Go to step 2
- A* Search (Aversa Search): - In
best first search we brought in a heuristic value called evaluation function
value. It is a value that estimates how far a particular estimate node is from
the goal node. A part from the evaluation function value one can also bring
that is cost function. Cost function indicates how much resources take time
energy money etc. has been spent in reading a particular node from the start.
If it is possible for one to obtain the evaluation values and cost function
values the A* algorithm can be used.
Algorithm
-
Put the initial node unless START
-
If START = empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successor generate all of them. Estimate the fitness
number (The sum of evaluation function and cost along the reading to that state
is called fitness number) of the successes by totaling the evaluation function
values and cost function value. Short the list by fitness number
-
Need the new list as START 1
-
Replace start with START 1
-
Go to step 2
AO* Search
Game Playing in AI: - There
are two major components in game playing they are
i) Plausible Move Generator: - If
we are to employee a simple move generator then it might not be possible to
examine all the states. Has it is essential that only very selected moves or
pats the examine for this purpose only one has a flexible move generator that
expends are generates only selected moves
ii) Static Evaluation Function
Generator: - This
is the most important components of the game playing program. Based on
heuristic this generates the static evaluation function value for each and
every move that is being made. The study evaluation function gives a snapshot
of a particular move. More the static evaluation function value more in the possibility
for victory. The basic method available for game playing are
- Min – Max Strategy: - Min
– max strategy is a simple strategy for two person gene playing. Here players
are called maximizer and minimizer both are opponent to each other. Maximizer
and minimizer fights it out to see that the opponent get minimum benefit and
they get the maximum benefit. The play sable move generator generate necessary
for the farther evaluation and the static evaluation function ranks each of the
position
Figure
Let AB the initial state of the
game, the plausible move generator generates children’s for that move and the
static evaluation function generate assign the value given along with each of
the state. It is assume that that the static evaluation function generators
returns a value from – 20 to +20 where a value of +20 indicates a win for
maximizer and a value of -20 indicates a wine for minimizer makes first move
the maximizer always tries to go the position where the static evaluation
function value is maximizer positive value.
The maximizer being the player
to make the first move will to node D because static evaluation function value
of that maximum node. If the minimizer has to move he will go node be because
the static evaluation function value for that node is minimum
Figure
Fig:
- game tree explained by two level their association static evaluation function
value but a game playing strategy never stops with one level but loops a head
that is move a couple of levels down ward to those the optimal movies
Let’s examines this with the
help of above fig: Let’s assume that it is the maximizer who will to play first
floated by minimizer. Before the maximizer move to N, O, P he will have to
thing which move would be highly beneficial to him. It maximizer move to N next
will be minimizer term. The minimizer always this to other and he will move to
are (static evaluation function value = -6) this value is backed off to N.
If M move to O, then the minimizer
will move to V, which is the minimum of +4, +7 and 0 so, the value of 0 is
backed up as 0. Similarly the value of P will backed of -3.
The maximizer will know have to
choose between M, N, O, and P with the value of -6, 0 and -3. Being a maximizer
he will choose node 0 because if provides the maximize value corresponding to
other
- Min – Max Strategy with alphabet cut –
offs: -
Figure:
-
This is the modified version of
min max strategy algorithm where two threshold value are maintain for features
expansion. One threshold value is called alpha, which is lower bound on the
value the maximizer can be originated and other is beta (P) which represent the
upper bound of the value the minimizer can be assigned.
In this figure the maximizer has
to play first floated by the minimizer as done in min – max strategy. The
maximizer assign A value of 6 at Q (minimum at the values sand t). This values
is backed up P so the maximizer as assured of A value of 6 when he move to Q.
Now let see what happened at R. The value at V is -2 and U is unknown. Since,
the move is minimizing 1 by moving to R, P can get only A value of -2 or less
that is unacceptable for P because by moving to Q he is assured of value up 6 hence
he will never tries move other than children of R
Role of Alpha (α)
Figure: -
For P the maximizer A value of 6
is assured by moving a node Q. this value P is compared with that of value at
R, P be the maximizer could flow any path which value is greater than 6. Hence,
this value of 6 being the least at a maximizing move and set as value of α.
This value of alpha is now used as reference point. Any node which value is
greater than alpha is acceptable and all the node which values are less than
alpha is rejected.
Role of Beta (β)
Figure: -
In this figure is the minimizer
and the path for extension are chosen from values at the leaf node. Since 5 and
T are maximizer the maximum value of their children are back up as static
evaluation function value. Node Q being minimizer always moves to 5 rather than
T. the value at 5 (6) is not we used by Q as a reference point. The value is
called β is acceptable and values more than β are seldom.
Bayesian Networks
-
Bayesian networks also known as Bayes Nets, Belief Nets cause nets and
probability nets, are a space efficient data structure for encoding all of the
information in the full joint probability distribution for the set of random
variables defining a domain
-
Represents all of the direct causal relationships between variables
-
In punitively to construct a Bayesian net for a given set of variables draw are
from cause variables to immediate effects.
-
Space efficient because it exploits the fact that in many real world problem
domains the dependencies between variables are generally local, so there are a
lot of conditionally independent variables
-
Captures both qualitative and quantitative relationships between variables
-
Can be used to reason: -
i)
Forward (top – down) from causes to effects predictive reasoning (aka causal
reasoning)
ii)
Backward (bottom – up) from effects to causes diagnostic reasoning
-
Formally a Bayesian Net is a directed a cyclic graph (DAG) where is a node for
each random variable and a directed are from A to B whenever A is a direct
causal influence
-
Each node A in a net is conditionally independent of any subset of nodes that
are not descendant of a given the parents of A.
Case based Reasoning: - In
case based reasoning the cases are stored and accessed to solve a new problem.
To get a prediction for a new example, these cases that are similar or close to
the new example this is at one extreme of the learning problem where unlike
decision trees and neural networks relatively little work must be done offline
and virtually all of the work is performed at query time.
Case based reasoning can be used
for classification and regression. It is also applicable when the cases are
complicated, such as in legal cases where the cases are complex legal rulings
and in planning, where the cases are previous solutions to complex problems
If the cases are simple one
algorithm that works well is to use the k – nearest neighbors for some given
number K. given a new example the K training examples that have the input
features closest to that example are used to predict the forget value for the
new example.
The prediction can be the mode
average or some interpolation between the predication of these k. training
examples perhaps weighting closer examples more than distant examples.
For this method to work a
distance metric is required that measures the closeness of two examples. First
define a metric for the domain of each feature in which the values of the
features are converted to a numerical scale that can be used to compare values.
Unit 5
Machine Learning
Learning: - The
process of knowledge as equation is called learning. There are various types of
learning.
- Rote Learning (Learning by
Memorizations): - Knowledge a equation itself includes many
different activities. Simple storing of computing information or rote learning
is the most basic learning activities may computer programs examples database
systems can be used to learn in this sense slough most people could not called
such simple storage as learning however many IT programs rote learning
techniques. When a computer stored a paces of data it is performing a rote
learning such learning are used full for improving the performance of the
systems.
- Learning by Analogy
a) Transformational Analogy
Suppose
we are asked to prove theorem in plane geometry we might look for a previous
theorem that is very similar and copies its proof, making substitution when
necessary. The idea is to transform a solutions to a previous problem into a
solutions for the current problem such learning is called learning by
transformation analogy.
The example for transformational
analogy is five below
Figure:
-
b) Derivational Analogy
Figure:
-
Transformation analogy if does
not look at how the old problem was solved it look at the final solution after
the twist and terms in solving an old problem are relevant to solving a new
problem. The detail history of problem solving is called its derivation
analogical reasoning that tables these histories in to account is called
derivational analogy.
Explanation Based Learning (EBL): - An
explanation based learning system accepts and example (i.e. training example)
an explains what it learns from the example. The EBL system takes only the
relevant aspects of the training. These explanations is translated in to
particular form that a problem solving program can understand so that it can
used to solve other problem
We can think EBL program as
specifying the following input.
-
A training example: - what the training program size in the world.
-
A goal concept: - A high level description of which the problem is supposed to
known
-
A operationally (
): - A description of which concept are useable
-
A domain theory: - A set of groups that gives the relationship between the
activities between domains
Inductive Bias Learning: - A
major problem in machine learning is that of inductive bias how to choose a
learners hypothesis space so that it is large enough to contain a solution to
the problem being learnt yet small enough to ensure reliable generalization
from reasonably sized training sets. Typically such bias is supplied by hand
through the skill and insights of experts. In this paper a model for
automatically learning bias is investigated. The central assumption of the
model is that the learner is embedded within an environment of related learning
tasks.
Within such an environment the
learner can sample from multiple tasks and hence it can search for a hypothec
is space that contains good solutions to many of the contains on the set of all
hypothesis spaces available to the learners we show that a hypothesis space
that performs well on a sufficiently large number of training tasks novel task
in the same environment. Explicit bounds are also derived demonstrating that
learning multiple tasks can potentially give much better generalization than
learning a single task.
Genetic Algorithms: - This
is an introduction to genetic algorithm methods for optimization. The
continuing price/performance improvements of computational systems has made
them attractive for some types of optimization. In particular genetic
algorithms work very well on mixed. Combinational problems. But they tend to be
computationally expensive. To use a genetic algorithm you must represent a
solution to your problem as a genome. This presentation outlines some of the
basics of genetic algorithms. The three most important aspects of using genetic
algorithms are
-
Definition of the objective function
-
Definition and implementation of the genetic representation and
-
Definition and implementation of the genetic operators
Once these three have been
defined the generic algorithm should work fairly well. Beyond that you can try
many different variations to improve performance find multiple optima or
parallelize the algorithms.
Application of AI
Export System: - Export
system are knowledge intensive programs that solve problem in a domain that
require considerable amount of technical information the Brattice computer
society community of the specialist prove on export system as formed the
following generation
-
The embodiment within a computer of a knowledge based component from on export
skill in such a form that the machine can offers that intelligence take
intelligence design about of the specification.
A desirable additional characteristics
which may regard fundamental each the capability of the system on demand to
justified its own line of reasoning in a manner directly to the enquire
Characteristics Expert System (CES)
Following
are the different characteristics expert system
-
They should solve difficult problem in a domain as good as or better than on
expert
-
They should process vast quantities of domain specific knowledge in the detail
-
These system promote the use of heuristic search process. It must be cleared
that brought search techniques are in practical and to managed the problem
heuristic search procedure process the management
-
They explain why they question and justify their confusion. Explanation
facilities enhance treatability system in the mind of human
-
They accept advice modify update and expand
-
They communicate with the users in their own natural language
-
They provides extensive facility part simply processing greater than numeric
processing
Goal in Problem Solving
Introduction: - "Developing
computers programs to solve complex problems by the application of processes
that are analogous to human resourcing process"
AI is the ability of a program
to perform the same kinds of functions that characterize human thoughts which
includes.
i) Systems
that thinks like human
ii) Systems
that thinks acts like human
iii) Systems
that thinks think rationally
iv) Systems
that thinks acts rationally
i) Systems that thinks like humans: - This
requires getting inside of the human mind to see how it works and then
comparing our computer programs to this. This is what cognitive science afferents
to do. An others way to do this is to observe a human problems solving and rogue
that one's programs go about problem solving in similar way.
ii) Systems that act like human: - To
be considered intelligent a program must be able to act sufficiently like a
human to fool an interrogator. The machine and the human are isolated from the
person carrying out the test and messages are exchanged via a keyboard and
screen. If the person cannot distinguish between the computer and the human
being then the computer must be intelligent.
iii) System that think rationally: - For
example all computers use energy. Using energy always generates heat. Therefore
all computers generate heat. This initiates the field of logic. Formal logic
was developed in the lot nineteen century. This was the first step forwards
enabling computer programs to reason logically.
iv) System that act rationally: - Acting
rationally means acting so as to achieve one's goals given one's beliefs. An
agent is just something that perceives and acts. In the logical approach to AI
the emphasis is on correct inferences.
Function of AI
- Philosophy: - Logic methods of
reasoning mind as physical system foundations of Learning, Language, and
Rationality.
- Mathematics: - Formal representation
and proof algorithm, computation, decidability, tractability, probability.
Philosophers staked out most of the important ideas of AI but to move to a
formal science requires a level of mathematics formulism in three main areas
computation logic and probability.
- Economics: - Utility decision theory
- Neap Science: - Physical substrate
for mental activity
- Psychology: - Phenomena of perception
and motor control, experimental techniques. The principle characteristic of
cognitive. Psychology is the brain processes and process information.
- Computer Engineering: - Building fast
computers
- Control Theory: - Design systems that
maximize an objective function over time
- Linguistics: - Knowledge
representation grammar having a theory of how human successfully process
natural language is an AI complete problem if we could solve this problem then
we would have created a model of intelligence.
Application area of an AI: - Today's AI
systems have been able to active limited success in some of these tasks.
- In computer
vision the systems are capable of face recognition
- In Robotics
we have been able to make vehicles that are mostly automats.
- In natural
language processing we have systems that are capable of simple machine
translation
- Today's
Expert systems can carry out medical diagnosis in a narrow domain
- Speech
understanding systems are capable of recognizing several thousand words
continuous speech
- Planning
and scheduling systems had been employed in scheduling experiments with the
Hubble Telescope.
- The
Learning systems are capable of doing text categorization into about a 1000
topics
- In games AI
systems can play at the Grand Master level in chess (World Champion) checkers
etc.
What can AI system NOT do yet?
- Understand
natural language robustly (e.g. read and understand articles in a newspaper)
- Surf the
web
- Interpret
an arbitrary visual science
- Learn a
natural language
- Construct
plans in dynamic real time domains
- Exhibit
true autonomy and intelligence
Goal Schemas: - To build a system to
solve a particular problem we need to do four things.
- Define the
problem precisely. This definition must include precise specifications of what
the initial situations will be as well as what final situations constitute
acceptable solutions to the problem.
- Analyze the
problem. A few very important features can have an immense impact on the
appropriateness of various possible techniques for solving the problem
- Isolate and
represent the task knowledge that is necessary to solve the problem.
- Choose the
best problem solving techniques and apply them to the particular problem
i) Search Problem: - It is
characterized by an initial state and a goal state description. The guesses are
called the operators where a single operator transforms a state into another
state which is expected to be closer to a goal state. Here the objective may be
to find a goal state or to find a sequence of operators to a goal state.
Additionally the problem may require finding just any solution or an optimum
solution.
ii) Planning: - The purpose of planning
is to find a sequence of actions that achieves a given goal when performed
starting in a given state. In other words given a set of operator instances
(defining the possible primitive actions by the agent) an initial state
description and a goal state description or predicate the planning agent
computers a plan.
Simple Planning Agent: - The problem – solving agents are able to
plan a head to consider the consequences of sequences of actions before acting.
And a knowledge – based agents can
select actions based on explicit, logical representations of the current state
and the effects of actions
Problem
Solving Agents + Knowledge – based Agents = Planning Agents
Linear Planning: - Basic idea work and
one goal until completely solved before moving on to the next goal planning
algorithm maintains goal stack
i) Implications
- No inter
leaving of goal achievement
- Efficient
search if goals do not interact
ii) Advantages
- Reduced
search space since goals are solved one at a time
-
Advantageous if goals are (mainly) independent
- Linear
planning is sound
Iii) Disadvantages
- Linear
planning may produce sub optional solutions
- Linear
planning is incomplete
Concept of non – linear planning
Use goal set instead of goal
stack. Include in the search space all possible sub goal ordering. Handles goal
interactions by interleaving.
Advantages
- Non –
linear planning is sound
- Non –
linear planning is complete
- Non –
linear planning may be optimal with respect to plan length (depending on search
strategy employed)
Disadvantage
- Larger
search space since all possible goal orderings may have to be considered
- Somewhat
more complex algorithm more bookkeeping
Means – Ends Analysis: - The means –
ends analysis concentrates around the detection of differences between the
current state and the goal state. Once such difference is isolated an operator
that can reduce the difference must be found. However perhaps that operator
cannot be applied to the current state. Hence, we setup a sub – problem of
getting to a state in which it can be applied. The kind of backward chaining in
which the operators are selected and then sub goals are setup to establish the
preconditions of the operators is known as operator sub – goal.
Just like the other problem
solving techniques, means – ends analysis relies on a set of rules that can
transform one problem state into another. However these rules usually are not
represented with complete state descriptions on each side. Instead, they are
represented as left side, which describes the conditions that must be met for
the rule to be applicable and a right side, which describes those aspects of
the problem state that will be changed by the application of rule. A separate
data structure called a difference table indexes the rules by the differences
that they can be used to reduce.
Algorithm: Means – Ends Analysis
- Compare
CURRENT to GOAL. If there are no differences between them, then return.
- Otherwise,
select the most important difference are reduce it by doing the following until
success or failure is signaled
a) Select a
new operator O, which is applicable to the current difference. If there are no
such operators then signal failure.
b) Apply O to
CURRENT. Generate descriptions of two states, O – START a state in which O's
preconditions are satisfied and O – RESULT, the state that would result if O
were applied in O – START
Production Rules Systems: - Since
search is a very important process in the solution of hard problems for which
no more direct techniques are available, it is useful to structure AI programs
in a way that enables describing and performing the search process. Production
systems provide such structures. A production systems consists of:
- A set of
rules each consisting of a left side that determines the applicability of the
rule and a right side that describes the operation to be performed if the rule
is applied.
- One or more
knowledge or databases that contain whatever information is appropriate for the
particular task.
- A control
strategy that specifies the order in which the rules way of resolving the
conflicts that arise when several rules match at once.
i) Forward Chaining Systems: - In a
forward chaining system the facts in the system are represented in a working
memory which is continually updated. Rules in the system represent possible
actions to take when specified conditions hold on items in the working memory
they are sometimes called condition – action rules. The conditions are usually
patterns that must match items in the working memory while the actions usually
involve adding or deleting items from the working memory.
The interpreter controls the
application of the rules, given the working memory, thus controlling the
system's activity. It is based on a cycle of activity sometimes known as a
recognize act cycle. The system first checks to find all the rules whose
conditions hold, given the current state of working memory. It then selects one
and performs the actions in the action part of the rule. The actions will
result in a new working memory and the cycle begins again. This cycle will be
repeated until either no rules fine or some specified goal state is satisfied.
ii) Backward Chaining Systems: - So far
we have looked at how rule based systems can be used to draw new conclusions
from existing data adding these conclusions to a working memory. This approach
is most use full when you know all the initial facts, but don't have much idea
what the conclusion might be.
If we do know what the
conclusion might be, or have some specific hypothesis to test forward chaining
systems may be inefficient. We could keep on forward chaining until no more
rules apply or you have added your hypothesis to the working memory. But in the
process the system is likely to do a lot of irrelevant work adding
uninteresting conclusions to working memory.
iii) My CIN Style Probability and its
Application: - In artificial intelligence, My CIN was an early expert
system designed to identify bacteria causing severe in factions, such as
bacteremia and meningitis, and to recommend antibiotics, with the amount
adjusted for patient's body weight the name derived from the antibiotics
themselves, as many antibiotics have the suffix "MYCIN". The MYCIN
system was also used for the diagnosis of blood clotting diseases.
MYCIN was developed over five or
six years in the early 1970s at Stanford University in Lisp by Edward short
life. MYCIN was never actually used in practice but research indicated that it
proposed an acceptable therapy in about 69% of cases, which was better than the
performance of infectious disease experts who were judged using the same
criteria. MYCIN operated using a fairly simple inference engine, and a
knowledge base rules. It would query the physician running the program via a
long series of simple Yes/No or textual question. At the end it provided a list
of possible culprit bacteria ranked from high to low based on the probability
of each diagnosis, its confidence in each diagnosis probability, the reasoning
behind each diagnosis and its recommended course of drug treatment.
Practical use/Application: - MYCIN was
never actually used in practice. This wasn't because of any weakness in its
performance. As mentioned in tests it output formed members of the Stanford
medical school faculty. Some observers raised ethical and legal issues related
to the use of computers in medicine if a program gives the wrong diagnosis or
recommends the wrong therapy, who should be held responsible?
Unit 2 Intelligence
Introduction of Intelligence: - Artificial
intelligence is concerned with the design of intelligence in and artificial
device. The turn was invented by MC Cathy in 1956.
Artificial intelligence is about
designing system that are as intelligent as human. This view involves trying to
understand human through and an effort to build machines that emulate the human
though process. This view is the cognitive science approach to AI.
Common Sense Reasoning: - Common sense
is ability to analyze the situation best on it context, using millions of
integrated pieces of common knowledge depends on being able to do common sense resining
central part of intelligent behavior.
Example every know that drawing
a glass of water the glass will break and water will spill. However this
information is not obtained by formula or equation. Common sense knowledge
means what everyone knows. Example: -
- Every
person is younger then the person's mother
- People
don't like being repeatedly interrupted
- If you hold
a knife by its blade then the blade may cut you.
- People
generally sleep at right
Agents: - An agent is anything that can
be viewed as perceiving its environment through sensors and acting upon that
environment through actuators
- Human
agent; eyes, and other organs for sensors; hands, legs, mouth and other body
parts for actuators
- Robotic
agent; cameras and infrared range finders for sensors; various motors for
actuators agents and environments
Figure: -
Personality of Agent
Environment Type
- Fully
observable (Vs. partially observable): An agents sensors give it access to the
complete state of the environment at each point in time
-
Deterministic (Vs. stochastic): The next state of the environment is completely
determined by the current state and the action executed by the agent.
- Episodic (Vs.
sequential): The gent's experience is divided into atomic "episodes",
and the choice of action in each episodes depends only on the episode itself
- Static (Vs.
dynamic): The environment in unchanged while an agent is deliberating. (The
environment is semi dynamic if the environment itself does not change with the
passage of time but the agent's performance score does)
- Discrete (Vs.
continuous): A limited number of distinct clearly defined percepts and actions.
Agent Types
Four basic types in order of
increasing generality
- Simple
reflex agents
- Model based
reflex agents
- Goal based
agents
- Utility
based agents
- Simple Reflex Agents: - The agent
select an action best on the current precept ignoring the rest of the precept
history
Figure: -
Simple Reflex Agent
- Model Based Reflex Agent: - The agent
decides its actions best on of predefined set of condition action rules. For
e.g.: - a telephone operator answering machine
Figure: -
Model based reflex agent
- Goal based Agent: - The agent decides
its action best on a known a goal. For e.g.: - a GPS system finding a path to
certain destination
Figure: -
Goal Based Agent
Unit 3
Knowledge Representation
Knowledge Representation and Reasoning: - Intelligent
should have capacity for
- Receiving: - That is representing its
understanding of the world
- Knowledge Representation: - That is
representing its understanding of the world
- Reasoning: - That is inferring the
implications of what it knows and of the choices ithas.
- Acting: - That is choosing what it
want to do and carry it out.
Representation of knowledge and
the reasoning process are central to the entire field of artificial intelligent.
The primary component of a knowledge best agent is its knowledge base. A
knowledge best is a set of sentences. Each sentence is expressed in a language.
Sentences represent some assertion about the world. There must be mechanisms to
derive new sentences from old sentences. This process is known as inference or
reasoning. Inference must obey primary requirement that the new sentences
should follow logically from the previous one.
Approaches to knowledge Representation: - A
good system for the representation knowledge in a particular dement should
possess the following properties
-Representational Adequacy: - The
ability to represent all of the kinds of knowledge that are needed in that
domain.
-Inferential Adequacy: - The ability to
manipulate the representation structures in such a way as to derive new
structure cross ponding to new knowledge inferred from old.
- Inferential Efficiency: - The ability
to incorporate in to the knowledge structure additional information that can be
used to focus the attention of the inference mechanism in the most promising
direction.
- Inquisitional Efficiency: - The
ability to acquire new information easily. The simplest case involve direct
instruction of new knowledge into the database.
Logic: - Logic is the primary vehicle
for representing and resuming about knowledge. The advantage of using formal
logic as a language of AI is that it is price and deferent. These allows
program to be written which are declarative. This however leads to seven
limitation. Clearly a large person of the reasoning carried out by human depended
on handling knowledge that is on certain. Logic cannot represent this uncertainty
well. Similarly natural language resurging require inferring hidden state like
the intention of the speaker.
A logic consist of two parts, a
language and method of measuring. The logical language intern as two aspects,
syntax and semantics. They are
- Syntax: - The atomic symbols of the
logical language and the rules for constructing well formed a non-atomic expression
of the logic. Syntax specifies the symbols in the language and how they can be
combined to form sentences.
- Semantics: - The meanings of the
symbol of the logic, and rules there for demining the meaning of non – atomic
expression of the logic. It specifics what facts in the world a syntax refers
to. A fact is a claim about the world and may be true or false some popular
logics are propositional logic, first order predicate logic high order
predicate logic and fuzzy logic.
- Propositional Logic: - In PropositionalLogical
(PL) and user defines a set of propositional symbols like P&Q. User defines
the semantics for each of these symbol. For e.g.: -
P means
"It is hot"
Q means
"It is humid"
R means
"It is raining"
- A symbol
- If S is a
sentence than "~" is a sentence, where "~" is the not
logical operator?
- If sand PR
sentences then (S˅T), (S˄T) (S→T) and (S<→T) are also sentences for e.g.: -
(P˄Q)→R
It is hot and
humid then it is raining
Q→P
If it is
humid then it is hot R It is raining
- Given the
truth value of all of the constituent symbol in a sentence that sentence can be
content the value true or fails. This is called an inter pretention of the
sentence
- A model is
an inter pretention of a set of sentences such that each sentence is true. A model
is just a formal mathematical structure that stands in for the world.
- A valid
sentence (also called as tautology) is a sentence that is true under all inter
pretention. Hence no matter what the world is actually like or what the
semantic is the sentence is true.
- An
inconstant sentence (called on satisfy able or a contradiction) is a sentence
that is false under all inter reaction. Hence the world is never like that it
describes
First Order Logic
Syntax: - Syntax are symbol users the
symbols or alphabet be aware that there are all sorts of solidly different ways
to define first order logic
a) Alphabet: - There are different
types of symbols they are
- Logical Symbol: - These are symbols
that have a standard meaning like AND, OR, NOT, ALL, EXIT, IMPLIES if FALSE,
TRUE etc.
- Non Logical Symbol: - They are one
dimensional array two dimensional array N dimensional array functions (1 ary 2
array …….. n …….ary) variables etc.
b) Terms: - A term is either and
individual constant or a variable are any function applied to a terms.
c) Atomic Formula: - An atomic formulae
is either false are an n dimensional array predicate applied to ‘n’ terms
d) Literals: - A literals is either an
atomic formula (Positive literal) or the negation of an atomic formula (a negative
literals) a ground literal is avariable free literal
e) Clauses: - Clause is a disjunction
of literals a ground cause is a variable free clause a Horn clause is a clause
with at most one +ve literal a definite is a hornclause with exactly one +ve literal
Logical Agents
In logical agents we design
agents that can form representation of the world, use a process of in France to
derive new representation about the world and use these new representations to
reduce what to do?
- Knowledge
base agent the central component of knowledge base agent is its knowledge base.
A knowledge base is a set of sentences. Each sentence is expressed in a
language called a knowledge presentation language and represents some accretion
about the world.
|
Function: - KB – AGENT (percepts) return
an action
Static: - KB, a knowledge base t, a
counter initially 0.
TELL (KB, MAKE – PERCEPT – SENTENCE
(Percept t)
Action ← ASK (KB, MAKE – ACTION – QUERY (
TELL (KB MAKE – ACTION – SENTENCE (action
t))
T = ++1
Return action
|
Fig: - A
generic knowledge base agent
Figure shows the outline of a
knowledge best agent program. Like all our agents it text a percept as I/P and
returns an action. The agent Montana a Knowledge Base (KB) which may initially
content some background knowledge base what it perceives, second, it asks the
knowledge base what action should perform. In the process of answering this
query, extensive reasoning may be done about the current state of the world,
about the outcomes of possible action sequences and so on. Third, the agent
recorders its choice with tell and executed the action.
Formal Logic Connectives Syntax, Semantics
Syntax
- Rules for
constructing legal sentences in the logic
- Which
symbol we can use
- How we are
allowed to combine symbols
-
Propositions
- Connective
and, or, not,
implies, if (
)
Semantics
-
How we interpret (read) sentences in the logic
-
Assign a meaning to each sentences
-
Use true the table to work out the truth of statement
Semantic Network
Figure:
The idea behind the semantic
network is that knowledge is often best understood as a set of concept that are
related to one another. The meaning of a concept is defined by its relationship
to another concept. A semantic network consist of a set of node that are
connected by labeled arcs. The nodes represent concepts and the arcs represents
relations between concepts.
Common Sematic Relations
INSTANCE
X
is an INSTANCE of Y, if X is a specific example of the general concept Y.
ISA
X
ISA Y, if X is a subset of the more general concept Y e.g.: - sparrow ISA bird.
Haspart
X
has part Y, if the concept Y is a part of the concept X. e.g.: sparrow has part
tail.
- Semantic Tree
A
semantic tree is a representation that is a semantic net I which shorten links
are called branches. Each branch connects two node. The head node is called
parent node and tail node is called child node. One node has no parent; it is
called the root node. Other nodes have exactly one parents. Some nodes have no
children; they are leaf node when two nodes are connected to each other by a
chain of two or more branches one is set to be the ancestor; the other is set
to be the descendent.
- Inheritance
Inheritance
is a key concept in semantic n/w and can be represented naturally by following
ISA link. In general, if concept X has property P, then all concepts that are a
subset of X should also have property P. In practice, inherited properties are
usually treated has default values. If a node has direct link that contradicts
inherited property, then the default is over rider.
- Multiple Inheritance
Ø
Multiple inheritance allows an object to
inherit properties from multiple concept
Ø
Multiple inheritance can sometime allow
an object to inherit conflicting properties.
Ø
Conflicts are potentiallyunatonable so conflict
resolution strategies are needed
Predicate Calculus (Predicate Logic)
In
mathematical logic, predicate logic is generic turn for symbolic formal systems
like first order logic, second order logic or many sorted logic. This formal
system is distinguished from other system in that its formula content variables
which can be quantified. Two common quantifies are existential ᴲ (“There
exist”) and universal U (“for all”) quantifies. Predicate calculus symbols may
represent either Constance variable, function, predicate. Constance name
specific objects are properties in the domain of this coursed. Thus tree tall
and blue are examples of well form constant symbols. The constant true and false
are included. Functions denote mapping of one or more elements in a set called
the domain of the function. In to a unique element of another set. Elements of
the domain and range are objects in the old of discourse. Every function
symbols have an associated entity indicating the number of element in the
domain mapped on to each element of range.
Predicate
logic uses three additional notation they are
i) Predicate
A predicate is a relation that
binds two items together for example: Krishna like apple. Know we can write
like (Krishna, like apple) where like is predicate that links two items Krishna
and Apple.
Thus predicate can be
generalized as like X, Y where X and Y are the variable it means X likes Y
ii) Terms (Literals)
Terms are arguments in a
predicate logic example Ravi’s father is Ranis father that is father (father
iii) Quantifiers
A quantifiers is a symbol that
permits to declare or identify the range or scope of variables in a logical
expression. There are two types of quantifiers they are
-
Universal quantifiers
-
Existential quantifiers
- Universal Quantifiers
If
A is a variable the ¥a is read as
i)
for all A
ii)
for each A
iii)
for every
- Existential Quantifiers
If B is a variable then ϶b is
read as
i)
there exist B
ii)
for some B
iii)
for at histone B
Resolution
Robinson
in 1965 introduce the resolution principle which can be directly apply to any
set of clues. The principle is given any two clues A and B, if there is lateral
Bin A and which has complementary term >p in B, delete P from A and B an
construct a new close of the remaining clues. The clues so constructed is
called “resolving of A and B”.
Substitution
Resolution
works on the principle of identifying complementary literals in two clues a
deleting then there by forming a new literal. The process is simple an state
forward where are variables the problem becomes complicated and there is
necessary to make proper substitution.
There
are three major types of substitution
-
Substitution of variable by a constant
-
Substitution of variable by another variable
-
Substitution of variable by function that does not have same variable
Unification
In
prepositional logic it is easy to determine that how literals cannot both be
tree at the same time for example: man (John) &Ʌ man (john) thus
in order to determine contradiction win need a machine procedure that compares
two literals at discourse where their exist a set of substitution that made
them identical there is a state forward recursive procedure called unification
algorithm. The basic idea of unified two literals we fast check if their
initial predicate symbols are the same. If so we can processed otherwise there
is no way to unified regard less of their arguments.Suppose we want to unify an
expressions P(K,Y) & P(K,Z) here the predicate is same so we can unify by
substituting Z by Y.
Frame
Frame
is a collection of attribute slots and associated values that describe some
real word entity. Frames on their own are not particularly help full but frames
systems are powerful way of encoding information to reasoning process. A frame
structure provides facilities for describing objects facts over situation
procedure on what to do when a situation is encounter.
Types of Frames
- Declaration Frame: - A
frame that contains description about an object is called a declarative frame.
The computer center frame describable it a typical example of subscribe frame
- Procedural Frame: - It
is possible to have procedural knowledge represented in a frame. Such frame
which have procedural knowledge embedded in it are called procedurals frames.
The procedural frames as following slots
a) Actor Slots: - It
holds information about who is performing the activity
b) Object Slots: - This
slots as information about the item to perform on
c) Source Slots: - Source
slots holds information from where the action as to end
e) Task Slots: - This
generates the necessary sub slots required to perform the operation
Approach to Knowledge Representation: - A
good system for knowledge representation should passes the following property
- Representation Adequacy: -
The ability to represent all kinds of knowledge that are needed in that domain
- Interracial Adequacy: -
The ability to manipulate the representation structure in such a way as to
derive new structures of new knowledge inference form old.
- Acquisitioned Efficiency: - The
ability to acquire the new information easily. The simplex case involves direct
insertion by a person as new knowledge in to the knowledge base.
- Inferential Efficiency: - The
ability to incorporate into the knowledge structure additional information that
can use to fours the attention of the inference mechanism in most per mistingdirection
Knowledge
Representation Technique
(a) Simple relational knowledge: -
The simple way of storing facts page to use a simple relational method where
each fact about a set of object which set at systematically in columns. This
representation gives little opportunityfor inference but it can be used as
knowledge bases for inference engine.
(b)Inheritable knowledge: - Relational
knowledge is made up of constitute of institute and cross ponding associated
values we extend the base more by allowing inference mechanism for property in
heritance is used. In property inheritance of a class.
(c)Inferential knowledge: - In
inferential knowledge logic knowledge is represented as formal for example all
dogs have tell an in formal logic it is return as
Advantage
-
A set of strict rule
-
Can be used to derive
-
Make
-
Popular in AI system
(d) Procedural knowledge: -It
is also called operational knowledge which specifies what to do when. In this
control information is necessary to use the knowledge in embedded in the
knowledge base itself
Unit 4
Inference and Reasoning
State Space Representation Technique: - A
set of all possible states for a give problem is known as state space of the
problem. For example let us consider us consider an 8 tiles puzzle game. The
puzzle consist of a squire frame contenting at tiles and an empty slot. The
tiles are number from 1 to 8. It is possible to move the tiles in the squire field
by moving a tile in to the empty slot. The objective is to get the squire in a
numerical order
Rules: - The
operator for this problems are
Up: - If the heal is not
touching the top frame move it up.
Down: - If
the heal is not touching the bottom frame move it down.
Left: - If
the heal is not touching the left frame move it left.
Right: - If
the heal is not touching the Right frame move it right.
Figure
The state space is a directed
graph with all the state has nodes. A node is set to be existed if it is
possible to up tent it form the initial state by application of a set of
operators. A small fragment of state space for the 8 tile puzzle game as soon
above.
State space representation are
highly perinatal in AI because they provide all possible states operations and
the goal. If the entire state space representation for a problem it’s given it
is possible trace the part from the initial state to the goal state and
identifies the sequence of operators. The major disadvantage of this method is
that it is not possible to visualize all states for a given problem. More ever,
the resources of the computer system are limited to handle huge state space
representation.
Heuristic Search
Breath
first searching is a uniforms search because they do not have any domain
specific knowledge. Heuristics are approximations use to minimize the searching
process. The process of searching can be drastically reduced by the use of
heuristic. Generally two categories of problems are heuristic
-
Problem for which no exact algorithms are known and one needs to find an
approximation and satisfying solution
-
Problem for which exact solution is known but computationally in fusible.
The heuristic which are needed
for serving problems are generally represented as a heuristic function which
maps the problem state in to numbers. This numbers are then approximately used
to guide search. The following algorithm make use a drastic evaluation function
- Hill Climbing Search: - This
algorithm is also called discrete optimization algorithm which uses a simple
heuristic function to calculate the amount of distance the node is from the
goal. In fact there is no different between hill climbing search and deft
search except that the children of the node that has been expended are shorted
by remaining distant
Algorithm
- Put the initial list on
start
-
If start = empty or start = goal terminate search
-
Remove the first node from the start called this node A
-
If A = goal terminate search with success
-
If node has a successor generate all of them. Find out how far they are from
the goal node sort they by remaining distance from the goal and at them to the
- Best First Search: - This
is also heuristic search the heuristic function used here are called evaluation
function each and indicates how far the node is from the goal node. Goal node
have an evaluation function value of O (Zero)
It is explained using a search
give above. First the start node is expended. It has three children A, B and C
with evaluation function 3, 6 and 5 respectively. These values approximately
indicate how far they are from the goal node. The child with minimum value ‘A’
is chosen. The children’s of ‘A’ are generated. They are ‘D’ and ‘E’ with evaluation
function 9 and 8 with evaluation at. The search process has how four node to
search that is the node ‘D’ with evaluation function 9, ‘E’ with 8, ‘B’ with 6
and ‘C’ with 5 where ‘C’ has got the minimum value which is expanded to give
node ‘H’ which value is 7. At this point the node available for search are (D:
9), (E: 6) (H: 7)
Algorithm
-
Put the initial node on a list START
-
If START empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successes generate all of them find out how far they are
from the goal node. Short all the child generated so far by the remaining
distance from the goal
-
Replace start with START
-
Go to step 2
- A* Search (Aversa Search): - In
best first search we brought in a heuristic value called evaluation function
value. It is a value that estimates how far a particular estimate node is from
the goal node. A part from the evaluation function value one can also bring
that is cost function. Cost function indicates how much resources take time
energy money etc. has been spent in reading a particular node from the start.
If it is possible for one to obtain the evaluation values and cost function
values the A* algorithm can be used.
Algorithm
-
Put the initial node unless START
-
If START = empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successor generate all of them. Estimate the fitness
number (The sum of evaluation function and cost along the reading to that state
is called fitness number) of the successes by totaling the evaluation function
values and cost function value. Short the list by fitness number
-
Need the new list as START 1
-
Replace start with START 1
-
Go to step 2
AO* Search
Game Playing in AI: - There
are two major components in game playing they are
i) Plausible Move Generator: - If
we are to employee a simple move generator then it might not be possible to
examine all the states. Has it is essential that only very selected moves or
pats the examine for this purpose only one has a flexible move generator that
expends are generates only selected moves
ii) Static Evaluation Function
Generator: - This
is the most important components of the game playing program. Based on
heuristic this generates the static evaluation function value for each and
every move that is being made. The study evaluation function gives a snapshot
of a particular move. More the static evaluation function value more in the possibility
for victory. The basic method available for game playing are
- Min – Max Strategy: - Min
– max strategy is a simple strategy for two person gene playing. Here players
are called maximizer and minimizer both are opponent to each other. Maximizer
and minimizer fights it out to see that the opponent get minimum benefit and
they get the maximum benefit. The play sable move generator generate necessary
for the farther evaluation and the static evaluation function ranks each of the
position
Figure
Let AB the initial state of the
game, the plausible move generator generates children’s for that move and the
static evaluation function generate assign the value given along with each of
the state. It is assume that that the static evaluation function generators
returns a value from – 20 to +20 where a value of +20 indicates a win for
maximizer and a value of -20 indicates a wine for minimizer makes first move
the maximizer always tries to go the position where the static evaluation
function value is maximizer positive value.
The maximizer being the player
to make the first move will to node D because static evaluation function value
of that maximum node. If the minimizer has to move he will go node be because
the static evaluation function value for that node is minimum
Figure
Fig:
- game tree explained by two level their association static evaluation function
value but a game playing strategy never stops with one level but loops a head
that is move a couple of levels down ward to those the optimal movies
Let’s examines this with the
help of above fig: Let’s assume that it is the maximizer who will to play first
floated by minimizer. Before the maximizer move to N, O, P he will have to
thing which move would be highly beneficial to him. It maximizer move to N next
will be minimizer term. The minimizer always this to other and he will move to
are (static evaluation function value = -6) this value is backed off to N.
If M move to O, then the minimizer
will move to V, which is the minimum of +4, +7 and 0 so, the value of 0 is
backed up as 0. Similarly the value of P will backed of -3.
The maximizer will know have to
choose between M, N, O, and P with the value of -6, 0 and -3. Being a maximizer
he will choose node 0 because if provides the maximize value corresponding to
other
- Min – Max Strategy with alphabet cut –
offs: -
Figure:
-
This is the modified version of
min max strategy algorithm where two threshold value are maintain for features
expansion. One threshold value is called alpha, which is lower bound on the
value the maximizer can be originated and other is beta (P) which represent the
upper bound of the value the minimizer can be assigned.
In this figure the maximizer has
to play first floated by the minimizer as done in min – max strategy. The
maximizer assign A value of 6 at Q (minimum at the values sand t). This values
is backed up P so the maximizer as assured of A value of 6 when he move to Q.
Now let see what happened at R. The value at V is -2 and U is unknown. Since,
the move is minimizing 1 by moving to R, P can get only A value of -2 or less
that is unacceptable for P because by moving to Q he is assured of value up 6 hence
he will never tries move other than children of R
Role of Alpha (α)
Figure: -
For P the maximizer A value of 6
is assured by moving a node Q. this value P is compared with that of value at
R, P be the maximizer could flow any path which value is greater than 6. Hence,
this value of 6 being the least at a maximizing move and set as value of α.
This value of alpha is now used as reference point. Any node which value is
greater than alpha is acceptable and all the node which values are less than
alpha is rejected.
Role of Beta (β)
Figure: -
In this figure is the minimizer
and the path for extension are chosen from values at the leaf node. Since 5 and
T are maximizer the maximum value of their children are back up as static
evaluation function value. Node Q being minimizer always moves to 5 rather than
T. the value at 5 (6) is not we used by Q as a reference point. The value is
called β is acceptable and values more than β are seldom.
Bayesian Networks
-
Bayesian networks also known as Bayes Nets, Belief Nets cause nets and
probability nets, are a space efficient data structure for encoding all of the
information in the full joint probability distribution for the set of random
variables defining a domain
-
Represents all of the direct causal relationships between variables
-
In punitively to construct a Bayesian net for a given set of variables draw are
from cause variables to immediate effects.
-
Space efficient because it exploits the fact that in many real world problem
domains the dependencies between variables are generally local, so there are a
lot of conditionally independent variables
-
Captures both qualitative and quantitative relationships between variables
-
Can be used to reason: -
i)
Forward (top – down) from causes to effects predictive reasoning (aka causal
reasoning)
ii)
Backward (bottom – up) from effects to causes diagnostic reasoning
-
Formally a Bayesian Net is a directed a cyclic graph (DAG) where is a node for
each random variable and a directed are from A to B whenever A is a direct
causal influence
-
Each node A in a net is conditionally independent of any subset of nodes that
are not descendant of a given the parents of A.
Case based Reasoning: - In
case based reasoning the cases are stored and accessed to solve a new problem.
To get a prediction for a new example, these cases that are similar or close to
the new example this is at one extreme of the learning problem where unlike
decision trees and neural networks relatively little work must be done offline
and virtually all of the work is performed at query time.
Case based reasoning can be used
for classification and regression. It is also applicable when the cases are
complicated, such as in legal cases where the cases are complex legal rulings
and in planning, where the cases are previous solutions to complex problems
If the cases are simple one
algorithm that works well is to use the k – nearest neighbors for some given
number K. given a new example the K training examples that have the input
features closest to that example are used to predict the forget value for the
new example.
The prediction can be the mode
average or some interpolation between the predication of these k. training
examples perhaps weighting closer examples more than distant examples.
For this method to work a
distance metric is required that measures the closeness of two examples. First
define a metric for the domain of each feature in which the values of the
features are converted to a numerical scale that can be used to compare values.
Unit 5
Machine Learning
Learning: - The
process of knowledge as equation is called learning. There are various types of
learning.
- Rote Learning (Learning by
Memorizations): - Knowledge a equation itself includes many
different activities. Simple storing of computing information or rote learning
is the most basic learning activities may computer programs examples database
systems can be used to learn in this sense slough most people could not called
such simple storage as learning however many IT programs rote learning
techniques. When a computer stored a paces of data it is performing a rote
learning such learning are used full for improving the performance of the
systems.
- Learning by Analogy
a) Transformational Analogy
Suppose
we are asked to prove theorem in plane geometry we might look for a previous
theorem that is very similar and copies its proof, making substitution when
necessary. The idea is to transform a solutions to a previous problem into a
solutions for the current problem such learning is called learning by
transformation analogy.
The example for transformational
analogy is five below
Figure:
-
b) Derivational Analogy
Figure:
-
Transformation analogy if does
not look at how the old problem was solved it look at the final solution after
the twist and terms in solving an old problem are relevant to solving a new
problem. The detail history of problem solving is called its derivation
analogical reasoning that tables these histories in to account is called
derivational analogy.
Explanation Based Learning (EBL): - An
explanation based learning system accepts and example (i.e. training example)
an explains what it learns from the example. The EBL system takes only the
relevant aspects of the training. These explanations is translated in to
particular form that a problem solving program can understand so that it can
used to solve other problem
We can think EBL program as
specifying the following input.
-
A training example: - what the training program size in the world.
-
A goal concept: - A high level description of which the problem is supposed to
known
-
A operationally (
): - A description of which concept are useable
-
A domain theory: - A set of groups that gives the relationship between the
activities between domains
Inductive Bias Learning: - A
major problem in machine learning is that of inductive bias how to choose a
learners hypothesis space so that it is large enough to contain a solution to
the problem being learnt yet small enough to ensure reliable generalization
from reasonably sized training sets. Typically such bias is supplied by hand
through the skill and insights of experts. In this paper a model for
automatically learning bias is investigated. The central assumption of the
model is that the learner is embedded within an environment of related learning
tasks.
Within such an environment the
learner can sample from multiple tasks and hence it can search for a hypothec
is space that contains good solutions to many of the contains on the set of all
hypothesis spaces available to the learners we show that a hypothesis space
that performs well on a sufficiently large number of training tasks novel task
in the same environment. Explicit bounds are also derived demonstrating that
learning multiple tasks can potentially give much better generalization than
learning a single task.
Genetic Algorithms: - This
is an introduction to genetic algorithm methods for optimization. The
continuing price/performance improvements of computational systems has made
them attractive for some types of optimization. In particular genetic
algorithms work very well on mixed. Combinational problems. But they tend to be
computationally expensive. To use a genetic algorithm you must represent a
solution to your problem as a genome. This presentation outlines some of the
basics of genetic algorithms. The three most important aspects of using genetic
algorithms are
-
Definition of the objective function
-
Definition and implementation of the genetic representation and
-
Definition and implementation of the genetic operators
Once these three have been
defined the generic algorithm should work fairly well. Beyond that you can try
many different variations to improve performance find multiple optima or
parallelize the algorithms.
Application of AI
Export System: - Export
system are knowledge intensive programs that solve problem in a domain that
require considerable amount of technical information the Brattice computer
society community of the specialist prove on export system as formed the
following generation
-
The embodiment within a computer of a knowledge based component from on export
skill in such a form that the machine can offers that intelligence take
intelligence design about of the specification.
A desirable additional characteristics
which may regard fundamental each the capability of the system on demand to
justified its own line of reasoning in a manner directly to the enquire
Characteristics Expert System (CES)
Following
are the different characteristics expert system
-
They should solve difficult problem in a domain as good as or better than on
expert
-
They should process vast quantities of domain specific knowledge in the detail
-
These system promote the use of heuristic search process. It must be cleared
that brought search techniques are in practical and to managed the problem
heuristic search procedure process the management
-
They explain why they question and justify their confusion. Explanation
facilities enhance treatability system in the mind of human
-
They accept advice modify update and expand
-
They communicate with the users in their own natural language
-
They provides extensive facility part simply processing greater than numeric
processing
Goal in Problem Solving
Introduction: - "Developing
computers programs to solve complex problems by the application of processes
that are analogous to human resourcing process"
AI is the ability of a program
to perform the same kinds of functions that characterize human thoughts which
includes.
i) Systems
that thinks like human
ii) Systems
that thinks acts like human
iii) Systems
that thinks think rationally
iv) Systems
that thinks acts rationally
i) Systems that thinks like humans: - This
requires getting inside of the human mind to see how it works and then
comparing our computer programs to this. This is what cognitive science afferents
to do. An others way to do this is to observe a human problems solving and rogue
that one's programs go about problem solving in similar way.
ii) Systems that act like human: - To
be considered intelligent a program must be able to act sufficiently like a
human to fool an interrogator. The machine and the human are isolated from the
person carrying out the test and messages are exchanged via a keyboard and
screen. If the person cannot distinguish between the computer and the human
being then the computer must be intelligent.
iii) System that think rationally: - For
example all computers use energy. Using energy always generates heat. Therefore
all computers generate heat. This initiates the field of logic. Formal logic
was developed in the lot nineteen century. This was the first step forwards
enabling computer programs to reason logically.
iv) System that act rationally: - Acting
rationally means acting so as to achieve one's goals given one's beliefs. An
agent is just something that perceives and acts. In the logical approach to AI
the emphasis is on correct inferences.
Function of AI
- Philosophy: - Logic methods of
reasoning mind as physical system foundations of Learning, Language, and
Rationality.
- Mathematics: - Formal representation
and proof algorithm, computation, decidability, tractability, probability.
Philosophers staked out most of the important ideas of AI but to move to a
formal science requires a level of mathematics formulism in three main areas
computation logic and probability.
- Economics: - Utility decision theory
- Neap Science: - Physical substrate
for mental activity
- Psychology: - Phenomena of perception
and motor control, experimental techniques. The principle characteristic of
cognitive. Psychology is the brain processes and process information.
- Computer Engineering: - Building fast
computers
- Control Theory: - Design systems that
maximize an objective function over time
- Linguistics: - Knowledge
representation grammar having a theory of how human successfully process
natural language is an AI complete problem if we could solve this problem then
we would have created a model of intelligence.
Application area of an AI: - Today's AI
systems have been able to active limited success in some of these tasks.
- In computer
vision the systems are capable of face recognition
- In Robotics
we have been able to make vehicles that are mostly automats.
- In natural
language processing we have systems that are capable of simple machine
translation
- Today's
Expert systems can carry out medical diagnosis in a narrow domain
- Speech
understanding systems are capable of recognizing several thousand words
continuous speech
- Planning
and scheduling systems had been employed in scheduling experiments with the
Hubble Telescope.
- The
Learning systems are capable of doing text categorization into about a 1000
topics
- In games AI
systems can play at the Grand Master level in chess (World Champion) checkers
etc.
What can AI system NOT do yet?
- Understand
natural language robustly (e.g. read and understand articles in a newspaper)
- Surf the
web
- Interpret
an arbitrary visual science
- Learn a
natural language
- Construct
plans in dynamic real time domains
- Exhibit
true autonomy and intelligence
Goal Schemas: - To build a system to
solve a particular problem we need to do four things.
- Define the
problem precisely. This definition must include precise specifications of what
the initial situations will be as well as what final situations constitute
acceptable solutions to the problem.
- Analyze the
problem. A few very important features can have an immense impact on the
appropriateness of various possible techniques for solving the problem
- Isolate and
represent the task knowledge that is necessary to solve the problem.
- Choose the
best problem solving techniques and apply them to the particular problem
i) Search Problem: - It is
characterized by an initial state and a goal state description. The guesses are
called the operators where a single operator transforms a state into another
state which is expected to be closer to a goal state. Here the objective may be
to find a goal state or to find a sequence of operators to a goal state.
Additionally the problem may require finding just any solution or an optimum
solution.
ii) Planning: - The purpose of planning
is to find a sequence of actions that achieves a given goal when performed
starting in a given state. In other words given a set of operator instances
(defining the possible primitive actions by the agent) an initial state
description and a goal state description or predicate the planning agent
computers a plan.
Simple Planning Agent: - The problem – solving agents are able to
plan a head to consider the consequences of sequences of actions before acting.
And a knowledge – based agents can
select actions based on explicit, logical representations of the current state
and the effects of actions
Problem
Solving Agents + Knowledge – based Agents = Planning Agents
Linear Planning: - Basic idea work and
one goal until completely solved before moving on to the next goal planning
algorithm maintains goal stack
i) Implications
- No inter
leaving of goal achievement
- Efficient
search if goals do not interact
ii) Advantages
- Reduced
search space since goals are solved one at a time
-
Advantageous if goals are (mainly) independent
- Linear
planning is sound
Iii) Disadvantages
- Linear
planning may produce sub optional solutions
- Linear
planning is incomplete
Concept of non – linear planning
Use goal set instead of goal
stack. Include in the search space all possible sub goal ordering. Handles goal
interactions by interleaving.
Advantages
- Non –
linear planning is sound
- Non –
linear planning is complete
- Non –
linear planning may be optimal with respect to plan length (depending on search
strategy employed)
Disadvantage
- Larger
search space since all possible goal orderings may have to be considered
- Somewhat
more complex algorithm more bookkeeping
Means – Ends Analysis: - The means –
ends analysis concentrates around the detection of differences between the
current state and the goal state. Once such difference is isolated an operator
that can reduce the difference must be found. However perhaps that operator
cannot be applied to the current state. Hence, we setup a sub – problem of
getting to a state in which it can be applied. The kind of backward chaining in
which the operators are selected and then sub goals are setup to establish the
preconditions of the operators is known as operator sub – goal.
Just like the other problem
solving techniques, means – ends analysis relies on a set of rules that can
transform one problem state into another. However these rules usually are not
represented with complete state descriptions on each side. Instead, they are
represented as left side, which describes the conditions that must be met for
the rule to be applicable and a right side, which describes those aspects of
the problem state that will be changed by the application of rule. A separate
data structure called a difference table indexes the rules by the differences
that they can be used to reduce.
Algorithm: Means – Ends Analysis
- Compare
CURRENT to GOAL. If there are no differences between them, then return.
- Otherwise,
select the most important difference are reduce it by doing the following until
success or failure is signaled
a) Select a
new operator O, which is applicable to the current difference. If there are no
such operators then signal failure.
b) Apply O to
CURRENT. Generate descriptions of two states, O – START a state in which O's
preconditions are satisfied and O – RESULT, the state that would result if O
were applied in O – START
Production Rules Systems: - Since
search is a very important process in the solution of hard problems for which
no more direct techniques are available, it is useful to structure AI programs
in a way that enables describing and performing the search process. Production
systems provide such structures. A production systems consists of:
- A set of
rules each consisting of a left side that determines the applicability of the
rule and a right side that describes the operation to be performed if the rule
is applied.
- One or more
knowledge or databases that contain whatever information is appropriate for the
particular task.
- A control
strategy that specifies the order in which the rules way of resolving the
conflicts that arise when several rules match at once.
i) Forward Chaining Systems: - In a
forward chaining system the facts in the system are represented in a working
memory which is continually updated. Rules in the system represent possible
actions to take when specified conditions hold on items in the working memory
they are sometimes called condition – action rules. The conditions are usually
patterns that must match items in the working memory while the actions usually
involve adding or deleting items from the working memory.
The interpreter controls the
application of the rules, given the working memory, thus controlling the
system's activity. It is based on a cycle of activity sometimes known as a
recognize act cycle. The system first checks to find all the rules whose
conditions hold, given the current state of working memory. It then selects one
and performs the actions in the action part of the rule. The actions will
result in a new working memory and the cycle begins again. This cycle will be
repeated until either no rules fine or some specified goal state is satisfied.
ii) Backward Chaining Systems: - So far
we have looked at how rule based systems can be used to draw new conclusions
from existing data adding these conclusions to a working memory. This approach
is most use full when you know all the initial facts, but don't have much idea
what the conclusion might be.
If we do know what the
conclusion might be, or have some specific hypothesis to test forward chaining
systems may be inefficient. We could keep on forward chaining until no more
rules apply or you have added your hypothesis to the working memory. But in the
process the system is likely to do a lot of irrelevant work adding
uninteresting conclusions to working memory.
iii) My CIN Style Probability and its
Application: - In artificial intelligence, My CIN was an early expert
system designed to identify bacteria causing severe in factions, such as
bacteremia and meningitis, and to recommend antibiotics, with the amount
adjusted for patient's body weight the name derived from the antibiotics
themselves, as many antibiotics have the suffix "MYCIN". The MYCIN
system was also used for the diagnosis of blood clotting diseases.
MYCIN was developed over five or
six years in the early 1970s at Stanford University in Lisp by Edward short
life. MYCIN was never actually used in practice but research indicated that it
proposed an acceptable therapy in about 69% of cases, which was better than the
performance of infectious disease experts who were judged using the same
criteria. MYCIN operated using a fairly simple inference engine, and a
knowledge base rules. It would query the physician running the program via a
long series of simple Yes/No or textual question. At the end it provided a list
of possible culprit bacteria ranked from high to low based on the probability
of each diagnosis, its confidence in each diagnosis probability, the reasoning
behind each diagnosis and its recommended course of drug treatment.
Practical use/Application: - MYCIN was
never actually used in practice. This wasn't because of any weakness in its
performance. As mentioned in tests it output formed members of the Stanford
medical school faculty. Some observers raised ethical and legal issues related
to the use of computers in medicine if a program gives the wrong diagnosis or
recommends the wrong therapy, who should be held responsible?
Unit 2 Intelligence
Introduction of Intelligence: - Artificial
intelligence is concerned with the design of intelligence in and artificial
device. The turn was invented by MC Cathy in 1956.
Artificial intelligence is about
designing system that are as intelligent as human. This view involves trying to
understand human through and an effort to build machines that emulate the human
though process. This view is the cognitive science approach to AI.
Common Sense Reasoning: - Common sense
is ability to analyze the situation best on it context, using millions of
integrated pieces of common knowledge depends on being able to do common sense resining
central part of intelligent behavior.
Example every know that drawing
a glass of water the glass will break and water will spill. However this
information is not obtained by formula or equation. Common sense knowledge
means what everyone knows. Example: -
- Every
person is younger then the person's mother
- People
don't like being repeatedly interrupted
- If you hold
a knife by its blade then the blade may cut you.
- People
generally sleep at right
Agents: - An agent is anything that can
be viewed as perceiving its environment through sensors and acting upon that
environment through actuators
- Human
agent; eyes, and other organs for sensors; hands, legs, mouth and other body
parts for actuators
- Robotic
agent; cameras and infrared range finders for sensors; various motors for
actuators agents and environments
Figure: -
Personality of Agent
Environment Type
- Fully
observable (Vs. partially observable): An agents sensors give it access to the
complete state of the environment at each point in time
-
Deterministic (Vs. stochastic): The next state of the environment is completely
determined by the current state and the action executed by the agent.
- Episodic (Vs.
sequential): The gent's experience is divided into atomic "episodes",
and the choice of action in each episodes depends only on the episode itself
- Static (Vs.
dynamic): The environment in unchanged while an agent is deliberating. (The
environment is semi dynamic if the environment itself does not change with the
passage of time but the agent's performance score does)
- Discrete (Vs.
continuous): A limited number of distinct clearly defined percepts and actions.
Agent Types
Four basic types in order of
increasing generality
- Simple
reflex agents
- Model based
reflex agents
- Goal based
agents
- Utility
based agents
- Simple Reflex Agents: - The agent
select an action best on the current precept ignoring the rest of the precept
history
Figure: -
Simple Reflex Agent
- Model Based Reflex Agent: - The agent
decides its actions best on of predefined set of condition action rules. For
e.g.: - a telephone operator answering machine
Figure: -
Model based reflex agent
- Goal based Agent: - The agent decides
its action best on a known a goal. For e.g.: - a GPS system finding a path to
certain destination
Figure: -
Goal Based Agent
Unit 3
Knowledge Representation
Knowledge Representation and Reasoning: - Intelligent
should have capacity for
- Receiving: - That is representing its
understanding of the world
- Knowledge Representation: - That is
representing its understanding of the world
- Reasoning: - That is inferring the
implications of what it knows and of the choices ithas.
- Acting: - That is choosing what it
want to do and carry it out.
Representation of knowledge and
the reasoning process are central to the entire field of artificial intelligent.
The primary component of a knowledge best agent is its knowledge base. A
knowledge best is a set of sentences. Each sentence is expressed in a language.
Sentences represent some assertion about the world. There must be mechanisms to
derive new sentences from old sentences. This process is known as inference or
reasoning. Inference must obey primary requirement that the new sentences
should follow logically from the previous one.
Approaches to knowledge Representation: - A
good system for the representation knowledge in a particular dement should
possess the following properties
-Representational Adequacy: - The
ability to represent all of the kinds of knowledge that are needed in that
domain.
-Inferential Adequacy: - The ability to
manipulate the representation structures in such a way as to derive new
structure cross ponding to new knowledge inferred from old.
- Inferential Efficiency: - The ability
to incorporate in to the knowledge structure additional information that can be
used to focus the attention of the inference mechanism in the most promising
direction.
- Inquisitional Efficiency: - The
ability to acquire new information easily. The simplest case involve direct
instruction of new knowledge into the database.
Logic: - Logic is the primary vehicle
for representing and resuming about knowledge. The advantage of using formal
logic as a language of AI is that it is price and deferent. These allows
program to be written which are declarative. This however leads to seven
limitation. Clearly a large person of the reasoning carried out by human depended
on handling knowledge that is on certain. Logic cannot represent this uncertainty
well. Similarly natural language resurging require inferring hidden state like
the intention of the speaker.
A logic consist of two parts, a
language and method of measuring. The logical language intern as two aspects,
syntax and semantics. They are
- Syntax: - The atomic symbols of the
logical language and the rules for constructing well formed a non-atomic expression
of the logic. Syntax specifies the symbols in the language and how they can be
combined to form sentences.
- Semantics: - The meanings of the
symbol of the logic, and rules there for demining the meaning of non – atomic
expression of the logic. It specifics what facts in the world a syntax refers
to. A fact is a claim about the world and may be true or false some popular
logics are propositional logic, first order predicate logic high order
predicate logic and fuzzy logic.
- Propositional Logic: - In PropositionalLogical
(PL) and user defines a set of propositional symbols like P&Q. User defines
the semantics for each of these symbol. For e.g.: -
P means
"It is hot"
Q means
"It is humid"
R means
"It is raining"
- A symbol
- If S is a
sentence than "~" is a sentence, where "~" is the not
logical operator?
- If sand PR
sentences then (S˅T), (S˄T) (S→T) and (S<→T) are also sentences for e.g.: -
(P˄Q)→R
It is hot and
humid then it is raining
Q→P
If it is
humid then it is hot R It is raining
- Given the
truth value of all of the constituent symbol in a sentence that sentence can be
content the value true or fails. This is called an inter pretention of the
sentence
- A model is
an inter pretention of a set of sentences such that each sentence is true. A model
is just a formal mathematical structure that stands in for the world.
- A valid
sentence (also called as tautology) is a sentence that is true under all inter
pretention. Hence no matter what the world is actually like or what the
semantic is the sentence is true.
- An
inconstant sentence (called on satisfy able or a contradiction) is a sentence
that is false under all inter reaction. Hence the world is never like that it
describes
First Order Logic
Syntax: - Syntax are symbol users the
symbols or alphabet be aware that there are all sorts of solidly different ways
to define first order logic
a) Alphabet: - There are different
types of symbols they are
- Logical Symbol: - These are symbols
that have a standard meaning like AND, OR, NOT, ALL, EXIT, IMPLIES if FALSE,
TRUE etc.
- Non Logical Symbol: - They are one
dimensional array two dimensional array N dimensional array functions (1 ary 2
array …….. n …….ary) variables etc.
b) Terms: - A term is either and
individual constant or a variable are any function applied to a terms.
c) Atomic Formula: - An atomic formulae
is either false are an n dimensional array predicate applied to ‘n’ terms
d) Literals: - A literals is either an
atomic formula (Positive literal) or the negation of an atomic formula (a negative
literals) a ground literal is avariable free literal
e) Clauses: - Clause is a disjunction
of literals a ground cause is a variable free clause a Horn clause is a clause
with at most one +ve literal a definite is a hornclause with exactly one +ve literal
Logical Agents
In logical agents we design
agents that can form representation of the world, use a process of in France to
derive new representation about the world and use these new representations to
reduce what to do?
- Knowledge
base agent the central component of knowledge base agent is its knowledge base.
A knowledge base is a set of sentences. Each sentence is expressed in a
language called a knowledge presentation language and represents some accretion
about the world.
|
Function: - KB – AGENT (percepts) return
an action
Static: - KB, a knowledge base t, a
counter initially 0.
TELL (KB, MAKE – PERCEPT – SENTENCE
(Percept t)
Action ← ASK (KB, MAKE – ACTION – QUERY (
TELL (KB MAKE – ACTION – SENTENCE (action
t))
T = ++1
Return action
|
Fig: - A
generic knowledge base agent
Figure shows the outline of a
knowledge best agent program. Like all our agents it text a percept as I/P and
returns an action. The agent Montana a Knowledge Base (KB) which may initially
content some background knowledge base what it perceives, second, it asks the
knowledge base what action should perform. In the process of answering this
query, extensive reasoning may be done about the current state of the world,
about the outcomes of possible action sequences and so on. Third, the agent
recorders its choice with tell and executed the action.
Formal Logic Connectives Syntax, Semantics
Syntax
- Rules for
constructing legal sentences in the logic
- Which
symbol we can use
- How we are
allowed to combine symbols
-
Propositions
- Connective
and, or, not,
implies, if (
)
Semantics
-
How we interpret (read) sentences in the logic
-
Assign a meaning to each sentences
-
Use true the table to work out the truth of statement
Semantic Network
Figure:
The idea behind the semantic
network is that knowledge is often best understood as a set of concept that are
related to one another. The meaning of a concept is defined by its relationship
to another concept. A semantic network consist of a set of node that are
connected by labeled arcs. The nodes represent concepts and the arcs represents
relations between concepts.
Common Sematic Relations
INSTANCE
X
is an INSTANCE of Y, if X is a specific example of the general concept Y.
ISA
X
ISA Y, if X is a subset of the more general concept Y e.g.: - sparrow ISA bird.
Haspart
X
has part Y, if the concept Y is a part of the concept X. e.g.: sparrow has part
tail.
- Semantic Tree
A
semantic tree is a representation that is a semantic net I which shorten links
are called branches. Each branch connects two node. The head node is called
parent node and tail node is called child node. One node has no parent; it is
called the root node. Other nodes have exactly one parents. Some nodes have no
children; they are leaf node when two nodes are connected to each other by a
chain of two or more branches one is set to be the ancestor; the other is set
to be the descendent.
- Inheritance
Inheritance
is a key concept in semantic n/w and can be represented naturally by following
ISA link. In general, if concept X has property P, then all concepts that are a
subset of X should also have property P. In practice, inherited properties are
usually treated has default values. If a node has direct link that contradicts
inherited property, then the default is over rider.
- Multiple Inheritance
Ø
Multiple inheritance allows an object to
inherit properties from multiple concept
Ø
Multiple inheritance can sometime allow
an object to inherit conflicting properties.
Ø
Conflicts are potentiallyunatonable so conflict
resolution strategies are needed
Predicate Calculus (Predicate Logic)
In
mathematical logic, predicate logic is generic turn for symbolic formal systems
like first order logic, second order logic or many sorted logic. This formal
system is distinguished from other system in that its formula content variables
which can be quantified. Two common quantifies are existential ᴲ (“There
exist”) and universal U (“for all”) quantifies. Predicate calculus symbols may
represent either Constance variable, function, predicate. Constance name
specific objects are properties in the domain of this coursed. Thus tree tall
and blue are examples of well form constant symbols. The constant true and false
are included. Functions denote mapping of one or more elements in a set called
the domain of the function. In to a unique element of another set. Elements of
the domain and range are objects in the old of discourse. Every function
symbols have an associated entity indicating the number of element in the
domain mapped on to each element of range.
Predicate
logic uses three additional notation they are
i) Predicate
A predicate is a relation that
binds two items together for example: Krishna like apple. Know we can write
like (Krishna, like apple) where like is predicate that links two items Krishna
and Apple.
Thus predicate can be
generalized as like X, Y where X and Y are the variable it means X likes Y
ii) Terms (Literals)
Terms are arguments in a
predicate logic example Ravi’s father is Ranis father that is father (father
iii) Quantifiers
A quantifiers is a symbol that
permits to declare or identify the range or scope of variables in a logical
expression. There are two types of quantifiers they are
-
Universal quantifiers
-
Existential quantifiers
- Universal Quantifiers
If
A is a variable the ¥a is read as
i)
for all A
ii)
for each A
iii)
for every
- Existential Quantifiers
If B is a variable then ϶b is
read as
i)
there exist B
ii)
for some B
iii)
for at histone B
Resolution
Robinson
in 1965 introduce the resolution principle which can be directly apply to any
set of clues. The principle is given any two clues A and B, if there is lateral
Bin A and which has complementary term >p in B, delete P from A and B an
construct a new close of the remaining clues. The clues so constructed is
called “resolving of A and B”.
Substitution
Resolution
works on the principle of identifying complementary literals in two clues a
deleting then there by forming a new literal. The process is simple an state
forward where are variables the problem becomes complicated and there is
necessary to make proper substitution.
There
are three major types of substitution
-
Substitution of variable by a constant
-
Substitution of variable by another variable
-
Substitution of variable by function that does not have same variable
Unification
In
prepositional logic it is easy to determine that how literals cannot both be
tree at the same time for example: man (John) &Ʌ man (john) thus
in order to determine contradiction win need a machine procedure that compares
two literals at discourse where their exist a set of substitution that made
them identical there is a state forward recursive procedure called unification
algorithm. The basic idea of unified two literals we fast check if their
initial predicate symbols are the same. If so we can processed otherwise there
is no way to unified regard less of their arguments.Suppose we want to unify an
expressions P(K,Y) & P(K,Z) here the predicate is same so we can unify by
substituting Z by Y.
Frame
Frame
is a collection of attribute slots and associated values that describe some
real word entity. Frames on their own are not particularly help full but frames
systems are powerful way of encoding information to reasoning process. A frame
structure provides facilities for describing objects facts over situation
procedure on what to do when a situation is encounter.
Types of Frames
- Declaration Frame: - A
frame that contains description about an object is called a declarative frame.
The computer center frame describable it a typical example of subscribe frame
- Procedural Frame: - It
is possible to have procedural knowledge represented in a frame. Such frame
which have procedural knowledge embedded in it are called procedurals frames.
The procedural frames as following slots
a) Actor Slots: - It
holds information about who is performing the activity
b) Object Slots: - This
slots as information about the item to perform on
c) Source Slots: - Source
slots holds information from where the action as to end
e) Task Slots: - This
generates the necessary sub slots required to perform the operation
Approach to Knowledge Representation: - A
good system for knowledge representation should passes the following property
- Representation Adequacy: -
The ability to represent all kinds of knowledge that are needed in that domain
- Interracial Adequacy: -
The ability to manipulate the representation structure in such a way as to
derive new structures of new knowledge inference form old.
- Acquisitioned Efficiency: - The
ability to acquire the new information easily. The simplex case involves direct
insertion by a person as new knowledge in to the knowledge base.
- Inferential Efficiency: - The
ability to incorporate into the knowledge structure additional information that
can use to fours the attention of the inference mechanism in most per mistingdirection
Knowledge
Representation Technique
(a) Simple relational knowledge: -
The simple way of storing facts page to use a simple relational method where
each fact about a set of object which set at systematically in columns. This
representation gives little opportunityfor inference but it can be used as
knowledge bases for inference engine.
(b)Inheritable knowledge: - Relational
knowledge is made up of constitute of institute and cross ponding associated
values we extend the base more by allowing inference mechanism for property in
heritance is used. In property inheritance of a class.
(c)Inferential knowledge: - In
inferential knowledge logic knowledge is represented as formal for example all
dogs have tell an in formal logic it is return as
Advantage
-
A set of strict rule
-
Can be used to derive
-
Make
-
Popular in AI system
(d) Procedural knowledge: -It
is also called operational knowledge which specifies what to do when. In this
control information is necessary to use the knowledge in embedded in the
knowledge base itself
Unit 4
Inference and Reasoning
State Space Representation Technique: - A
set of all possible states for a give problem is known as state space of the
problem. For example let us consider us consider an 8 tiles puzzle game. The
puzzle consist of a squire frame contenting at tiles and an empty slot. The
tiles are number from 1 to 8. It is possible to move the tiles in the squire field
by moving a tile in to the empty slot. The objective is to get the squire in a
numerical order
Rules: - The
operator for this problems are
Up: - If the heal is not
touching the top frame move it up.
Down: - If
the heal is not touching the bottom frame move it down.
Left: - If
the heal is not touching the left frame move it left.
Right: - If
the heal is not touching the Right frame move it right.
Figure
The state space is a directed
graph with all the state has nodes. A node is set to be existed if it is
possible to up tent it form the initial state by application of a set of
operators. A small fragment of state space for the 8 tile puzzle game as soon
above.
State space representation are
highly perinatal in AI because they provide all possible states operations and
the goal. If the entire state space representation for a problem it’s given it
is possible trace the part from the initial state to the goal state and
identifies the sequence of operators. The major disadvantage of this method is
that it is not possible to visualize all states for a given problem. More ever,
the resources of the computer system are limited to handle huge state space
representation.
Heuristic Search
Breath
first searching is a uniforms search because they do not have any domain
specific knowledge. Heuristics are approximations use to minimize the searching
process. The process of searching can be drastically reduced by the use of
heuristic. Generally two categories of problems are heuristic
-
Problem for which no exact algorithms are known and one needs to find an
approximation and satisfying solution
-
Problem for which exact solution is known but computationally in fusible.
The heuristic which are needed
for serving problems are generally represented as a heuristic function which
maps the problem state in to numbers. This numbers are then approximately used
to guide search. The following algorithm make use a drastic evaluation function
- Hill Climbing Search: - This
algorithm is also called discrete optimization algorithm which uses a simple
heuristic function to calculate the amount of distance the node is from the
goal. In fact there is no different between hill climbing search and deft
search except that the children of the node that has been expended are shorted
by remaining distant
Algorithm
- Put the initial list on
start
-
If start = empty or start = goal terminate search
-
Remove the first node from the start called this node A
-
If A = goal terminate search with success
-
If node has a successor generate all of them. Find out how far they are from
the goal node sort they by remaining distance from the goal and at them to the
- Best First Search: - This
is also heuristic search the heuristic function used here are called evaluation
function each and indicates how far the node is from the goal node. Goal node
have an evaluation function value of O (Zero)
It is explained using a search
give above. First the start node is expended. It has three children A, B and C
with evaluation function 3, 6 and 5 respectively. These values approximately
indicate how far they are from the goal node. The child with minimum value ‘A’
is chosen. The children’s of ‘A’ are generated. They are ‘D’ and ‘E’ with evaluation
function 9 and 8 with evaluation at. The search process has how four node to
search that is the node ‘D’ with evaluation function 9, ‘E’ with 8, ‘B’ with 6
and ‘C’ with 5 where ‘C’ has got the minimum value which is expanded to give
node ‘H’ which value is 7. At this point the node available for search are (D:
9), (E: 6) (H: 7)
Algorithm
-
Put the initial node on a list START
-
If START empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successes generate all of them find out how far they are
from the goal node. Short all the child generated so far by the remaining
distance from the goal
-
Replace start with START
-
Go to step 2
- A* Search (Aversa Search): - In
best first search we brought in a heuristic value called evaluation function
value. It is a value that estimates how far a particular estimate node is from
the goal node. A part from the evaluation function value one can also bring
that is cost function. Cost function indicates how much resources take time
energy money etc. has been spent in reading a particular node from the start.
If it is possible for one to obtain the evaluation values and cost function
values the A* algorithm can be used.
Algorithm
-
Put the initial node unless START
-
If START = empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successor generate all of them. Estimate the fitness
number (The sum of evaluation function and cost along the reading to that state
is called fitness number) of the successes by totaling the evaluation function
values and cost function value. Short the list by fitness number
-
Need the new list as START 1
-
Replace start with START 1
-
Go to step 2
AO* Search
Game Playing in AI: - There
are two major components in game playing they are
i) Plausible Move Generator: - If
we are to employee a simple move generator then it might not be possible to
examine all the states. Has it is essential that only very selected moves or
pats the examine for this purpose only one has a flexible move generator that
expends are generates only selected moves
ii) Static Evaluation Function
Generator: - This
is the most important components of the game playing program. Based on
heuristic this generates the static evaluation function value for each and
every move that is being made. The study evaluation function gives a snapshot
of a particular move. More the static evaluation function value more in the possibility
for victory. The basic method available for game playing are
- Min – Max Strategy: - Min
– max strategy is a simple strategy for two person gene playing. Here players
are called maximizer and minimizer both are opponent to each other. Maximizer
and minimizer fights it out to see that the opponent get minimum benefit and
they get the maximum benefit. The play sable move generator generate necessary
for the farther evaluation and the static evaluation function ranks each of the
position
Figure
Let AB the initial state of the
game, the plausible move generator generates children’s for that move and the
static evaluation function generate assign the value given along with each of
the state. It is assume that that the static evaluation function generators
returns a value from – 20 to +20 where a value of +20 indicates a win for
maximizer and a value of -20 indicates a wine for minimizer makes first move
the maximizer always tries to go the position where the static evaluation
function value is maximizer positive value.
The maximizer being the player
to make the first move will to node D because static evaluation function value
of that maximum node. If the minimizer has to move he will go node be because
the static evaluation function value for that node is minimum
Figure
Fig:
- game tree explained by two level their association static evaluation function
value but a game playing strategy never stops with one level but loops a head
that is move a couple of levels down ward to those the optimal movies
Let’s examines this with the
help of above fig: Let’s assume that it is the maximizer who will to play first
floated by minimizer. Before the maximizer move to N, O, P he will have to
thing which move would be highly beneficial to him. It maximizer move to N next
will be minimizer term. The minimizer always this to other and he will move to
are (static evaluation function value = -6) this value is backed off to N.
If M move to O, then the minimizer
will move to V, which is the minimum of +4, +7 and 0 so, the value of 0 is
backed up as 0. Similarly the value of P will backed of -3.
The maximizer will know have to
choose between M, N, O, and P with the value of -6, 0 and -3. Being a maximizer
he will choose node 0 because if provides the maximize value corresponding to
other
- Min – Max Strategy with alphabet cut –
offs: -
Figure:
-
This is the modified version of
min max strategy algorithm where two threshold value are maintain for features
expansion. One threshold value is called alpha, which is lower bound on the
value the maximizer can be originated and other is beta (P) which represent the
upper bound of the value the minimizer can be assigned.
In this figure the maximizer has
to play first floated by the minimizer as done in min – max strategy. The
maximizer assign A value of 6 at Q (minimum at the values sand t). This values
is backed up P so the maximizer as assured of A value of 6 when he move to Q.
Now let see what happened at R. The value at V is -2 and U is unknown. Since,
the move is minimizing 1 by moving to R, P can get only A value of -2 or less
that is unacceptable for P because by moving to Q he is assured of value up 6 hence
he will never tries move other than children of R
Role of Alpha (α)
Figure: -
For P the maximizer A value of 6
is assured by moving a node Q. this value P is compared with that of value at
R, P be the maximizer could flow any path which value is greater than 6. Hence,
this value of 6 being the least at a maximizing move and set as value of α.
This value of alpha is now used as reference point. Any node which value is
greater than alpha is acceptable and all the node which values are less than
alpha is rejected.
Role of Beta (β)
Figure: -
In this figure is the minimizer
and the path for extension are chosen from values at the leaf node. Since 5 and
T are maximizer the maximum value of their children are back up as static
evaluation function value. Node Q being minimizer always moves to 5 rather than
T. the value at 5 (6) is not we used by Q as a reference point. The value is
called β is acceptable and values more than β are seldom.
Bayesian Networks
-
Bayesian networks also known as Bayes Nets, Belief Nets cause nets and
probability nets, are a space efficient data structure for encoding all of the
information in the full joint probability distribution for the set of random
variables defining a domain
-
Represents all of the direct causal relationships between variables
-
In punitively to construct a Bayesian net for a given set of variables draw are
from cause variables to immediate effects.
-
Space efficient because it exploits the fact that in many real world problem
domains the dependencies between variables are generally local, so there are a
lot of conditionally independent variables
-
Captures both qualitative and quantitative relationships between variables
-
Can be used to reason: -
i)
Forward (top – down) from causes to effects predictive reasoning (aka causal
reasoning)
ii)
Backward (bottom – up) from effects to causes diagnostic reasoning
-
Formally a Bayesian Net is a directed a cyclic graph (DAG) where is a node for
each random variable and a directed are from A to B whenever A is a direct
causal influence
-
Each node A in a net is conditionally independent of any subset of nodes that
are not descendant of a given the parents of A.
Case based Reasoning: - In
case based reasoning the cases are stored and accessed to solve a new problem.
To get a prediction for a new example, these cases that are similar or close to
the new example this is at one extreme of the learning problem where unlike
decision trees and neural networks relatively little work must be done offline
and virtually all of the work is performed at query time.
Case based reasoning can be used
for classification and regression. It is also applicable when the cases are
complicated, such as in legal cases where the cases are complex legal rulings
and in planning, where the cases are previous solutions to complex problems
If the cases are simple one
algorithm that works well is to use the k – nearest neighbors for some given
number K. given a new example the K training examples that have the input
features closest to that example are used to predict the forget value for the
new example.
The prediction can be the mode
average or some interpolation between the predication of these k. training
examples perhaps weighting closer examples more than distant examples.
For this method to work a
distance metric is required that measures the closeness of two examples. First
define a metric for the domain of each feature in which the values of the
features are converted to a numerical scale that can be used to compare values.
Unit 5
Machine Learning
Learning: - The
process of knowledge as equation is called learning. There are various types of
learning.
- Rote Learning (Learning by
Memorizations): - Knowledge a equation itself includes many
different activities. Simple storing of computing information or rote learning
is the most basic learning activities may computer programs examples database
systems can be used to learn in this sense slough most people could not called
such simple storage as learning however many IT programs rote learning
techniques. When a computer stored a paces of data it is performing a rote
learning such learning are used full for improving the performance of the
systems.
- Learning by Analogy
a) Transformational Analogy
Suppose
we are asked to prove theorem in plane geometry we might look for a previous
theorem that is very similar and copies its proof, making substitution when
necessary. The idea is to transform a solutions to a previous problem into a
solutions for the current problem such learning is called learning by
transformation analogy.
The example for transformational
analogy is five below
Figure:
-
b) Derivational Analogy
Figure:
-
Transformation analogy if does
not look at how the old problem was solved it look at the final solution after
the twist and terms in solving an old problem are relevant to solving a new
problem. The detail history of problem solving is called its derivation
analogical reasoning that tables these histories in to account is called
derivational analogy.
Explanation Based Learning (EBL): - An
explanation based learning system accepts and example (i.e. training example)
an explains what it learns from the example. The EBL system takes only the
relevant aspects of the training. These explanations is translated in to
particular form that a problem solving program can understand so that it can
used to solve other problem
We can think EBL program as
specifying the following input.
-
A training example: - what the training program size in the world.
-
A goal concept: - A high level description of which the problem is supposed to
known
-
A operationally (
): - A description of which concept are useable
-
A domain theory: - A set of groups that gives the relationship between the
activities between domains
Inductive Bias Learning: - A
major problem in machine learning is that of inductive bias how to choose a
learners hypothesis space so that it is large enough to contain a solution to
the problem being learnt yet small enough to ensure reliable generalization
from reasonably sized training sets. Typically such bias is supplied by hand
through the skill and insights of experts. In this paper a model for
automatically learning bias is investigated. The central assumption of the
model is that the learner is embedded within an environment of related learning
tasks.
Within such an environment the
learner can sample from multiple tasks and hence it can search for a hypothec
is space that contains good solutions to many of the contains on the set of all
hypothesis spaces available to the learners we show that a hypothesis space
that performs well on a sufficiently large number of training tasks novel task
in the same environment. Explicit bounds are also derived demonstrating that
learning multiple tasks can potentially give much better generalization than
learning a single task.
Genetic Algorithms: - This
is an introduction to genetic algorithm methods for optimization. The
continuing price/performance improvements of computational systems has made
them attractive for some types of optimization. In particular genetic
algorithms work very well on mixed. Combinational problems. But they tend to be
computationally expensive. To use a genetic algorithm you must represent a
solution to your problem as a genome. This presentation outlines some of the
basics of genetic algorithms. The three most important aspects of using genetic
algorithms are
-
Definition of the objective function
-
Definition and implementation of the genetic representation and
-
Definition and implementation of the genetic operators
Once these three have been
defined the generic algorithm should work fairly well. Beyond that you can try
many different variations to improve performance find multiple optima or
parallelize the algorithms.
Application of AI
Export System: - Export
system are knowledge intensive programs that solve problem in a domain that
require considerable amount of technical information the Brattice computer
society community of the specialist prove on export system as formed the
following generation
-
The embodiment within a computer of a knowledge based component from on export
skill in such a form that the machine can offers that intelligence take
intelligence design about of the specification.
A desirable additional characteristics
which may regard fundamental each the capability of the system on demand to
justified its own line of reasoning in a manner directly to the enquire
Characteristics Expert System (CES)
Following
are the different characteristics expert system
-
They should solve difficult problem in a domain as good as or better than on
expert
-
They should process vast quantities of domain specific knowledge in the detail
-
These system promote the use of heuristic search process. It must be cleared
that brought search techniques are in practical and to managed the problem
heuristic search procedure process the management
-
They explain why they question and justify their confusion. Explanation
facilities enhance treatability system in the mind of human
-
They accept advice modify update and expand
-
They communicate with the users in their own natural language
-
They provides extensive facility part simply processing greater than numeric
processing
Goal in Problem Solving
Introduction: - "Developing
computers programs to solve complex problems by the application of processes
that are analogous to human resourcing process"
AI is the ability of a program
to perform the same kinds of functions that characterize human thoughts which
includes.
i) Systems
that thinks like human
ii) Systems
that thinks acts like human
iii) Systems
that thinks think rationally
iv) Systems
that thinks acts rationally
i) Systems that thinks like humans: - This
requires getting inside of the human mind to see how it works and then
comparing our computer programs to this. This is what cognitive science afferents
to do. An others way to do this is to observe a human problems solving and rogue
that one's programs go about problem solving in similar way.
ii) Systems that act like human: - To
be considered intelligent a program must be able to act sufficiently like a
human to fool an interrogator. The machine and the human are isolated from the
person carrying out the test and messages are exchanged via a keyboard and
screen. If the person cannot distinguish between the computer and the human
being then the computer must be intelligent.
iii) System that think rationally: - For
example all computers use energy. Using energy always generates heat. Therefore
all computers generate heat. This initiates the field of logic. Formal logic
was developed in the lot nineteen century. This was the first step forwards
enabling computer programs to reason logically.
iv) System that act rationally: - Acting
rationally means acting so as to achieve one's goals given one's beliefs. An
agent is just something that perceives and acts. In the logical approach to AI
the emphasis is on correct inferences.
Function of AI
- Philosophy: - Logic methods of
reasoning mind as physical system foundations of Learning, Language, and
Rationality.
- Mathematics: - Formal representation
and proof algorithm, computation, decidability, tractability, probability.
Philosophers staked out most of the important ideas of AI but to move to a
formal science requires a level of mathematics formulism in three main areas
computation logic and probability.
- Economics: - Utility decision theory
- Neap Science: - Physical substrate
for mental activity
- Psychology: - Phenomena of perception
and motor control, experimental techniques. The principle characteristic of
cognitive. Psychology is the brain processes and process information.
- Computer Engineering: - Building fast
computers
- Control Theory: - Design systems that
maximize an objective function over time
- Linguistics: - Knowledge
representation grammar having a theory of how human successfully process
natural language is an AI complete problem if we could solve this problem then
we would have created a model of intelligence.
Application area of an AI: - Today's AI
systems have been able to active limited success in some of these tasks.
- In computer
vision the systems are capable of face recognition
- In Robotics
we have been able to make vehicles that are mostly automats.
- In natural
language processing we have systems that are capable of simple machine
translation
- Today's
Expert systems can carry out medical diagnosis in a narrow domain
- Speech
understanding systems are capable of recognizing several thousand words
continuous speech
- Planning
and scheduling systems had been employed in scheduling experiments with the
Hubble Telescope.
- The
Learning systems are capable of doing text categorization into about a 1000
topics
- In games AI
systems can play at the Grand Master level in chess (World Champion) checkers
etc.
What can AI system NOT do yet?
- Understand
natural language robustly (e.g. read and understand articles in a newspaper)
- Surf the
web
- Interpret
an arbitrary visual science
- Learn a
natural language
- Construct
plans in dynamic real time domains
- Exhibit
true autonomy and intelligence
Goal Schemas: - To build a system to
solve a particular problem we need to do four things.
- Define the
problem precisely. This definition must include precise specifications of what
the initial situations will be as well as what final situations constitute
acceptable solutions to the problem.
- Analyze the
problem. A few very important features can have an immense impact on the
appropriateness of various possible techniques for solving the problem
- Isolate and
represent the task knowledge that is necessary to solve the problem.
- Choose the
best problem solving techniques and apply them to the particular problem
i) Search Problem: - It is
characterized by an initial state and a goal state description. The guesses are
called the operators where a single operator transforms a state into another
state which is expected to be closer to a goal state. Here the objective may be
to find a goal state or to find a sequence of operators to a goal state.
Additionally the problem may require finding just any solution or an optimum
solution.
ii) Planning: - The purpose of planning
is to find a sequence of actions that achieves a given goal when performed
starting in a given state. In other words given a set of operator instances
(defining the possible primitive actions by the agent) an initial state
description and a goal state description or predicate the planning agent
computers a plan.
Simple Planning Agent: - The problem – solving agents are able to
plan a head to consider the consequences of sequences of actions before acting.
And a knowledge – based agents can
select actions based on explicit, logical representations of the current state
and the effects of actions
Problem
Solving Agents + Knowledge – based Agents = Planning Agents
Linear Planning: - Basic idea work and
one goal until completely solved before moving on to the next goal planning
algorithm maintains goal stack
i) Implications
- No inter
leaving of goal achievement
- Efficient
search if goals do not interact
ii) Advantages
- Reduced
search space since goals are solved one at a time
-
Advantageous if goals are (mainly) independent
- Linear
planning is sound
Iii) Disadvantages
- Linear
planning may produce sub optional solutions
- Linear
planning is incomplete
Concept of non – linear planning
Use goal set instead of goal
stack. Include in the search space all possible sub goal ordering. Handles goal
interactions by interleaving.
Advantages
- Non –
linear planning is sound
- Non –
linear planning is complete
- Non –
linear planning may be optimal with respect to plan length (depending on search
strategy employed)
Disadvantage
- Larger
search space since all possible goal orderings may have to be considered
- Somewhat
more complex algorithm more bookkeeping
Means – Ends Analysis: - The means –
ends analysis concentrates around the detection of differences between the
current state and the goal state. Once such difference is isolated an operator
that can reduce the difference must be found. However perhaps that operator
cannot be applied to the current state. Hence, we setup a sub – problem of
getting to a state in which it can be applied. The kind of backward chaining in
which the operators are selected and then sub goals are setup to establish the
preconditions of the operators is known as operator sub – goal.
Just like the other problem
solving techniques, means – ends analysis relies on a set of rules that can
transform one problem state into another. However these rules usually are not
represented with complete state descriptions on each side. Instead, they are
represented as left side, which describes the conditions that must be met for
the rule to be applicable and a right side, which describes those aspects of
the problem state that will be changed by the application of rule. A separate
data structure called a difference table indexes the rules by the differences
that they can be used to reduce.
Algorithm: Means – Ends Analysis
- Compare
CURRENT to GOAL. If there are no differences between them, then return.
- Otherwise,
select the most important difference are reduce it by doing the following until
success or failure is signaled
a) Select a
new operator O, which is applicable to the current difference. If there are no
such operators then signal failure.
b) Apply O to
CURRENT. Generate descriptions of two states, O – START a state in which O's
preconditions are satisfied and O – RESULT, the state that would result if O
were applied in O – START
Production Rules Systems: - Since
search is a very important process in the solution of hard problems for which
no more direct techniques are available, it is useful to structure AI programs
in a way that enables describing and performing the search process. Production
systems provide such structures. A production systems consists of:
- A set of
rules each consisting of a left side that determines the applicability of the
rule and a right side that describes the operation to be performed if the rule
is applied.
- One or more
knowledge or databases that contain whatever information is appropriate for the
particular task.
- A control
strategy that specifies the order in which the rules way of resolving the
conflicts that arise when several rules match at once.
i) Forward Chaining Systems: - In a
forward chaining system the facts in the system are represented in a working
memory which is continually updated. Rules in the system represent possible
actions to take when specified conditions hold on items in the working memory
they are sometimes called condition – action rules. The conditions are usually
patterns that must match items in the working memory while the actions usually
involve adding or deleting items from the working memory.
The interpreter controls the
application of the rules, given the working memory, thus controlling the
system's activity. It is based on a cycle of activity sometimes known as a
recognize act cycle. The system first checks to find all the rules whose
conditions hold, given the current state of working memory. It then selects one
and performs the actions in the action part of the rule. The actions will
result in a new working memory and the cycle begins again. This cycle will be
repeated until either no rules fine or some specified goal state is satisfied.
ii) Backward Chaining Systems: - So far
we have looked at how rule based systems can be used to draw new conclusions
from existing data adding these conclusions to a working memory. This approach
is most use full when you know all the initial facts, but don't have much idea
what the conclusion might be.
If we do know what the
conclusion might be, or have some specific hypothesis to test forward chaining
systems may be inefficient. We could keep on forward chaining until no more
rules apply or you have added your hypothesis to the working memory. But in the
process the system is likely to do a lot of irrelevant work adding
uninteresting conclusions to working memory.
iii) My CIN Style Probability and its
Application: - In artificial intelligence, My CIN was an early expert
system designed to identify bacteria causing severe in factions, such as
bacteremia and meningitis, and to recommend antibiotics, with the amount
adjusted for patient's body weight the name derived from the antibiotics
themselves, as many antibiotics have the suffix "MYCIN". The MYCIN
system was also used for the diagnosis of blood clotting diseases.
MYCIN was developed over five or
six years in the early 1970s at Stanford University in Lisp by Edward short
life. MYCIN was never actually used in practice but research indicated that it
proposed an acceptable therapy in about 69% of cases, which was better than the
performance of infectious disease experts who were judged using the same
criteria. MYCIN operated using a fairly simple inference engine, and a
knowledge base rules. It would query the physician running the program via a
long series of simple Yes/No or textual question. At the end it provided a list
of possible culprit bacteria ranked from high to low based on the probability
of each diagnosis, its confidence in each diagnosis probability, the reasoning
behind each diagnosis and its recommended course of drug treatment.
Practical use/Application: - MYCIN was
never actually used in practice. This wasn't because of any weakness in its
performance. As mentioned in tests it output formed members of the Stanford
medical school faculty. Some observers raised ethical and legal issues related
to the use of computers in medicine if a program gives the wrong diagnosis or
recommends the wrong therapy, who should be held responsible?
Unit 2 Intelligence
Introduction of Intelligence: - Artificial
intelligence is concerned with the design of intelligence in and artificial
device. The turn was invented by MC Cathy in 1956.
Artificial intelligence is about
designing system that are as intelligent as human. This view involves trying to
understand human through and an effort to build machines that emulate the human
though process. This view is the cognitive science approach to AI.
Common Sense Reasoning: - Common sense
is ability to analyze the situation best on it context, using millions of
integrated pieces of common knowledge depends on being able to do common sense resining
central part of intelligent behavior.
Example every know that drawing
a glass of water the glass will break and water will spill. However this
information is not obtained by formula or equation. Common sense knowledge
means what everyone knows. Example: -
- Every
person is younger then the person's mother
- People
don't like being repeatedly interrupted
- If you hold
a knife by its blade then the blade may cut you.
- People
generally sleep at right
Agents: - An agent is anything that can
be viewed as perceiving its environment through sensors and acting upon that
environment through actuators
- Human
agent; eyes, and other organs for sensors; hands, legs, mouth and other body
parts for actuators
- Robotic
agent; cameras and infrared range finders for sensors; various motors for
actuators agents and environments
Figure: -
Personality of Agent
Environment Type
- Fully
observable (Vs. partially observable): An agents sensors give it access to the
complete state of the environment at each point in time
-
Deterministic (Vs. stochastic): The next state of the environment is completely
determined by the current state and the action executed by the agent.
- Episodic (Vs.
sequential): The gent's experience is divided into atomic "episodes",
and the choice of action in each episodes depends only on the episode itself
- Static (Vs.
dynamic): The environment in unchanged while an agent is deliberating. (The
environment is semi dynamic if the environment itself does not change with the
passage of time but the agent's performance score does)
- Discrete (Vs.
continuous): A limited number of distinct clearly defined percepts and actions.
Agent Types
Four basic types in order of
increasing generality
- Simple
reflex agents
- Model based
reflex agents
- Goal based
agents
- Utility
based agents
- Simple Reflex Agents: - The agent
select an action best on the current precept ignoring the rest of the precept
history
Figure: -
Simple Reflex Agent
- Model Based Reflex Agent: - The agent
decides its actions best on of predefined set of condition action rules. For
e.g.: - a telephone operator answering machine
Figure: -
Model based reflex agent
- Goal based Agent: - The agent decides
its action best on a known a goal. For e.g.: - a GPS system finding a path to
certain destination
Figure: -
Goal Based Agent
Unit 3
Knowledge Representation
Knowledge Representation and Reasoning: - Intelligent
should have capacity for
- Receiving: - That is representing its
understanding of the world
- Knowledge Representation: - That is
representing its understanding of the world
- Reasoning: - That is inferring the
implications of what it knows and of the choices ithas.
- Acting: - That is choosing what it
want to do and carry it out.
Representation of knowledge and
the reasoning process are central to the entire field of artificial intelligent.
The primary component of a knowledge best agent is its knowledge base. A
knowledge best is a set of sentences. Each sentence is expressed in a language.
Sentences represent some assertion about the world. There must be mechanisms to
derive new sentences from old sentences. This process is known as inference or
reasoning. Inference must obey primary requirement that the new sentences
should follow logically from the previous one.
Approaches to knowledge Representation: - A
good system for the representation knowledge in a particular dement should
possess the following properties
-Representational Adequacy: - The
ability to represent all of the kinds of knowledge that are needed in that
domain.
-Inferential Adequacy: - The ability to
manipulate the representation structures in such a way as to derive new
structure cross ponding to new knowledge inferred from old.
- Inferential Efficiency: - The ability
to incorporate in to the knowledge structure additional information that can be
used to focus the attention of the inference mechanism in the most promising
direction.
- Inquisitional Efficiency: - The
ability to acquire new information easily. The simplest case involve direct
instruction of new knowledge into the database.
Logic: - Logic is the primary vehicle
for representing and resuming about knowledge. The advantage of using formal
logic as a language of AI is that it is price and deferent. These allows
program to be written which are declarative. This however leads to seven
limitation. Clearly a large person of the reasoning carried out by human depended
on handling knowledge that is on certain. Logic cannot represent this uncertainty
well. Similarly natural language resurging require inferring hidden state like
the intention of the speaker.
A logic consist of two parts, a
language and method of measuring. The logical language intern as two aspects,
syntax and semantics. They are
- Syntax: - The atomic symbols of the
logical language and the rules for constructing well formed a non-atomic expression
of the logic. Syntax specifies the symbols in the language and how they can be
combined to form sentences.
- Semantics: - The meanings of the
symbol of the logic, and rules there for demining the meaning of non – atomic
expression of the logic. It specifics what facts in the world a syntax refers
to. A fact is a claim about the world and may be true or false some popular
logics are propositional logic, first order predicate logic high order
predicate logic and fuzzy logic.
- Propositional Logic: - In PropositionalLogical
(PL) and user defines a set of propositional symbols like P&Q. User defines
the semantics for each of these symbol. For e.g.: -
P means
"It is hot"
Q means
"It is humid"
R means
"It is raining"
- A symbol
- If S is a
sentence than "~" is a sentence, where "~" is the not
logical operator?
- If sand PR
sentences then (S˅T), (S˄T) (S→T) and (S<→T) are also sentences for e.g.: -
(P˄Q)→R
It is hot and
humid then it is raining
Q→P
If it is
humid then it is hot R It is raining
- Given the
truth value of all of the constituent symbol in a sentence that sentence can be
content the value true or fails. This is called an inter pretention of the
sentence
- A model is
an inter pretention of a set of sentences such that each sentence is true. A model
is just a formal mathematical structure that stands in for the world.
- A valid
sentence (also called as tautology) is a sentence that is true under all inter
pretention. Hence no matter what the world is actually like or what the
semantic is the sentence is true.
- An
inconstant sentence (called on satisfy able or a contradiction) is a sentence
that is false under all inter reaction. Hence the world is never like that it
describes
First Order Logic
Syntax: - Syntax are symbol users the
symbols or alphabet be aware that there are all sorts of solidly different ways
to define first order logic
a) Alphabet: - There are different
types of symbols they are
- Logical Symbol: - These are symbols
that have a standard meaning like AND, OR, NOT, ALL, EXIT, IMPLIES if FALSE,
TRUE etc.
- Non Logical Symbol: - They are one
dimensional array two dimensional array N dimensional array functions (1 ary 2
array …….. n …….ary) variables etc.
b) Terms: - A term is either and
individual constant or a variable are any function applied to a terms.
c) Atomic Formula: - An atomic formulae
is either false are an n dimensional array predicate applied to ‘n’ terms
d) Literals: - A literals is either an
atomic formula (Positive literal) or the negation of an atomic formula (a negative
literals) a ground literal is avariable free literal
e) Clauses: - Clause is a disjunction
of literals a ground cause is a variable free clause a Horn clause is a clause
with at most one +ve literal a definite is a hornclause with exactly one +ve literal
Logical Agents
In logical agents we design
agents that can form representation of the world, use a process of in France to
derive new representation about the world and use these new representations to
reduce what to do?
- Knowledge
base agent the central component of knowledge base agent is its knowledge base.
A knowledge base is a set of sentences. Each sentence is expressed in a
language called a knowledge presentation language and represents some accretion
about the world.
|
Function: - KB – AGENT (percepts) return
an action
Static: - KB, a knowledge base t, a
counter initially 0.
TELL (KB, MAKE – PERCEPT – SENTENCE
(Percept t)
Action ← ASK (KB, MAKE – ACTION – QUERY (
TELL (KB MAKE – ACTION – SENTENCE (action
t))
T = ++1
Return action
|
Fig: - A
generic knowledge base agent
Figure shows the outline of a
knowledge best agent program. Like all our agents it text a percept as I/P and
returns an action. The agent Montana a Knowledge Base (KB) which may initially
content some background knowledge base what it perceives, second, it asks the
knowledge base what action should perform. In the process of answering this
query, extensive reasoning may be done about the current state of the world,
about the outcomes of possible action sequences and so on. Third, the agent
recorders its choice with tell and executed the action.
Formal Logic Connectives Syntax, Semantics
Syntax
- Rules for
constructing legal sentences in the logic
- Which
symbol we can use
- How we are
allowed to combine symbols
-
Propositions
- Connective
and, or, not,
implies, if (
)
Semantics
-
How we interpret (read) sentences in the logic
-
Assign a meaning to each sentences
-
Use true the table to work out the truth of statement
Semantic Network
Figure:
The idea behind the semantic
network is that knowledge is often best understood as a set of concept that are
related to one another. The meaning of a concept is defined by its relationship
to another concept. A semantic network consist of a set of node that are
connected by labeled arcs. The nodes represent concepts and the arcs represents
relations between concepts.
Common Sematic Relations
INSTANCE
X
is an INSTANCE of Y, if X is a specific example of the general concept Y.
ISA
X
ISA Y, if X is a subset of the more general concept Y e.g.: - sparrow ISA bird.
Haspart
X
has part Y, if the concept Y is a part of the concept X. e.g.: sparrow has part
tail.
- Semantic Tree
A
semantic tree is a representation that is a semantic net I which shorten links
are called branches. Each branch connects two node. The head node is called
parent node and tail node is called child node. One node has no parent; it is
called the root node. Other nodes have exactly one parents. Some nodes have no
children; they are leaf node when two nodes are connected to each other by a
chain of two or more branches one is set to be the ancestor; the other is set
to be the descendent.
- Inheritance
Inheritance
is a key concept in semantic n/w and can be represented naturally by following
ISA link. In general, if concept X has property P, then all concepts that are a
subset of X should also have property P. In practice, inherited properties are
usually treated has default values. If a node has direct link that contradicts
inherited property, then the default is over rider.
- Multiple Inheritance
Ø
Multiple inheritance allows an object to
inherit properties from multiple concept
Ø
Multiple inheritance can sometime allow
an object to inherit conflicting properties.
Ø
Conflicts are potentiallyunatonable so conflict
resolution strategies are needed
Predicate Calculus (Predicate Logic)
In
mathematical logic, predicate logic is generic turn for symbolic formal systems
like first order logic, second order logic or many sorted logic. This formal
system is distinguished from other system in that its formula content variables
which can be quantified. Two common quantifies are existential ᴲ (“There
exist”) and universal U (“for all”) quantifies. Predicate calculus symbols may
represent either Constance variable, function, predicate. Constance name
specific objects are properties in the domain of this coursed. Thus tree tall
and blue are examples of well form constant symbols. The constant true and false
are included. Functions denote mapping of one or more elements in a set called
the domain of the function. In to a unique element of another set. Elements of
the domain and range are objects in the old of discourse. Every function
symbols have an associated entity indicating the number of element in the
domain mapped on to each element of range.
Predicate
logic uses three additional notation they are
i) Predicate
A predicate is a relation that
binds two items together for example: Krishna like apple. Know we can write
like (Krishna, like apple) where like is predicate that links two items Krishna
and Apple.
Thus predicate can be
generalized as like X, Y where X and Y are the variable it means X likes Y
ii) Terms (Literals)
Terms are arguments in a
predicate logic example Ravi’s father is Ranis father that is father (father
iii) Quantifiers
A quantifiers is a symbol that
permits to declare or identify the range or scope of variables in a logical
expression. There are two types of quantifiers they are
-
Universal quantifiers
-
Existential quantifiers
- Universal Quantifiers
If
A is a variable the ¥a is read as
i)
for all A
ii)
for each A
iii)
for every
- Existential Quantifiers
If B is a variable then ϶b is
read as
i)
there exist B
ii)
for some B
iii)
for at histone B
Resolution
Robinson
in 1965 introduce the resolution principle which can be directly apply to any
set of clues. The principle is given any two clues A and B, if there is lateral
Bin A and which has complementary term >p in B, delete P from A and B an
construct a new close of the remaining clues. The clues so constructed is
called “resolving of A and B”.
Substitution
Resolution
works on the principle of identifying complementary literals in two clues a
deleting then there by forming a new literal. The process is simple an state
forward where are variables the problem becomes complicated and there is
necessary to make proper substitution.
There
are three major types of substitution
-
Substitution of variable by a constant
-
Substitution of variable by another variable
-
Substitution of variable by function that does not have same variable
Unification
In
prepositional logic it is easy to determine that how literals cannot both be
tree at the same time for example: man (John) &Ʌ man (john) thus
in order to determine contradiction win need a machine procedure that compares
two literals at discourse where their exist a set of substitution that made
them identical there is a state forward recursive procedure called unification
algorithm. The basic idea of unified two literals we fast check if their
initial predicate symbols are the same. If so we can processed otherwise there
is no way to unified regard less of their arguments.Suppose we want to unify an
expressions P(K,Y) & P(K,Z) here the predicate is same so we can unify by
substituting Z by Y.
Frame
Frame
is a collection of attribute slots and associated values that describe some
real word entity. Frames on their own are not particularly help full but frames
systems are powerful way of encoding information to reasoning process. A frame
structure provides facilities for describing objects facts over situation
procedure on what to do when a situation is encounter.
Types of Frames
- Declaration Frame: - A
frame that contains description about an object is called a declarative frame.
The computer center frame describable it a typical example of subscribe frame
- Procedural Frame: - It
is possible to have procedural knowledge represented in a frame. Such frame
which have procedural knowledge embedded in it are called procedurals frames.
The procedural frames as following slots
a) Actor Slots: - It
holds information about who is performing the activity
b) Object Slots: - This
slots as information about the item to perform on
c) Source Slots: - Source
slots holds information from where the action as to end
e) Task Slots: - This
generates the necessary sub slots required to perform the operation
Approach to Knowledge Representation: - A
good system for knowledge representation should passes the following property
- Representation Adequacy: -
The ability to represent all kinds of knowledge that are needed in that domain
- Interracial Adequacy: -
The ability to manipulate the representation structure in such a way as to
derive new structures of new knowledge inference form old.
- Acquisitioned Efficiency: - The
ability to acquire the new information easily. The simplex case involves direct
insertion by a person as new knowledge in to the knowledge base.
- Inferential Efficiency: - The
ability to incorporate into the knowledge structure additional information that
can use to fours the attention of the inference mechanism in most per mistingdirection
Knowledge
Representation Technique
(a) Simple relational knowledge: -
The simple way of storing facts page to use a simple relational method where
each fact about a set of object which set at systematically in columns. This
representation gives little opportunityfor inference but it can be used as
knowledge bases for inference engine.
(b)Inheritable knowledge: - Relational
knowledge is made up of constitute of institute and cross ponding associated
values we extend the base more by allowing inference mechanism for property in
heritance is used. In property inheritance of a class.
(c)Inferential knowledge: - In
inferential knowledge logic knowledge is represented as formal for example all
dogs have tell an in formal logic it is return as
Advantage
-
A set of strict rule
-
Can be used to derive
-
Make
-
Popular in AI system
(d) Procedural knowledge: -It
is also called operational knowledge which specifies what to do when. In this
control information is necessary to use the knowledge in embedded in the
knowledge base itself
Unit 4
Inference and Reasoning
State Space Representation Technique: - A
set of all possible states for a give problem is known as state space of the
problem. For example let us consider us consider an 8 tiles puzzle game. The
puzzle consist of a squire frame contenting at tiles and an empty slot. The
tiles are number from 1 to 8. It is possible to move the tiles in the squire field
by moving a tile in to the empty slot. The objective is to get the squire in a
numerical order
Rules: - The
operator for this problems are
Up: - If the heal is not
touching the top frame move it up.
Down: - If
the heal is not touching the bottom frame move it down.
Left: - If
the heal is not touching the left frame move it left.
Right: - If
the heal is not touching the Right frame move it right.
Figure
The state space is a directed
graph with all the state has nodes. A node is set to be existed if it is
possible to up tent it form the initial state by application of a set of
operators. A small fragment of state space for the 8 tile puzzle game as soon
above.
State space representation are
highly perinatal in AI because they provide all possible states operations and
the goal. If the entire state space representation for a problem it’s given it
is possible trace the part from the initial state to the goal state and
identifies the sequence of operators. The major disadvantage of this method is
that it is not possible to visualize all states for a given problem. More ever,
the resources of the computer system are limited to handle huge state space
representation.
Heuristic Search
Breath
first searching is a uniforms search because they do not have any domain
specific knowledge. Heuristics are approximations use to minimize the searching
process. The process of searching can be drastically reduced by the use of
heuristic. Generally two categories of problems are heuristic
-
Problem for which no exact algorithms are known and one needs to find an
approximation and satisfying solution
-
Problem for which exact solution is known but computationally in fusible.
The heuristic which are needed
for serving problems are generally represented as a heuristic function which
maps the problem state in to numbers. This numbers are then approximately used
to guide search. The following algorithm make use a drastic evaluation function
- Hill Climbing Search: - This
algorithm is also called discrete optimization algorithm which uses a simple
heuristic function to calculate the amount of distance the node is from the
goal. In fact there is no different between hill climbing search and deft
search except that the children of the node that has been expended are shorted
by remaining distant
Algorithm
- Put the initial list on
start
-
If start = empty or start = goal terminate search
-
Remove the first node from the start called this node A
-
If A = goal terminate search with success
-
If node has a successor generate all of them. Find out how far they are from
the goal node sort they by remaining distance from the goal and at them to the
- Best First Search: - This
is also heuristic search the heuristic function used here are called evaluation
function each and indicates how far the node is from the goal node. Goal node
have an evaluation function value of O (Zero)
It is explained using a search
give above. First the start node is expended. It has three children A, B and C
with evaluation function 3, 6 and 5 respectively. These values approximately
indicate how far they are from the goal node. The child with minimum value ‘A’
is chosen. The children’s of ‘A’ are generated. They are ‘D’ and ‘E’ with evaluation
function 9 and 8 with evaluation at. The search process has how four node to
search that is the node ‘D’ with evaluation function 9, ‘E’ with 8, ‘B’ with 6
and ‘C’ with 5 where ‘C’ has got the minimum value which is expanded to give
node ‘H’ which value is 7. At this point the node available for search are (D:
9), (E: 6) (H: 7)
Algorithm
-
Put the initial node on a list START
-
If START empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successes generate all of them find out how far they are
from the goal node. Short all the child generated so far by the remaining
distance from the goal
-
Replace start with START
-
Go to step 2
- A* Search (Aversa Search): - In
best first search we brought in a heuristic value called evaluation function
value. It is a value that estimates how far a particular estimate node is from
the goal node. A part from the evaluation function value one can also bring
that is cost function. Cost function indicates how much resources take time
energy money etc. has been spent in reading a particular node from the start.
If it is possible for one to obtain the evaluation values and cost function
values the A* algorithm can be used.
Algorithm
-
Put the initial node unless START
-
If START = empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successor generate all of them. Estimate the fitness
number (The sum of evaluation function and cost along the reading to that state
is called fitness number) of the successes by totaling the evaluation function
values and cost function value. Short the list by fitness number
-
Need the new list as START 1
-
Replace start with START 1
-
Go to step 2
AO* Search
Game Playing in AI: - There
are two major components in game playing they are
i) Plausible Move Generator: - If
we are to employee a simple move generator then it might not be possible to
examine all the states. Has it is essential that only very selected moves or
pats the examine for this purpose only one has a flexible move generator that
expends are generates only selected moves
ii) Static Evaluation Function
Generator: - This
is the most important components of the game playing program. Based on
heuristic this generates the static evaluation function value for each and
every move that is being made. The study evaluation function gives a snapshot
of a particular move. More the static evaluation function value more in the possibility
for victory. The basic method available for game playing are
- Min – Max Strategy: - Min
– max strategy is a simple strategy for two person gene playing. Here players
are called maximizer and minimizer both are opponent to each other. Maximizer
and minimizer fights it out to see that the opponent get minimum benefit and
they get the maximum benefit. The play sable move generator generate necessary
for the farther evaluation and the static evaluation function ranks each of the
position
Figure
Let AB the initial state of the
game, the plausible move generator generates children’s for that move and the
static evaluation function generate assign the value given along with each of
the state. It is assume that that the static evaluation function generators
returns a value from – 20 to +20 where a value of +20 indicates a win for
maximizer and a value of -20 indicates a wine for minimizer makes first move
the maximizer always tries to go the position where the static evaluation
function value is maximizer positive value.
The maximizer being the player
to make the first move will to node D because static evaluation function value
of that maximum node. If the minimizer has to move he will go node be because
the static evaluation function value for that node is minimum
Figure
Fig:
- game tree explained by two level their association static evaluation function
value but a game playing strategy never stops with one level but loops a head
that is move a couple of levels down ward to those the optimal movies
Let’s examines this with the
help of above fig: Let’s assume that it is the maximizer who will to play first
floated by minimizer. Before the maximizer move to N, O, P he will have to
thing which move would be highly beneficial to him. It maximizer move to N next
will be minimizer term. The minimizer always this to other and he will move to
are (static evaluation function value = -6) this value is backed off to N.
If M move to O, then the minimizer
will move to V, which is the minimum of +4, +7 and 0 so, the value of 0 is
backed up as 0. Similarly the value of P will backed of -3.
The maximizer will know have to
choose between M, N, O, and P with the value of -6, 0 and -3. Being a maximizer
he will choose node 0 because if provides the maximize value corresponding to
other
- Min – Max Strategy with alphabet cut –
offs: -
Figure:
-
This is the modified version of
min max strategy algorithm where two threshold value are maintain for features
expansion. One threshold value is called alpha, which is lower bound on the
value the maximizer can be originated and other is beta (P) which represent the
upper bound of the value the minimizer can be assigned.
In this figure the maximizer has
to play first floated by the minimizer as done in min – max strategy. The
maximizer assign A value of 6 at Q (minimum at the values sand t). This values
is backed up P so the maximizer as assured of A value of 6 when he move to Q.
Now let see what happened at R. The value at V is -2 and U is unknown. Since,
the move is minimizing 1 by moving to R, P can get only A value of -2 or less
that is unacceptable for P because by moving to Q he is assured of value up 6 hence
he will never tries move other than children of R
Role of Alpha (α)
Figure: -
For P the maximizer A value of 6
is assured by moving a node Q. this value P is compared with that of value at
R, P be the maximizer could flow any path which value is greater than 6. Hence,
this value of 6 being the least at a maximizing move and set as value of α.
This value of alpha is now used as reference point. Any node which value is
greater than alpha is acceptable and all the node which values are less than
alpha is rejected.
Role of Beta (β)
Figure: -
In this figure is the minimizer
and the path for extension are chosen from values at the leaf node. Since 5 and
T are maximizer the maximum value of their children are back up as static
evaluation function value. Node Q being minimizer always moves to 5 rather than
T. the value at 5 (6) is not we used by Q as a reference point. The value is
called β is acceptable and values more than β are seldom.
Bayesian Networks
-
Bayesian networks also known as Bayes Nets, Belief Nets cause nets and
probability nets, are a space efficient data structure for encoding all of the
information in the full joint probability distribution for the set of random
variables defining a domain
-
Represents all of the direct causal relationships between variables
-
In punitively to construct a Bayesian net for a given set of variables draw are
from cause variables to immediate effects.
-
Space efficient because it exploits the fact that in many real world problem
domains the dependencies between variables are generally local, so there are a
lot of conditionally independent variables
-
Captures both qualitative and quantitative relationships between variables
-
Can be used to reason: -
i)
Forward (top – down) from causes to effects predictive reasoning (aka causal
reasoning)
ii)
Backward (bottom – up) from effects to causes diagnostic reasoning
-
Formally a Bayesian Net is a directed a cyclic graph (DAG) where is a node for
each random variable and a directed are from A to B whenever A is a direct
causal influence
-
Each node A in a net is conditionally independent of any subset of nodes that
are not descendant of a given the parents of A.
Case based Reasoning: - In
case based reasoning the cases are stored and accessed to solve a new problem.
To get a prediction for a new example, these cases that are similar or close to
the new example this is at one extreme of the learning problem where unlike
decision trees and neural networks relatively little work must be done offline
and virtually all of the work is performed at query time.
Case based reasoning can be used
for classification and regression. It is also applicable when the cases are
complicated, such as in legal cases where the cases are complex legal rulings
and in planning, where the cases are previous solutions to complex problems
If the cases are simple one
algorithm that works well is to use the k – nearest neighbors for some given
number K. given a new example the K training examples that have the input
features closest to that example are used to predict the forget value for the
new example.
The prediction can be the mode
average or some interpolation between the predication of these k. training
examples perhaps weighting closer examples more than distant examples.
For this method to work a
distance metric is required that measures the closeness of two examples. First
define a metric for the domain of each feature in which the values of the
features are converted to a numerical scale that can be used to compare values.
Unit 5
Machine Learning
Learning: - The
process of knowledge as equation is called learning. There are various types of
learning.
- Rote Learning (Learning by
Memorizations): - Knowledge a equation itself includes many
different activities. Simple storing of computing information or rote learning
is the most basic learning activities may computer programs examples database
systems can be used to learn in this sense slough most people could not called
such simple storage as learning however many IT programs rote learning
techniques. When a computer stored a paces of data it is performing a rote
learning such learning are used full for improving the performance of the
systems.
- Learning by Analogy
a) Transformational Analogy
Suppose
we are asked to prove theorem in plane geometry we might look for a previous
theorem that is very similar and copies its proof, making substitution when
necessary. The idea is to transform a solutions to a previous problem into a
solutions for the current problem such learning is called learning by
transformation analogy.
The example for transformational
analogy is five below
Figure:
-
b) Derivational Analogy
Figure:
-
Transformation analogy if does
not look at how the old problem was solved it look at the final solution after
the twist and terms in solving an old problem are relevant to solving a new
problem. The detail history of problem solving is called its derivation
analogical reasoning that tables these histories in to account is called
derivational analogy.
Explanation Based Learning (EBL): - An
explanation based learning system accepts and example (i.e. training example)
an explains what it learns from the example. The EBL system takes only the
relevant aspects of the training. These explanations is translated in to
particular form that a problem solving program can understand so that it can
used to solve other problem
We can think EBL program as
specifying the following input.
-
A training example: - what the training program size in the world.
-
A goal concept: - A high level description of which the problem is supposed to
known
-
A operationally (
): - A description of which concept are useable
-
A domain theory: - A set of groups that gives the relationship between the
activities between domains
Inductive Bias Learning: - A
major problem in machine learning is that of inductive bias how to choose a
learners hypothesis space so that it is large enough to contain a solution to
the problem being learnt yet small enough to ensure reliable generalization
from reasonably sized training sets. Typically such bias is supplied by hand
through the skill and insights of experts. In this paper a model for
automatically learning bias is investigated. The central assumption of the
model is that the learner is embedded within an environment of related learning
tasks.
Within such an environment the
learner can sample from multiple tasks and hence it can search for a hypothec
is space that contains good solutions to many of the contains on the set of all
hypothesis spaces available to the learners we show that a hypothesis space
that performs well on a sufficiently large number of training tasks novel task
in the same environment. Explicit bounds are also derived demonstrating that
learning multiple tasks can potentially give much better generalization than
learning a single task.
Genetic Algorithms: - This
is an introduction to genetic algorithm methods for optimization. The
continuing price/performance improvements of computational systems has made
them attractive for some types of optimization. In particular genetic
algorithms work very well on mixed. Combinational problems. But they tend to be
computationally expensive. To use a genetic algorithm you must represent a
solution to your problem as a genome. This presentation outlines some of the
basics of genetic algorithms. The three most important aspects of using genetic
algorithms are
-
Definition of the objective function
-
Definition and implementation of the genetic representation and
-
Definition and implementation of the genetic operators
Once these three have been
defined the generic algorithm should work fairly well. Beyond that you can try
many different variations to improve performance find multiple optima or
parallelize the algorithms.
Application of AI
Export System: - Export
system are knowledge intensive programs that solve problem in a domain that
require considerable amount of technical information the Brattice computer
society community of the specialist prove on export system as formed the
following generation
-
The embodiment within a computer of a knowledge based component from on export
skill in such a form that the machine can offers that intelligence take
intelligence design about of the specification.
A desirable additional characteristics
which may regard fundamental each the capability of the system on demand to
justified its own line of reasoning in a manner directly to the enquire
Characteristics Expert System (CES)
Following
are the different characteristics expert system
-
They should solve difficult problem in a domain as good as or better than on
expert
-
They should process vast quantities of domain specific knowledge in the detail
-
These system promote the use of heuristic search process. It must be cleared
that brought search techniques are in practical and to managed the problem
heuristic search procedure process the management
-
They explain why they question and justify their confusion. Explanation
facilities enhance treatability system in the mind of human
-
They accept advice modify update and expand
-
They communicate with the users in their own natural language
-
They provides extensive facility part simply processing greater than numeric
processing
Goal in Problem Solving
Introduction: - "Developing
computers programs to solve complex problems by the application of processes
that are analogous to human resourcing process"
AI is the ability of a program
to perform the same kinds of functions that characterize human thoughts which
includes.
i) Systems
that thinks like human
ii) Systems
that thinks acts like human
iii) Systems
that thinks think rationally
iv) Systems
that thinks acts rationally
i) Systems that thinks like humans: - This
requires getting inside of the human mind to see how it works and then
comparing our computer programs to this. This is what cognitive science afferents
to do. An others way to do this is to observe a human problems solving and rogue
that one's programs go about problem solving in similar way.
ii) Systems that act like human: - To
be considered intelligent a program must be able to act sufficiently like a
human to fool an interrogator. The machine and the human are isolated from the
person carrying out the test and messages are exchanged via a keyboard and
screen. If the person cannot distinguish between the computer and the human
being then the computer must be intelligent.
iii) System that think rationally: - For
example all computers use energy. Using energy always generates heat. Therefore
all computers generate heat. This initiates the field of logic. Formal logic
was developed in the lot nineteen century. This was the first step forwards
enabling computer programs to reason logically.
iv) System that act rationally: - Acting
rationally means acting so as to achieve one's goals given one's beliefs. An
agent is just something that perceives and acts. In the logical approach to AI
the emphasis is on correct inferences.
Function of AI
- Philosophy: - Logic methods of
reasoning mind as physical system foundations of Learning, Language, and
Rationality.
- Mathematics: - Formal representation
and proof algorithm, computation, decidability, tractability, probability.
Philosophers staked out most of the important ideas of AI but to move to a
formal science requires a level of mathematics formulism in three main areas
computation logic and probability.
- Economics: - Utility decision theory
- Neap Science: - Physical substrate
for mental activity
- Psychology: - Phenomena of perception
and motor control, experimental techniques. The principle characteristic of
cognitive. Psychology is the brain processes and process information.
- Computer Engineering: - Building fast
computers
- Control Theory: - Design systems that
maximize an objective function over time
- Linguistics: - Knowledge
representation grammar having a theory of how human successfully process
natural language is an AI complete problem if we could solve this problem then
we would have created a model of intelligence.
Application area of an AI: - Today's AI
systems have been able to active limited success in some of these tasks.
- In computer
vision the systems are capable of face recognition
- In Robotics
we have been able to make vehicles that are mostly automats.
- In natural
language processing we have systems that are capable of simple machine
translation
- Today's
Expert systems can carry out medical diagnosis in a narrow domain
- Speech
understanding systems are capable of recognizing several thousand words
continuous speech
- Planning
and scheduling systems had been employed in scheduling experiments with the
Hubble Telescope.
- The
Learning systems are capable of doing text categorization into about a 1000
topics
- In games AI
systems can play at the Grand Master level in chess (World Champion) checkers
etc.
What can AI system NOT do yet?
- Understand
natural language robustly (e.g. read and understand articles in a newspaper)
- Surf the
web
- Interpret
an arbitrary visual science
- Learn a
natural language
- Construct
plans in dynamic real time domains
- Exhibit
true autonomy and intelligence
Goal Schemas: - To build a system to
solve a particular problem we need to do four things.
- Define the
problem precisely. This definition must include precise specifications of what
the initial situations will be as well as what final situations constitute
acceptable solutions to the problem.
- Analyze the
problem. A few very important features can have an immense impact on the
appropriateness of various possible techniques for solving the problem
- Isolate and
represent the task knowledge that is necessary to solve the problem.
- Choose the
best problem solving techniques and apply them to the particular problem
i) Search Problem: - It is
characterized by an initial state and a goal state description. The guesses are
called the operators where a single operator transforms a state into another
state which is expected to be closer to a goal state. Here the objective may be
to find a goal state or to find a sequence of operators to a goal state.
Additionally the problem may require finding just any solution or an optimum
solution.
ii) Planning: - The purpose of planning
is to find a sequence of actions that achieves a given goal when performed
starting in a given state. In other words given a set of operator instances
(defining the possible primitive actions by the agent) an initial state
description and a goal state description or predicate the planning agent
computers a plan.
Simple Planning Agent: - The problem – solving agents are able to
plan a head to consider the consequences of sequences of actions before acting.
And a knowledge – based agents can
select actions based on explicit, logical representations of the current state
and the effects of actions
Problem
Solving Agents + Knowledge – based Agents = Planning Agents
Linear Planning: - Basic idea work and
one goal until completely solved before moving on to the next goal planning
algorithm maintains goal stack
i) Implications
- No inter
leaving of goal achievement
- Efficient
search if goals do not interact
ii) Advantages
- Reduced
search space since goals are solved one at a time
-
Advantageous if goals are (mainly) independent
- Linear
planning is sound
Iii) Disadvantages
- Linear
planning may produce sub optional solutions
- Linear
planning is incomplete
Concept of non – linear planning
Use goal set instead of goal
stack. Include in the search space all possible sub goal ordering. Handles goal
interactions by interleaving.
Advantages
- Non –
linear planning is sound
- Non –
linear planning is complete
- Non –
linear planning may be optimal with respect to plan length (depending on search
strategy employed)
Disadvantage
- Larger
search space since all possible goal orderings may have to be considered
- Somewhat
more complex algorithm more bookkeeping
Means – Ends Analysis: - The means –
ends analysis concentrates around the detection of differences between the
current state and the goal state. Once such difference is isolated an operator
that can reduce the difference must be found. However perhaps that operator
cannot be applied to the current state. Hence, we setup a sub – problem of
getting to a state in which it can be applied. The kind of backward chaining in
which the operators are selected and then sub goals are setup to establish the
preconditions of the operators is known as operator sub – goal.
Just like the other problem
solving techniques, means – ends analysis relies on a set of rules that can
transform one problem state into another. However these rules usually are not
represented with complete state descriptions on each side. Instead, they are
represented as left side, which describes the conditions that must be met for
the rule to be applicable and a right side, which describes those aspects of
the problem state that will be changed by the application of rule. A separate
data structure called a difference table indexes the rules by the differences
that they can be used to reduce.
Algorithm: Means – Ends Analysis
- Compare
CURRENT to GOAL. If there are no differences between them, then return.
- Otherwise,
select the most important difference are reduce it by doing the following until
success or failure is signaled
a) Select a
new operator O, which is applicable to the current difference. If there are no
such operators then signal failure.
b) Apply O to
CURRENT. Generate descriptions of two states, O – START a state in which O's
preconditions are satisfied and O – RESULT, the state that would result if O
were applied in O – START
Production Rules Systems: - Since
search is a very important process in the solution of hard problems for which
no more direct techniques are available, it is useful to structure AI programs
in a way that enables describing and performing the search process. Production
systems provide such structures. A production systems consists of:
- A set of
rules each consisting of a left side that determines the applicability of the
rule and a right side that describes the operation to be performed if the rule
is applied.
- One or more
knowledge or databases that contain whatever information is appropriate for the
particular task.
- A control
strategy that specifies the order in which the rules way of resolving the
conflicts that arise when several rules match at once.
i) Forward Chaining Systems: - In a
forward chaining system the facts in the system are represented in a working
memory which is continually updated. Rules in the system represent possible
actions to take when specified conditions hold on items in the working memory
they are sometimes called condition – action rules. The conditions are usually
patterns that must match items in the working memory while the actions usually
involve adding or deleting items from the working memory.
The interpreter controls the
application of the rules, given the working memory, thus controlling the
system's activity. It is based on a cycle of activity sometimes known as a
recognize act cycle. The system first checks to find all the rules whose
conditions hold, given the current state of working memory. It then selects one
and performs the actions in the action part of the rule. The actions will
result in a new working memory and the cycle begins again. This cycle will be
repeated until either no rules fine or some specified goal state is satisfied.
ii) Backward Chaining Systems: - So far
we have looked at how rule based systems can be used to draw new conclusions
from existing data adding these conclusions to a working memory. This approach
is most use full when you know all the initial facts, but don't have much idea
what the conclusion might be.
If we do know what the
conclusion might be, or have some specific hypothesis to test forward chaining
systems may be inefficient. We could keep on forward chaining until no more
rules apply or you have added your hypothesis to the working memory. But in the
process the system is likely to do a lot of irrelevant work adding
uninteresting conclusions to working memory.
iii) My CIN Style Probability and its
Application: - In artificial intelligence, My CIN was an early expert
system designed to identify bacteria causing severe in factions, such as
bacteremia and meningitis, and to recommend antibiotics, with the amount
adjusted for patient's body weight the name derived from the antibiotics
themselves, as many antibiotics have the suffix "MYCIN". The MYCIN
system was also used for the diagnosis of blood clotting diseases.
MYCIN was developed over five or
six years in the early 1970s at Stanford University in Lisp by Edward short
life. MYCIN was never actually used in practice but research indicated that it
proposed an acceptable therapy in about 69% of cases, which was better than the
performance of infectious disease experts who were judged using the same
criteria. MYCIN operated using a fairly simple inference engine, and a
knowledge base rules. It would query the physician running the program via a
long series of simple Yes/No or textual question. At the end it provided a list
of possible culprit bacteria ranked from high to low based on the probability
of each diagnosis, its confidence in each diagnosis probability, the reasoning
behind each diagnosis and its recommended course of drug treatment.
Practical use/Application: - MYCIN was
never actually used in practice. This wasn't because of any weakness in its
performance. As mentioned in tests it output formed members of the Stanford
medical school faculty. Some observers raised ethical and legal issues related
to the use of computers in medicine if a program gives the wrong diagnosis or
recommends the wrong therapy, who should be held responsible?
Unit 2 Intelligence
Introduction of Intelligence: - Artificial
intelligence is concerned with the design of intelligence in and artificial
device. The turn was invented by MC Cathy in 1956.
Artificial intelligence is about
designing system that are as intelligent as human. This view involves trying to
understand human through and an effort to build machines that emulate the human
though process. This view is the cognitive science approach to AI.
Common Sense Reasoning: - Common sense
is ability to analyze the situation best on it context, using millions of
integrated pieces of common knowledge depends on being able to do common sense resining
central part of intelligent behavior.
Example every know that drawing
a glass of water the glass will break and water will spill. However this
information is not obtained by formula or equation. Common sense knowledge
means what everyone knows. Example: -
- Every
person is younger then the person's mother
- People
don't like being repeatedly interrupted
- If you hold
a knife by its blade then the blade may cut you.
- People
generally sleep at right
Agents: - An agent is anything that can
be viewed as perceiving its environment through sensors and acting upon that
environment through actuators
- Human
agent; eyes, and other organs for sensors; hands, legs, mouth and other body
parts for actuators
- Robotic
agent; cameras and infrared range finders for sensors; various motors for
actuators agents and environments
Figure: -
Personality of Agent
Environment Type
- Fully
observable (Vs. partially observable): An agents sensors give it access to the
complete state of the environment at each point in time
-
Deterministic (Vs. stochastic): The next state of the environment is completely
determined by the current state and the action executed by the agent.
- Episodic (Vs.
sequential): The gent's experience is divided into atomic "episodes",
and the choice of action in each episodes depends only on the episode itself
- Static (Vs.
dynamic): The environment in unchanged while an agent is deliberating. (The
environment is semi dynamic if the environment itself does not change with the
passage of time but the agent's performance score does)
- Discrete (Vs.
continuous): A limited number of distinct clearly defined percepts and actions.
Agent Types
Four basic types in order of
increasing generality
- Simple
reflex agents
- Model based
reflex agents
- Goal based
agents
- Utility
based agents
- Simple Reflex Agents: - The agent
select an action best on the current precept ignoring the rest of the precept
history
Figure: -
Simple Reflex Agent
- Model Based Reflex Agent: - The agent
decides its actions best on of predefined set of condition action rules. For
e.g.: - a telephone operator answering machine
Figure: -
Model based reflex agent
- Goal based Agent: - The agent decides
its action best on a known a goal. For e.g.: - a GPS system finding a path to
certain destination
Figure: -
Goal Based Agent
Unit 3
Knowledge Representation
Knowledge Representation and Reasoning: - Intelligent
should have capacity for
- Receiving: - That is representing its
understanding of the world
- Knowledge Representation: - That is
representing its understanding of the world
- Reasoning: - That is inferring the
implications of what it knows and of the choices ithas.
- Acting: - That is choosing what it
want to do and carry it out.
Representation of knowledge and
the reasoning process are central to the entire field of artificial intelligent.
The primary component of a knowledge best agent is its knowledge base. A
knowledge best is a set of sentences. Each sentence is expressed in a language.
Sentences represent some assertion about the world. There must be mechanisms to
derive new sentences from old sentences. This process is known as inference or
reasoning. Inference must obey primary requirement that the new sentences
should follow logically from the previous one.
Approaches to knowledge Representation: - A
good system for the representation knowledge in a particular dement should
possess the following properties
-Representational Adequacy: - The
ability to represent all of the kinds of knowledge that are needed in that
domain.
-Inferential Adequacy: - The ability to
manipulate the representation structures in such a way as to derive new
structure cross ponding to new knowledge inferred from old.
- Inferential Efficiency: - The ability
to incorporate in to the knowledge structure additional information that can be
used to focus the attention of the inference mechanism in the most promising
direction.
- Inquisitional Efficiency: - The
ability to acquire new information easily. The simplest case involve direct
instruction of new knowledge into the database.
Logic: - Logic is the primary vehicle
for representing and resuming about knowledge. The advantage of using formal
logic as a language of AI is that it is price and deferent. These allows
program to be written which are declarative. This however leads to seven
limitation. Clearly a large person of the reasoning carried out by human depended
on handling knowledge that is on certain. Logic cannot represent this uncertainty
well. Similarly natural language resurging require inferring hidden state like
the intention of the speaker.
A logic consist of two parts, a
language and method of measuring. The logical language intern as two aspects,
syntax and semantics. They are
- Syntax: - The atomic symbols of the
logical language and the rules for constructing well formed a non-atomic expression
of the logic. Syntax specifies the symbols in the language and how they can be
combined to form sentences.
- Semantics: - The meanings of the
symbol of the logic, and rules there for demining the meaning of non – atomic
expression of the logic. It specifics what facts in the world a syntax refers
to. A fact is a claim about the world and may be true or false some popular
logics are propositional logic, first order predicate logic high order
predicate logic and fuzzy logic.
- Propositional Logic: - In PropositionalLogical
(PL) and user defines a set of propositional symbols like P&Q. User defines
the semantics for each of these symbol. For e.g.: -
P means
"It is hot"
Q means
"It is humid"
R means
"It is raining"
- A symbol
- If S is a
sentence than "~" is a sentence, where "~" is the not
logical operator?
- If sand PR
sentences then (S˅T), (S˄T) (S→T) and (S<→T) are also sentences for e.g.: -
(P˄Q)→R
It is hot and
humid then it is raining
Q→P
If it is
humid then it is hot R It is raining
- Given the
truth value of all of the constituent symbol in a sentence that sentence can be
content the value true or fails. This is called an inter pretention of the
sentence
- A model is
an inter pretention of a set of sentences such that each sentence is true. A model
is just a formal mathematical structure that stands in for the world.
- A valid
sentence (also called as tautology) is a sentence that is true under all inter
pretention. Hence no matter what the world is actually like or what the
semantic is the sentence is true.
- An
inconstant sentence (called on satisfy able or a contradiction) is a sentence
that is false under all inter reaction. Hence the world is never like that it
describes
First Order Logic
Syntax: - Syntax are symbol users the
symbols or alphabet be aware that there are all sorts of solidly different ways
to define first order logic
a) Alphabet: - There are different
types of symbols they are
- Logical Symbol: - These are symbols
that have a standard meaning like AND, OR, NOT, ALL, EXIT, IMPLIES if FALSE,
TRUE etc.
- Non Logical Symbol: - They are one
dimensional array two dimensional array N dimensional array functions (1 ary 2
array …….. n …….ary) variables etc.
b) Terms: - A term is either and
individual constant or a variable are any function applied to a terms.
c) Atomic Formula: - An atomic formulae
is either false are an n dimensional array predicate applied to ‘n’ terms
d) Literals: - A literals is either an
atomic formula (Positive literal) or the negation of an atomic formula (a negative
literals) a ground literal is avariable free literal
e) Clauses: - Clause is a disjunction
of literals a ground cause is a variable free clause a Horn clause is a clause
with at most one +ve literal a definite is a hornclause with exactly one +ve literal
Logical Agents
In logical agents we design
agents that can form representation of the world, use a process of in France to
derive new representation about the world and use these new representations to
reduce what to do?
- Knowledge
base agent the central component of knowledge base agent is its knowledge base.
A knowledge base is a set of sentences. Each sentence is expressed in a
language called a knowledge presentation language and represents some accretion
about the world.
|
Function: - KB – AGENT (percepts) return
an action
Static: - KB, a knowledge base t, a
counter initially 0.
TELL (KB, MAKE – PERCEPT – SENTENCE
(Percept t)
Action ← ASK (KB, MAKE – ACTION – QUERY (
TELL (KB MAKE – ACTION – SENTENCE (action
t))
T = ++1
Return action
|
Fig: - A
generic knowledge base agent
Figure shows the outline of a
knowledge best agent program. Like all our agents it text a percept as I/P and
returns an action. The agent Montana a Knowledge Base (KB) which may initially
content some background knowledge base what it perceives, second, it asks the
knowledge base what action should perform. In the process of answering this
query, extensive reasoning may be done about the current state of the world,
about the outcomes of possible action sequences and so on. Third, the agent
recorders its choice with tell and executed the action.
Formal Logic Connectives Syntax, Semantics
Syntax
- Rules for
constructing legal sentences in the logic
- Which
symbol we can use
- How we are
allowed to combine symbols
-
Propositions
- Connective
and, or, not,
implies, if (
)
Semantics
-
How we interpret (read) sentences in the logic
-
Assign a meaning to each sentences
-
Use true the table to work out the truth of statement
Semantic Network
Figure:
The idea behind the semantic
network is that knowledge is often best understood as a set of concept that are
related to one another. The meaning of a concept is defined by its relationship
to another concept. A semantic network consist of a set of node that are
connected by labeled arcs. The nodes represent concepts and the arcs represents
relations between concepts.
Common Sematic Relations
INSTANCE
X
is an INSTANCE of Y, if X is a specific example of the general concept Y.
ISA
X
ISA Y, if X is a subset of the more general concept Y e.g.: - sparrow ISA bird.
Haspart
X
has part Y, if the concept Y is a part of the concept X. e.g.: sparrow has part
tail.
- Semantic Tree
A
semantic tree is a representation that is a semantic net I which shorten links
are called branches. Each branch connects two node. The head node is called
parent node and tail node is called child node. One node has no parent; it is
called the root node. Other nodes have exactly one parents. Some nodes have no
children; they are leaf node when two nodes are connected to each other by a
chain of two or more branches one is set to be the ancestor; the other is set
to be the descendent.
- Inheritance
Inheritance
is a key concept in semantic n/w and can be represented naturally by following
ISA link. In general, if concept X has property P, then all concepts that are a
subset of X should also have property P. In practice, inherited properties are
usually treated has default values. If a node has direct link that contradicts
inherited property, then the default is over rider.
- Multiple Inheritance
Ø
Multiple inheritance allows an object to
inherit properties from multiple concept
Ø
Multiple inheritance can sometime allow
an object to inherit conflicting properties.
Ø
Conflicts are potentiallyunatonable so conflict
resolution strategies are needed
Predicate Calculus (Predicate Logic)
In
mathematical logic, predicate logic is generic turn for symbolic formal systems
like first order logic, second order logic or many sorted logic. This formal
system is distinguished from other system in that its formula content variables
which can be quantified. Two common quantifies are existential ᴲ (“There
exist”) and universal U (“for all”) quantifies. Predicate calculus symbols may
represent either Constance variable, function, predicate. Constance name
specific objects are properties in the domain of this coursed. Thus tree tall
and blue are examples of well form constant symbols. The constant true and false
are included. Functions denote mapping of one or more elements in a set called
the domain of the function. In to a unique element of another set. Elements of
the domain and range are objects in the old of discourse. Every function
symbols have an associated entity indicating the number of element in the
domain mapped on to each element of range.
Predicate
logic uses three additional notation they are
i) Predicate
A predicate is a relation that
binds two items together for example: Krishna like apple. Know we can write
like (Krishna, like apple) where like is predicate that links two items Krishna
and Apple.
Thus predicate can be
generalized as like X, Y where X and Y are the variable it means X likes Y
ii) Terms (Literals)
Terms are arguments in a
predicate logic example Ravi’s father is Ranis father that is father (father
iii) Quantifiers
A quantifiers is a symbol that
permits to declare or identify the range or scope of variables in a logical
expression. There are two types of quantifiers they are
-
Universal quantifiers
-
Existential quantifiers
- Universal Quantifiers
If
A is a variable the ¥a is read as
i)
for all A
ii)
for each A
iii)
for every
- Existential Quantifiers
If B is a variable then ϶b is
read as
i)
there exist B
ii)
for some B
iii)
for at histone B
Resolution
Robinson
in 1965 introduce the resolution principle which can be directly apply to any
set of clues. The principle is given any two clues A and B, if there is lateral
Bin A and which has complementary term >p in B, delete P from A and B an
construct a new close of the remaining clues. The clues so constructed is
called “resolving of A and B”.
Substitution
Resolution
works on the principle of identifying complementary literals in two clues a
deleting then there by forming a new literal. The process is simple an state
forward where are variables the problem becomes complicated and there is
necessary to make proper substitution.
There
are three major types of substitution
-
Substitution of variable by a constant
-
Substitution of variable by another variable
-
Substitution of variable by function that does not have same variable
Unification
In
prepositional logic it is easy to determine that how literals cannot both be
tree at the same time for example: man (John) &Ʌ man (john) thus
in order to determine contradiction win need a machine procedure that compares
two literals at discourse where their exist a set of substitution that made
them identical there is a state forward recursive procedure called unification
algorithm. The basic idea of unified two literals we fast check if their
initial predicate symbols are the same. If so we can processed otherwise there
is no way to unified regard less of their arguments.Suppose we want to unify an
expressions P(K,Y) & P(K,Z) here the predicate is same so we can unify by
substituting Z by Y.
Frame
Frame
is a collection of attribute slots and associated values that describe some
real word entity. Frames on their own are not particularly help full but frames
systems are powerful way of encoding information to reasoning process. A frame
structure provides facilities for describing objects facts over situation
procedure on what to do when a situation is encounter.
Types of Frames
- Declaration Frame: - A
frame that contains description about an object is called a declarative frame.
The computer center frame describable it a typical example of subscribe frame
- Procedural Frame: - It
is possible to have procedural knowledge represented in a frame. Such frame
which have procedural knowledge embedded in it are called procedurals frames.
The procedural frames as following slots
a) Actor Slots: - It
holds information about who is performing the activity
b) Object Slots: - This
slots as information about the item to perform on
c) Source Slots: - Source
slots holds information from where the action as to end
e) Task Slots: - This
generates the necessary sub slots required to perform the operation
Approach to Knowledge Representation: - A
good system for knowledge representation should passes the following property
- Representation Adequacy: -
The ability to represent all kinds of knowledge that are needed in that domain
- Interracial Adequacy: -
The ability to manipulate the representation structure in such a way as to
derive new structures of new knowledge inference form old.
- Acquisitioned Efficiency: - The
ability to acquire the new information easily. The simplex case involves direct
insertion by a person as new knowledge in to the knowledge base.
- Inferential Efficiency: - The
ability to incorporate into the knowledge structure additional information that
can use to fours the attention of the inference mechanism in most per mistingdirection
Knowledge
Representation Technique
(a) Simple relational knowledge: -
The simple way of storing facts page to use a simple relational method where
each fact about a set of object which set at systematically in columns. This
representation gives little opportunityfor inference but it can be used as
knowledge bases for inference engine.
(b)Inheritable knowledge: - Relational
knowledge is made up of constitute of institute and cross ponding associated
values we extend the base more by allowing inference mechanism for property in
heritance is used. In property inheritance of a class.
(c)Inferential knowledge: - In
inferential knowledge logic knowledge is represented as formal for example all
dogs have tell an in formal logic it is return as
Advantage
-
A set of strict rule
-
Can be used to derive
-
Make
-
Popular in AI system
(d) Procedural knowledge: -It
is also called operational knowledge which specifies what to do when. In this
control information is necessary to use the knowledge in embedded in the
knowledge base itself
Unit 4
Inference and Reasoning
State Space Representation Technique: - A
set of all possible states for a give problem is known as state space of the
problem. For example let us consider us consider an 8 tiles puzzle game. The
puzzle consist of a squire frame contenting at tiles and an empty slot. The
tiles are number from 1 to 8. It is possible to move the tiles in the squire field
by moving a tile in to the empty slot. The objective is to get the squire in a
numerical order
Rules: - The
operator for this problems are
Up: - If the heal is not
touching the top frame move it up.
Down: - If
the heal is not touching the bottom frame move it down.
Left: - If
the heal is not touching the left frame move it left.
Right: - If
the heal is not touching the Right frame move it right.
Figure
The state space is a directed
graph with all the state has nodes. A node is set to be existed if it is
possible to up tent it form the initial state by application of a set of
operators. A small fragment of state space for the 8 tile puzzle game as soon
above.
State space representation are
highly perinatal in AI because they provide all possible states operations and
the goal. If the entire state space representation for a problem it’s given it
is possible trace the part from the initial state to the goal state and
identifies the sequence of operators. The major disadvantage of this method is
that it is not possible to visualize all states for a given problem. More ever,
the resources of the computer system are limited to handle huge state space
representation.
Heuristic Search
Breath
first searching is a uniforms search because they do not have any domain
specific knowledge. Heuristics are approximations use to minimize the searching
process. The process of searching can be drastically reduced by the use of
heuristic. Generally two categories of problems are heuristic
-
Problem for which no exact algorithms are known and one needs to find an
approximation and satisfying solution
-
Problem for which exact solution is known but computationally in fusible.
The heuristic which are needed
for serving problems are generally represented as a heuristic function which
maps the problem state in to numbers. This numbers are then approximately used
to guide search. The following algorithm make use a drastic evaluation function
- Hill Climbing Search: - This
algorithm is also called discrete optimization algorithm which uses a simple
heuristic function to calculate the amount of distance the node is from the
goal. In fact there is no different between hill climbing search and deft
search except that the children of the node that has been expended are shorted
by remaining distant
Algorithm
- Put the initial list on
start
-
If start = empty or start = goal terminate search
-
Remove the first node from the start called this node A
-
If A = goal terminate search with success
-
If node has a successor generate all of them. Find out how far they are from
the goal node sort they by remaining distance from the goal and at them to the
- Best First Search: - This
is also heuristic search the heuristic function used here are called evaluation
function each and indicates how far the node is from the goal node. Goal node
have an evaluation function value of O (Zero)
It is explained using a search
give above. First the start node is expended. It has three children A, B and C
with evaluation function 3, 6 and 5 respectively. These values approximately
indicate how far they are from the goal node. The child with minimum value ‘A’
is chosen. The children’s of ‘A’ are generated. They are ‘D’ and ‘E’ with evaluation
function 9 and 8 with evaluation at. The search process has how four node to
search that is the node ‘D’ with evaluation function 9, ‘E’ with 8, ‘B’ with 6
and ‘C’ with 5 where ‘C’ has got the minimum value which is expanded to give
node ‘H’ which value is 7. At this point the node available for search are (D:
9), (E: 6) (H: 7)
Algorithm
-
Put the initial node on a list START
-
If START empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successes generate all of them find out how far they are
from the goal node. Short all the child generated so far by the remaining
distance from the goal
-
Replace start with START
-
Go to step 2
- A* Search (Aversa Search): - In
best first search we brought in a heuristic value called evaluation function
value. It is a value that estimates how far a particular estimate node is from
the goal node. A part from the evaluation function value one can also bring
that is cost function. Cost function indicates how much resources take time
energy money etc. has been spent in reading a particular node from the start.
If it is possible for one to obtain the evaluation values and cost function
values the A* algorithm can be used.
Algorithm
-
Put the initial node unless START
-
If START = empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successor generate all of them. Estimate the fitness
number (The sum of evaluation function and cost along the reading to that state
is called fitness number) of the successes by totaling the evaluation function
values and cost function value. Short the list by fitness number
-
Need the new list as START 1
-
Replace start with START 1
-
Go to step 2
AO* Search
Game Playing in AI: - There
are two major components in game playing they are
i) Plausible Move Generator: - If
we are to employee a simple move generator then it might not be possible to
examine all the states. Has it is essential that only very selected moves or
pats the examine for this purpose only one has a flexible move generator that
expends are generates only selected moves
ii) Static Evaluation Function
Generator: - This
is the most important components of the game playing program. Based on
heuristic this generates the static evaluation function value for each and
every move that is being made. The study evaluation function gives a snapshot
of a particular move. More the static evaluation function value more in the possibility
for victory. The basic method available for game playing are
- Min – Max Strategy: - Min
– max strategy is a simple strategy for two person gene playing. Here players
are called maximizer and minimizer both are opponent to each other. Maximizer
and minimizer fights it out to see that the opponent get minimum benefit and
they get the maximum benefit. The play sable move generator generate necessary
for the farther evaluation and the static evaluation function ranks each of the
position
Figure
Let AB the initial state of the
game, the plausible move generator generates children’s for that move and the
static evaluation function generate assign the value given along with each of
the state. It is assume that that the static evaluation function generators
returns a value from – 20 to +20 where a value of +20 indicates a win for
maximizer and a value of -20 indicates a wine for minimizer makes first move
the maximizer always tries to go the position where the static evaluation
function value is maximizer positive value.
The maximizer being the player
to make the first move will to node D because static evaluation function value
of that maximum node. If the minimizer has to move he will go node be because
the static evaluation function value for that node is minimum
Figure
Fig:
- game tree explained by two level their association static evaluation function
value but a game playing strategy never stops with one level but loops a head
that is move a couple of levels down ward to those the optimal movies
Let’s examines this with the
help of above fig: Let’s assume that it is the maximizer who will to play first
floated by minimizer. Before the maximizer move to N, O, P he will have to
thing which move would be highly beneficial to him. It maximizer move to N next
will be minimizer term. The minimizer always this to other and he will move to
are (static evaluation function value = -6) this value is backed off to N.
If M move to O, then the minimizer
will move to V, which is the minimum of +4, +7 and 0 so, the value of 0 is
backed up as 0. Similarly the value of P will backed of -3.
The maximizer will know have to
choose between M, N, O, and P with the value of -6, 0 and -3. Being a maximizer
he will choose node 0 because if provides the maximize value corresponding to
other
- Min – Max Strategy with alphabet cut –
offs: -
Figure:
-
This is the modified version of
min max strategy algorithm where two threshold value are maintain for features
expansion. One threshold value is called alpha, which is lower bound on the
value the maximizer can be originated and other is beta (P) which represent the
upper bound of the value the minimizer can be assigned.
In this figure the maximizer has
to play first floated by the minimizer as done in min – max strategy. The
maximizer assign A value of 6 at Q (minimum at the values sand t). This values
is backed up P so the maximizer as assured of A value of 6 when he move to Q.
Now let see what happened at R. The value at V is -2 and U is unknown. Since,
the move is minimizing 1 by moving to R, P can get only A value of -2 or less
that is unacceptable for P because by moving to Q he is assured of value up 6 hence
he will never tries move other than children of R
Role of Alpha (α)
Figure: -
For P the maximizer A value of 6
is assured by moving a node Q. this value P is compared with that of value at
R, P be the maximizer could flow any path which value is greater than 6. Hence,
this value of 6 being the least at a maximizing move and set as value of α.
This value of alpha is now used as reference point. Any node which value is
greater than alpha is acceptable and all the node which values are less than
alpha is rejected.
Role of Beta (β)
Figure: -
In this figure is the minimizer
and the path for extension are chosen from values at the leaf node. Since 5 and
T are maximizer the maximum value of their children are back up as static
evaluation function value. Node Q being minimizer always moves to 5 rather than
T. the value at 5 (6) is not we used by Q as a reference point. The value is
called β is acceptable and values more than β are seldom.
Bayesian Networks
-
Bayesian networks also known as Bayes Nets, Belief Nets cause nets and
probability nets, are a space efficient data structure for encoding all of the
information in the full joint probability distribution for the set of random
variables defining a domain
-
Represents all of the direct causal relationships between variables
-
In punitively to construct a Bayesian net for a given set of variables draw are
from cause variables to immediate effects.
-
Space efficient because it exploits the fact that in many real world problem
domains the dependencies between variables are generally local, so there are a
lot of conditionally independent variables
-
Captures both qualitative and quantitative relationships between variables
-
Can be used to reason: -
i)
Forward (top – down) from causes to effects predictive reasoning (aka causal
reasoning)
ii)
Backward (bottom – up) from effects to causes diagnostic reasoning
-
Formally a Bayesian Net is a directed a cyclic graph (DAG) where is a node for
each random variable and a directed are from A to B whenever A is a direct
causal influence
-
Each node A in a net is conditionally independent of any subset of nodes that
are not descendant of a given the parents of A.
Case based Reasoning: - In
case based reasoning the cases are stored and accessed to solve a new problem.
To get a prediction for a new example, these cases that are similar or close to
the new example this is at one extreme of the learning problem where unlike
decision trees and neural networks relatively little work must be done offline
and virtually all of the work is performed at query time.
Case based reasoning can be used
for classification and regression. It is also applicable when the cases are
complicated, such as in legal cases where the cases are complex legal rulings
and in planning, where the cases are previous solutions to complex problems
If the cases are simple one
algorithm that works well is to use the k – nearest neighbors for some given
number K. given a new example the K training examples that have the input
features closest to that example are used to predict the forget value for the
new example.
The prediction can be the mode
average or some interpolation between the predication of these k. training
examples perhaps weighting closer examples more than distant examples.
For this method to work a
distance metric is required that measures the closeness of two examples. First
define a metric for the domain of each feature in which the values of the
features are converted to a numerical scale that can be used to compare values.
Unit 5
Machine Learning
Learning: - The
process of knowledge as equation is called learning. There are various types of
learning.
- Rote Learning (Learning by
Memorizations): - Knowledge a equation itself includes many
different activities. Simple storing of computing information or rote learning
is the most basic learning activities may computer programs examples database
systems can be used to learn in this sense slough most people could not called
such simple storage as learning however many IT programs rote learning
techniques. When a computer stored a paces of data it is performing a rote
learning such learning are used full for improving the performance of the
systems.
- Learning by Analogy
a) Transformational Analogy
Suppose
we are asked to prove theorem in plane geometry we might look for a previous
theorem that is very similar and copies its proof, making substitution when
necessary. The idea is to transform a solutions to a previous problem into a
solutions for the current problem such learning is called learning by
transformation analogy.
The example for transformational
analogy is five below
Figure:
-
b) Derivational Analogy
Figure:
-
Transformation analogy if does
not look at how the old problem was solved it look at the final solution after
the twist and terms in solving an old problem are relevant to solving a new
problem. The detail history of problem solving is called its derivation
analogical reasoning that tables these histories in to account is called
derivational analogy.
Explanation Based Learning (EBL): - An
explanation based learning system accepts and example (i.e. training example)
an explains what it learns from the example. The EBL system takes only the
relevant aspects of the training. These explanations is translated in to
particular form that a problem solving program can understand so that it can
used to solve other problem
We can think EBL program as
specifying the following input.
-
A training example: - what the training program size in the world.
-
A goal concept: - A high level description of which the problem is supposed to
known
-
A operationally (
): - A description of which concept are useable
-
A domain theory: - A set of groups that gives the relationship between the
activities between domains
Inductive Bias Learning: - A
major problem in machine learning is that of inductive bias how to choose a
learners hypothesis space so that it is large enough to contain a solution to
the problem being learnt yet small enough to ensure reliable generalization
from reasonably sized training sets. Typically such bias is supplied by hand
through the skill and insights of experts. In this paper a model for
automatically learning bias is investigated. The central assumption of the
model is that the learner is embedded within an environment of related learning
tasks.
Within such an environment the
learner can sample from multiple tasks and hence it can search for a hypothec
is space that contains good solutions to many of the contains on the set of all
hypothesis spaces available to the learners we show that a hypothesis space
that performs well on a sufficiently large number of training tasks novel task
in the same environment. Explicit bounds are also derived demonstrating that
learning multiple tasks can potentially give much better generalization than
learning a single task.
Genetic Algorithms: - This
is an introduction to genetic algorithm methods for optimization. The
continuing price/performance improvements of computational systems has made
them attractive for some types of optimization. In particular genetic
algorithms work very well on mixed. Combinational problems. But they tend to be
computationally expensive. To use a genetic algorithm you must represent a
solution to your problem as a genome. This presentation outlines some of the
basics of genetic algorithms. The three most important aspects of using genetic
algorithms are
-
Definition of the objective function
-
Definition and implementation of the genetic representation and
-
Definition and implementation of the genetic operators
Once these three have been
defined the generic algorithm should work fairly well. Beyond that you can try
many different variations to improve performance find multiple optima or
parallelize the algorithms.
Application of AI
Export System: - Export
system are knowledge intensive programs that solve problem in a domain that
require considerable amount of technical information the Brattice computer
society community of the specialist prove on export system as formed the
following generation
-
The embodiment within a computer of a knowledge based component from on export
skill in such a form that the machine can offers that intelligence take
intelligence design about of the specification.
A desirable additional characteristics
which may regard fundamental each the capability of the system on demand to
justified its own line of reasoning in a manner directly to the enquire
Characteristics Expert System (CES)
Following
are the different characteristics expert system
-
They should solve difficult problem in a domain as good as or better than on
expert
-
They should process vast quantities of domain specific knowledge in the detail
-
These system promote the use of heuristic search process. It must be cleared
that brought search techniques are in practical and to managed the problem
heuristic search procedure process the management
-
They explain why they question and justify their confusion. Explanation
facilities enhance treatability system in the mind of human
-
They accept advice modify update and expand
-
They communicate with the users in their own natural language
-
They provides extensive facility part simply processing greater than numeric
processing
Goal in Problem Solving
Introduction: - "Developing
computers programs to solve complex problems by the application of processes
that are analogous to human resourcing process"
AI is the ability of a program
to perform the same kinds of functions that characterize human thoughts which
includes.
i) Systems
that thinks like human
ii) Systems
that thinks acts like human
iii) Systems
that thinks think rationally
iv) Systems
that thinks acts rationally
i) Systems that thinks like humans: - This
requires getting inside of the human mind to see how it works and then
comparing our computer programs to this. This is what cognitive science afferents
to do. An others way to do this is to observe a human problems solving and rogue
that one's programs go about problem solving in similar way.
ii) Systems that act like human: - To
be considered intelligent a program must be able to act sufficiently like a
human to fool an interrogator. The machine and the human are isolated from the
person carrying out the test and messages are exchanged via a keyboard and
screen. If the person cannot distinguish between the computer and the human
being then the computer must be intelligent.
iii) System that think rationally: - For
example all computers use energy. Using energy always generates heat. Therefore
all computers generate heat. This initiates the field of logic. Formal logic
was developed in the lot nineteen century. This was the first step forwards
enabling computer programs to reason logically.
iv) System that act rationally: - Acting
rationally means acting so as to achieve one's goals given one's beliefs. An
agent is just something that perceives and acts. In the logical approach to AI
the emphasis is on correct inferences.
Function of AI
- Philosophy: - Logic methods of
reasoning mind as physical system foundations of Learning, Language, and
Rationality.
- Mathematics: - Formal representation
and proof algorithm, computation, decidability, tractability, probability.
Philosophers staked out most of the important ideas of AI but to move to a
formal science requires a level of mathematics formulism in three main areas
computation logic and probability.
- Economics: - Utility decision theory
- Neap Science: - Physical substrate
for mental activity
- Psychology: - Phenomena of perception
and motor control, experimental techniques. The principle characteristic of
cognitive. Psychology is the brain processes and process information.
- Computer Engineering: - Building fast
computers
- Control Theory: - Design systems that
maximize an objective function over time
- Linguistics: - Knowledge
representation grammar having a theory of how human successfully process
natural language is an AI complete problem if we could solve this problem then
we would have created a model of intelligence.
Application area of an AI: - Today's AI
systems have been able to active limited success in some of these tasks.
- In computer
vision the systems are capable of face recognition
- In Robotics
we have been able to make vehicles that are mostly automats.
- In natural
language processing we have systems that are capable of simple machine
translation
- Today's
Expert systems can carry out medical diagnosis in a narrow domain
- Speech
understanding systems are capable of recognizing several thousand words
continuous speech
- Planning
and scheduling systems had been employed in scheduling experiments with the
Hubble Telescope.
- The
Learning systems are capable of doing text categorization into about a 1000
topics
- In games AI
systems can play at the Grand Master level in chess (World Champion) checkers
etc.
What can AI system NOT do yet?
- Understand
natural language robustly (e.g. read and understand articles in a newspaper)
- Surf the
web
- Interpret
an arbitrary visual science
- Learn a
natural language
- Construct
plans in dynamic real time domains
- Exhibit
true autonomy and intelligence
Goal Schemas: - To build a system to
solve a particular problem we need to do four things.
- Define the
problem precisely. This definition must include precise specifications of what
the initial situations will be as well as what final situations constitute
acceptable solutions to the problem.
- Analyze the
problem. A few very important features can have an immense impact on the
appropriateness of various possible techniques for solving the problem
- Isolate and
represent the task knowledge that is necessary to solve the problem.
- Choose the
best problem solving techniques and apply them to the particular problem
i) Search Problem: - It is
characterized by an initial state and a goal state description. The guesses are
called the operators where a single operator transforms a state into another
state which is expected to be closer to a goal state. Here the objective may be
to find a goal state or to find a sequence of operators to a goal state.
Additionally the problem may require finding just any solution or an optimum
solution.
ii) Planning: - The purpose of planning
is to find a sequence of actions that achieves a given goal when performed
starting in a given state. In other words given a set of operator instances
(defining the possible primitive actions by the agent) an initial state
description and a goal state description or predicate the planning agent
computers a plan.
Simple Planning Agent: - The problem – solving agents are able to
plan a head to consider the consequences of sequences of actions before acting.
And a knowledge – based agents can
select actions based on explicit, logical representations of the current state
and the effects of actions
Problem
Solving Agents + Knowledge – based Agents = Planning Agents
Linear Planning: - Basic idea work and
one goal until completely solved before moving on to the next goal planning
algorithm maintains goal stack
i) Implications
- No inter
leaving of goal achievement
- Efficient
search if goals do not interact
ii) Advantages
- Reduced
search space since goals are solved one at a time
-
Advantageous if goals are (mainly) independent
- Linear
planning is sound
Iii) Disadvantages
- Linear
planning may produce sub optional solutions
- Linear
planning is incomplete
Concept of non – linear planning
Use goal set instead of goal
stack. Include in the search space all possible sub goal ordering. Handles goal
interactions by interleaving.
Advantages
- Non –
linear planning is sound
- Non –
linear planning is complete
- Non –
linear planning may be optimal with respect to plan length (depending on search
strategy employed)
Disadvantage
- Larger
search space since all possible goal orderings may have to be considered
- Somewhat
more complex algorithm more bookkeeping
Means – Ends Analysis: - The means –
ends analysis concentrates around the detection of differences between the
current state and the goal state. Once such difference is isolated an operator
that can reduce the difference must be found. However perhaps that operator
cannot be applied to the current state. Hence, we setup a sub – problem of
getting to a state in which it can be applied. The kind of backward chaining in
which the operators are selected and then sub goals are setup to establish the
preconditions of the operators is known as operator sub – goal.
Just like the other problem
solving techniques, means – ends analysis relies on a set of rules that can
transform one problem state into another. However these rules usually are not
represented with complete state descriptions on each side. Instead, they are
represented as left side, which describes the conditions that must be met for
the rule to be applicable and a right side, which describes those aspects of
the problem state that will be changed by the application of rule. A separate
data structure called a difference table indexes the rules by the differences
that they can be used to reduce.
Algorithm: Means – Ends Analysis
- Compare
CURRENT to GOAL. If there are no differences between them, then return.
- Otherwise,
select the most important difference are reduce it by doing the following until
success or failure is signaled
a) Select a
new operator O, which is applicable to the current difference. If there are no
such operators then signal failure.
b) Apply O to
CURRENT. Generate descriptions of two states, O – START a state in which O's
preconditions are satisfied and O – RESULT, the state that would result if O
were applied in O – START
Production Rules Systems: - Since
search is a very important process in the solution of hard problems for which
no more direct techniques are available, it is useful to structure AI programs
in a way that enables describing and performing the search process. Production
systems provide such structures. A production systems consists of:
- A set of
rules each consisting of a left side that determines the applicability of the
rule and a right side that describes the operation to be performed if the rule
is applied.
- One or more
knowledge or databases that contain whatever information is appropriate for the
particular task.
- A control
strategy that specifies the order in which the rules way of resolving the
conflicts that arise when several rules match at once.
i) Forward Chaining Systems: - In a
forward chaining system the facts in the system are represented in a working
memory which is continually updated. Rules in the system represent possible
actions to take when specified conditions hold on items in the working memory
they are sometimes called condition – action rules. The conditions are usually
patterns that must match items in the working memory while the actions usually
involve adding or deleting items from the working memory.
The interpreter controls the
application of the rules, given the working memory, thus controlling the
system's activity. It is based on a cycle of activity sometimes known as a
recognize act cycle. The system first checks to find all the rules whose
conditions hold, given the current state of working memory. It then selects one
and performs the actions in the action part of the rule. The actions will
result in a new working memory and the cycle begins again. This cycle will be
repeated until either no rules fine or some specified goal state is satisfied.
ii) Backward Chaining Systems: - So far
we have looked at how rule based systems can be used to draw new conclusions
from existing data adding these conclusions to a working memory. This approach
is most use full when you know all the initial facts, but don't have much idea
what the conclusion might be.
If we do know what the
conclusion might be, or have some specific hypothesis to test forward chaining
systems may be inefficient. We could keep on forward chaining until no more
rules apply or you have added your hypothesis to the working memory. But in the
process the system is likely to do a lot of irrelevant work adding
uninteresting conclusions to working memory.
iii) My CIN Style Probability and its
Application: - In artificial intelligence, My CIN was an early expert
system designed to identify bacteria causing severe in factions, such as
bacteremia and meningitis, and to recommend antibiotics, with the amount
adjusted for patient's body weight the name derived from the antibiotics
themselves, as many antibiotics have the suffix "MYCIN". The MYCIN
system was also used for the diagnosis of blood clotting diseases.
MYCIN was developed over five or
six years in the early 1970s at Stanford University in Lisp by Edward short
life. MYCIN was never actually used in practice but research indicated that it
proposed an acceptable therapy in about 69% of cases, which was better than the
performance of infectious disease experts who were judged using the same
criteria. MYCIN operated using a fairly simple inference engine, and a
knowledge base rules. It would query the physician running the program via a
long series of simple Yes/No or textual question. At the end it provided a list
of possible culprit bacteria ranked from high to low based on the probability
of each diagnosis, its confidence in each diagnosis probability, the reasoning
behind each diagnosis and its recommended course of drug treatment.
Practical use/Application: - MYCIN was
never actually used in practice. This wasn't because of any weakness in its
performance. As mentioned in tests it output formed members of the Stanford
medical school faculty. Some observers raised ethical and legal issues related
to the use of computers in medicine if a program gives the wrong diagnosis or
recommends the wrong therapy, who should be held responsible?
Unit 2 Intelligence
Introduction of Intelligence: - Artificial
intelligence is concerned with the design of intelligence in and artificial
device. The turn was invented by MC Cathy in 1956.
Artificial intelligence is about
designing system that are as intelligent as human. This view involves trying to
understand human through and an effort to build machines that emulate the human
though process. This view is the cognitive science approach to AI.
Common Sense Reasoning: - Common sense
is ability to analyze the situation best on it context, using millions of
integrated pieces of common knowledge depends on being able to do common sense resining
central part of intelligent behavior.
Example every know that drawing
a glass of water the glass will break and water will spill. However this
information is not obtained by formula or equation. Common sense knowledge
means what everyone knows. Example: -
- Every
person is younger then the person's mother
- People
don't like being repeatedly interrupted
- If you hold
a knife by its blade then the blade may cut you.
- People
generally sleep at right
Agents: - An agent is anything that can
be viewed as perceiving its environment through sensors and acting upon that
environment through actuators
- Human
agent; eyes, and other organs for sensors; hands, legs, mouth and other body
parts for actuators
- Robotic
agent; cameras and infrared range finders for sensors; various motors for
actuators agents and environments
Figure: -
Personality of Agent
Environment Type
- Fully
observable (Vs. partially observable): An agents sensors give it access to the
complete state of the environment at each point in time
-
Deterministic (Vs. stochastic): The next state of the environment is completely
determined by the current state and the action executed by the agent.
- Episodic (Vs.
sequential): The gent's experience is divided into atomic "episodes",
and the choice of action in each episodes depends only on the episode itself
- Static (Vs.
dynamic): The environment in unchanged while an agent is deliberating. (The
environment is semi dynamic if the environment itself does not change with the
passage of time but the agent's performance score does)
- Discrete (Vs.
continuous): A limited number of distinct clearly defined percepts and actions.
Agent Types
Four basic types in order of
increasing generality
- Simple
reflex agents
- Model based
reflex agents
- Goal based
agents
- Utility
based agents
- Simple Reflex Agents: - The agent
select an action best on the current precept ignoring the rest of the precept
history
Figure: -
Simple Reflex Agent
- Model Based Reflex Agent: - The agent
decides its actions best on of predefined set of condition action rules. For
e.g.: - a telephone operator answering machine
Figure: -
Model based reflex agent
- Goal based Agent: - The agent decides
its action best on a known a goal. For e.g.: - a GPS system finding a path to
certain destination
Figure: -
Goal Based Agent
Unit 3
Knowledge Representation
Knowledge Representation and Reasoning: - Intelligent
should have capacity for
- Receiving: - That is representing its
understanding of the world
- Knowledge Representation: - That is
representing its understanding of the world
- Reasoning: - That is inferring the
implications of what it knows and of the choices ithas.
- Acting: - That is choosing what it
want to do and carry it out.
Representation of knowledge and
the reasoning process are central to the entire field of artificial intelligent.
The primary component of a knowledge best agent is its knowledge base. A
knowledge best is a set of sentences. Each sentence is expressed in a language.
Sentences represent some assertion about the world. There must be mechanisms to
derive new sentences from old sentences. This process is known as inference or
reasoning. Inference must obey primary requirement that the new sentences
should follow logically from the previous one.
Approaches to knowledge Representation: - A
good system for the representation knowledge in a particular dement should
possess the following properties
-Representational Adequacy: - The
ability to represent all of the kinds of knowledge that are needed in that
domain.
-Inferential Adequacy: - The ability to
manipulate the representation structures in such a way as to derive new
structure cross ponding to new knowledge inferred from old.
- Inferential Efficiency: - The ability
to incorporate in to the knowledge structure additional information that can be
used to focus the attention of the inference mechanism in the most promising
direction.
- Inquisitional Efficiency: - The
ability to acquire new information easily. The simplest case involve direct
instruction of new knowledge into the database.
Logic: - Logic is the primary vehicle
for representing and resuming about knowledge. The advantage of using formal
logic as a language of AI is that it is price and deferent. These allows
program to be written which are declarative. This however leads to seven
limitation. Clearly a large person of the reasoning carried out by human depended
on handling knowledge that is on certain. Logic cannot represent this uncertainty
well. Similarly natural language resurging require inferring hidden state like
the intention of the speaker.
A logic consist of two parts, a
language and method of measuring. The logical language intern as two aspects,
syntax and semantics. They are
- Syntax: - The atomic symbols of the
logical language and the rules for constructing well formed a non-atomic expression
of the logic. Syntax specifies the symbols in the language and how they can be
combined to form sentences.
- Semantics: - The meanings of the
symbol of the logic, and rules there for demining the meaning of non – atomic
expression of the logic. It specifics what facts in the world a syntax refers
to. A fact is a claim about the world and may be true or false some popular
logics are propositional logic, first order predicate logic high order
predicate logic and fuzzy logic.
- Propositional Logic: - In PropositionalLogical
(PL) and user defines a set of propositional symbols like P&Q. User defines
the semantics for each of these symbol. For e.g.: -
P means
"It is hot"
Q means
"It is humid"
R means
"It is raining"
- A symbol
- If S is a
sentence than "~" is a sentence, where "~" is the not
logical operator?
- If sand PR
sentences then (S˅T), (S˄T) (S→T) and (S<→T) are also sentences for e.g.: -
(P˄Q)→R
It is hot and
humid then it is raining
Q→P
If it is
humid then it is hot R It is raining
- Given the
truth value of all of the constituent symbol in a sentence that sentence can be
content the value true or fails. This is called an inter pretention of the
sentence
- A model is
an inter pretention of a set of sentences such that each sentence is true. A model
is just a formal mathematical structure that stands in for the world.
- A valid
sentence (also called as tautology) is a sentence that is true under all inter
pretention. Hence no matter what the world is actually like or what the
semantic is the sentence is true.
- An
inconstant sentence (called on satisfy able or a contradiction) is a sentence
that is false under all inter reaction. Hence the world is never like that it
describes
First Order Logic
Syntax: - Syntax are symbol users the
symbols or alphabet be aware that there are all sorts of solidly different ways
to define first order logic
a) Alphabet: - There are different
types of symbols they are
- Logical Symbol: - These are symbols
that have a standard meaning like AND, OR, NOT, ALL, EXIT, IMPLIES if FALSE,
TRUE etc.
- Non Logical Symbol: - They are one
dimensional array two dimensional array N dimensional array functions (1 ary 2
array …….. n …….ary) variables etc.
b) Terms: - A term is either and
individual constant or a variable are any function applied to a terms.
c) Atomic Formula: - An atomic formulae
is either false are an n dimensional array predicate applied to ‘n’ terms
d) Literals: - A literals is either an
atomic formula (Positive literal) or the negation of an atomic formula (a negative
literals) a ground literal is avariable free literal
e) Clauses: - Clause is a disjunction
of literals a ground cause is a variable free clause a Horn clause is a clause
with at most one +ve literal a definite is a hornclause with exactly one +ve literal
Logical Agents
In logical agents we design
agents that can form representation of the world, use a process of in France to
derive new representation about the world and use these new representations to
reduce what to do?
- Knowledge
base agent the central component of knowledge base agent is its knowledge base.
A knowledge base is a set of sentences. Each sentence is expressed in a
language called a knowledge presentation language and represents some accretion
about the world.
|
Function: - KB – AGENT (percepts) return
an action
Static: - KB, a knowledge base t, a
counter initially 0.
TELL (KB, MAKE – PERCEPT – SENTENCE
(Percept t)
Action ← ASK (KB, MAKE – ACTION – QUERY (
TELL (KB MAKE – ACTION – SENTENCE (action
t))
T = ++1
Return action
|
Fig: - A
generic knowledge base agent
Figure shows the outline of a
knowledge best agent program. Like all our agents it text a percept as I/P and
returns an action. The agent Montana a Knowledge Base (KB) which may initially
content some background knowledge base what it perceives, second, it asks the
knowledge base what action should perform. In the process of answering this
query, extensive reasoning may be done about the current state of the world,
about the outcomes of possible action sequences and so on. Third, the agent
recorders its choice with tell and executed the action.
Formal Logic Connectives Syntax, Semantics
Syntax
- Rules for
constructing legal sentences in the logic
- Which
symbol we can use
- How we are
allowed to combine symbols
-
Propositions
- Connective
and, or, not,
implies, if (
)
Semantics
-
How we interpret (read) sentences in the logic
-
Assign a meaning to each sentences
-
Use true the table to work out the truth of statement
Semantic Network
Figure:
The idea behind the semantic
network is that knowledge is often best understood as a set of concept that are
related to one another. The meaning of a concept is defined by its relationship
to another concept. A semantic network consist of a set of node that are
connected by labeled arcs. The nodes represent concepts and the arcs represents
relations between concepts.
Common Sematic Relations
INSTANCE
X
is an INSTANCE of Y, if X is a specific example of the general concept Y.
ISA
X
ISA Y, if X is a subset of the more general concept Y e.g.: - sparrow ISA bird.
Haspart
X
has part Y, if the concept Y is a part of the concept X. e.g.: sparrow has part
tail.
- Semantic Tree
A
semantic tree is a representation that is a semantic net I which shorten links
are called branches. Each branch connects two node. The head node is called
parent node and tail node is called child node. One node has no parent; it is
called the root node. Other nodes have exactly one parents. Some nodes have no
children; they are leaf node when two nodes are connected to each other by a
chain of two or more branches one is set to be the ancestor; the other is set
to be the descendent.
- Inheritance
Inheritance
is a key concept in semantic n/w and can be represented naturally by following
ISA link. In general, if concept X has property P, then all concepts that are a
subset of X should also have property P. In practice, inherited properties are
usually treated has default values. If a node has direct link that contradicts
inherited property, then the default is over rider.
- Multiple Inheritance
Ø
Multiple inheritance allows an object to
inherit properties from multiple concept
Ø
Multiple inheritance can sometime allow
an object to inherit conflicting properties.
Ø
Conflicts are potentiallyunatonable so conflict
resolution strategies are needed
Predicate Calculus (Predicate Logic)
In
mathematical logic, predicate logic is generic turn for symbolic formal systems
like first order logic, second order logic or many sorted logic. This formal
system is distinguished from other system in that its formula content variables
which can be quantified. Two common quantifies are existential ᴲ (“There
exist”) and universal U (“for all”) quantifies. Predicate calculus symbols may
represent either Constance variable, function, predicate. Constance name
specific objects are properties in the domain of this coursed. Thus tree tall
and blue are examples of well form constant symbols. The constant true and false
are included. Functions denote mapping of one or more elements in a set called
the domain of the function. In to a unique element of another set. Elements of
the domain and range are objects in the old of discourse. Every function
symbols have an associated entity indicating the number of element in the
domain mapped on to each element of range.
Predicate
logic uses three additional notation they are
i) Predicate
A predicate is a relation that
binds two items together for example: Krishna like apple. Know we can write
like (Krishna, like apple) where like is predicate that links two items Krishna
and Apple.
Thus predicate can be
generalized as like X, Y where X and Y are the variable it means X likes Y
ii) Terms (Literals)
Terms are arguments in a
predicate logic example Ravi’s father is Ranis father that is father (father
iii) Quantifiers
A quantifiers is a symbol that
permits to declare or identify the range or scope of variables in a logical
expression. There are two types of quantifiers they are
-
Universal quantifiers
-
Existential quantifiers
- Universal Quantifiers
If
A is a variable the ¥a is read as
i)
for all A
ii)
for each A
iii)
for every
- Existential Quantifiers
If B is a variable then ϶b is
read as
i)
there exist B
ii)
for some B
iii)
for at histone B
Resolution
Robinson
in 1965 introduce the resolution principle which can be directly apply to any
set of clues. The principle is given any two clues A and B, if there is lateral
Bin A and which has complementary term >p in B, delete P from A and B an
construct a new close of the remaining clues. The clues so constructed is
called “resolving of A and B”.
Substitution
Resolution
works on the principle of identifying complementary literals in two clues a
deleting then there by forming a new literal. The process is simple an state
forward where are variables the problem becomes complicated and there is
necessary to make proper substitution.
There
are three major types of substitution
-
Substitution of variable by a constant
-
Substitution of variable by another variable
-
Substitution of variable by function that does not have same variable
Unification
In
prepositional logic it is easy to determine that how literals cannot both be
tree at the same time for example: man (John) &Ʌ man (john) thus
in order to determine contradiction win need a machine procedure that compares
two literals at discourse where their exist a set of substitution that made
them identical there is a state forward recursive procedure called unification
algorithm. The basic idea of unified two literals we fast check if their
initial predicate symbols are the same. If so we can processed otherwise there
is no way to unified regard less of their arguments.Suppose we want to unify an
expressions P(K,Y) & P(K,Z) here the predicate is same so we can unify by
substituting Z by Y.
Frame
Frame
is a collection of attribute slots and associated values that describe some
real word entity. Frames on their own are not particularly help full but frames
systems are powerful way of encoding information to reasoning process. A frame
structure provides facilities for describing objects facts over situation
procedure on what to do when a situation is encounter.
Types of Frames
- Declaration Frame: - A
frame that contains description about an object is called a declarative frame.
The computer center frame describable it a typical example of subscribe frame
- Procedural Frame: - It
is possible to have procedural knowledge represented in a frame. Such frame
which have procedural knowledge embedded in it are called procedurals frames.
The procedural frames as following slots
a) Actor Slots: - It
holds information about who is performing the activity
b) Object Slots: - This
slots as information about the item to perform on
c) Source Slots: - Source
slots holds information from where the action as to end
e) Task Slots: - This
generates the necessary sub slots required to perform the operation
Approach to Knowledge Representation: - A
good system for knowledge representation should passes the following property
- Representation Adequacy: -
The ability to represent all kinds of knowledge that are needed in that domain
- Interracial Adequacy: -
The ability to manipulate the representation structure in such a way as to
derive new structures of new knowledge inference form old.
- Acquisitioned Efficiency: - The
ability to acquire the new information easily. The simplex case involves direct
insertion by a person as new knowledge in to the knowledge base.
- Inferential Efficiency: - The
ability to incorporate into the knowledge structure additional information that
can use to fours the attention of the inference mechanism in most per mistingdirection
Knowledge
Representation Technique
(a) Simple relational knowledge: -
The simple way of storing facts page to use a simple relational method where
each fact about a set of object which set at systematically in columns. This
representation gives little opportunityfor inference but it can be used as
knowledge bases for inference engine.
(b)Inheritable knowledge: - Relational
knowledge is made up of constitute of institute and cross ponding associated
values we extend the base more by allowing inference mechanism for property in
heritance is used. In property inheritance of a class.
(c)Inferential knowledge: - In
inferential knowledge logic knowledge is represented as formal for example all
dogs have tell an in formal logic it is return as
Advantage
-
A set of strict rule
-
Can be used to derive
-
Make
-
Popular in AI system
(d) Procedural knowledge: -It
is also called operational knowledge which specifies what to do when. In this
control information is necessary to use the knowledge in embedded in the
knowledge base itself
Unit 4
Inference and Reasoning
State Space Representation Technique: - A
set of all possible states for a give problem is known as state space of the
problem. For example let us consider us consider an 8 tiles puzzle game. The
puzzle consist of a squire frame contenting at tiles and an empty slot. The
tiles are number from 1 to 8. It is possible to move the tiles in the squire field
by moving a tile in to the empty slot. The objective is to get the squire in a
numerical order
Rules: - The
operator for this problems are
Up: - If the heal is not
touching the top frame move it up.
Down: - If
the heal is not touching the bottom frame move it down.
Left: - If
the heal is not touching the left frame move it left.
Right: - If
the heal is not touching the Right frame move it right.
Figure
The state space is a directed
graph with all the state has nodes. A node is set to be existed if it is
possible to up tent it form the initial state by application of a set of
operators. A small fragment of state space for the 8 tile puzzle game as soon
above.
State space representation are
highly perinatal in AI because they provide all possible states operations and
the goal. If the entire state space representation for a problem it’s given it
is possible trace the part from the initial state to the goal state and
identifies the sequence of operators. The major disadvantage of this method is
that it is not possible to visualize all states for a given problem. More ever,
the resources of the computer system are limited to handle huge state space
representation.
Heuristic Search
Breath
first searching is a uniforms search because they do not have any domain
specific knowledge. Heuristics are approximations use to minimize the searching
process. The process of searching can be drastically reduced by the use of
heuristic. Generally two categories of problems are heuristic
-
Problem for which no exact algorithms are known and one needs to find an
approximation and satisfying solution
-
Problem for which exact solution is known but computationally in fusible.
The heuristic which are needed
for serving problems are generally represented as a heuristic function which
maps the problem state in to numbers. This numbers are then approximately used
to guide search. The following algorithm make use a drastic evaluation function
- Hill Climbing Search: - This
algorithm is also called discrete optimization algorithm which uses a simple
heuristic function to calculate the amount of distance the node is from the
goal. In fact there is no different between hill climbing search and deft
search except that the children of the node that has been expended are shorted
by remaining distant
Algorithm
- Put the initial list on
start
-
If start = empty or start = goal terminate search
-
Remove the first node from the start called this node A
-
If A = goal terminate search with success
-
If node has a successor generate all of them. Find out how far they are from
the goal node sort they by remaining distance from the goal and at them to the
- Best First Search: - This
is also heuristic search the heuristic function used here are called evaluation
function each and indicates how far the node is from the goal node. Goal node
have an evaluation function value of O (Zero)
It is explained using a search
give above. First the start node is expended. It has three children A, B and C
with evaluation function 3, 6 and 5 respectively. These values approximately
indicate how far they are from the goal node. The child with minimum value ‘A’
is chosen. The children’s of ‘A’ are generated. They are ‘D’ and ‘E’ with evaluation
function 9 and 8 with evaluation at. The search process has how four node to
search that is the node ‘D’ with evaluation function 9, ‘E’ with 8, ‘B’ with 6
and ‘C’ with 5 where ‘C’ has got the minimum value which is expanded to give
node ‘H’ which value is 7. At this point the node available for search are (D:
9), (E: 6) (H: 7)
Algorithm
-
Put the initial node on a list START
-
If START empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successes generate all of them find out how far they are
from the goal node. Short all the child generated so far by the remaining
distance from the goal
-
Replace start with START
-
Go to step 2
- A* Search (Aversa Search): - In
best first search we brought in a heuristic value called evaluation function
value. It is a value that estimates how far a particular estimate node is from
the goal node. A part from the evaluation function value one can also bring
that is cost function. Cost function indicates how much resources take time
energy money etc. has been spent in reading a particular node from the start.
If it is possible for one to obtain the evaluation values and cost function
values the A* algorithm can be used.
Algorithm
-
Put the initial node unless START
-
If START = empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successor generate all of them. Estimate the fitness
number (The sum of evaluation function and cost along the reading to that state
is called fitness number) of the successes by totaling the evaluation function
values and cost function value. Short the list by fitness number
-
Need the new list as START 1
-
Replace start with START 1
-
Go to step 2
AO* Search
Game Playing in AI: - There
are two major components in game playing they are
i) Plausible Move Generator: - If
we are to employee a simple move generator then it might not be possible to
examine all the states. Has it is essential that only very selected moves or
pats the examine for this purpose only one has a flexible move generator that
expends are generates only selected moves
ii) Static Evaluation Function
Generator: - This
is the most important components of the game playing program. Based on
heuristic this generates the static evaluation function value for each and
every move that is being made. The study evaluation function gives a snapshot
of a particular move. More the static evaluation function value more in the possibility
for victory. The basic method available for game playing are
- Min – Max Strategy: - Min
– max strategy is a simple strategy for two person gene playing. Here players
are called maximizer and minimizer both are opponent to each other. Maximizer
and minimizer fights it out to see that the opponent get minimum benefit and
they get the maximum benefit. The play sable move generator generate necessary
for the farther evaluation and the static evaluation function ranks each of the
position
Figure
Let AB the initial state of the
game, the plausible move generator generates children’s for that move and the
static evaluation function generate assign the value given along with each of
the state. It is assume that that the static evaluation function generators
returns a value from – 20 to +20 where a value of +20 indicates a win for
maximizer and a value of -20 indicates a wine for minimizer makes first move
the maximizer always tries to go the position where the static evaluation
function value is maximizer positive value.
The maximizer being the player
to make the first move will to node D because static evaluation function value
of that maximum node. If the minimizer has to move he will go node be because
the static evaluation function value for that node is minimum
Figure
Fig:
- game tree explained by two level their association static evaluation function
value but a game playing strategy never stops with one level but loops a head
that is move a couple of levels down ward to those the optimal movies
Let’s examines this with the
help of above fig: Let’s assume that it is the maximizer who will to play first
floated by minimizer. Before the maximizer move to N, O, P he will have to
thing which move would be highly beneficial to him. It maximizer move to N next
will be minimizer term. The minimizer always this to other and he will move to
are (static evaluation function value = -6) this value is backed off to N.
If M move to O, then the minimizer
will move to V, which is the minimum of +4, +7 and 0 so, the value of 0 is
backed up as 0. Similarly the value of P will backed of -3.
The maximizer will know have to
choose between M, N, O, and P with the value of -6, 0 and -3. Being a maximizer
he will choose node 0 because if provides the maximize value corresponding to
other
- Min – Max Strategy with alphabet cut –
offs: -
Figure:
-
This is the modified version of
min max strategy algorithm where two threshold value are maintain for features
expansion. One threshold value is called alpha, which is lower bound on the
value the maximizer can be originated and other is beta (P) which represent the
upper bound of the value the minimizer can be assigned.
In this figure the maximizer has
to play first floated by the minimizer as done in min – max strategy. The
maximizer assign A value of 6 at Q (minimum at the values sand t). This values
is backed up P so the maximizer as assured of A value of 6 when he move to Q.
Now let see what happened at R. The value at V is -2 and U is unknown. Since,
the move is minimizing 1 by moving to R, P can get only A value of -2 or less
that is unacceptable for P because by moving to Q he is assured of value up 6 hence
he will never tries move other than children of R
Role of Alpha (α)
Figure: -
For P the maximizer A value of 6
is assured by moving a node Q. this value P is compared with that of value at
R, P be the maximizer could flow any path which value is greater than 6. Hence,
this value of 6 being the least at a maximizing move and set as value of α.
This value of alpha is now used as reference point. Any node which value is
greater than alpha is acceptable and all the node which values are less than
alpha is rejected.
Role of Beta (β)
Figure: -
In this figure is the minimizer
and the path for extension are chosen from values at the leaf node. Since 5 and
T are maximizer the maximum value of their children are back up as static
evaluation function value. Node Q being minimizer always moves to 5 rather than
T. the value at 5 (6) is not we used by Q as a reference point. The value is
called β is acceptable and values more than β are seldom.
Bayesian Networks
-
Bayesian networks also known as Bayes Nets, Belief Nets cause nets and
probability nets, are a space efficient data structure for encoding all of the
information in the full joint probability distribution for the set of random
variables defining a domain
-
Represents all of the direct causal relationships between variables
-
In punitively to construct a Bayesian net for a given set of variables draw are
from cause variables to immediate effects.
-
Space efficient because it exploits the fact that in many real world problem
domains the dependencies between variables are generally local, so there are a
lot of conditionally independent variables
-
Captures both qualitative and quantitative relationships between variables
-
Can be used to reason: -
i)
Forward (top – down) from causes to effects predictive reasoning (aka causal
reasoning)
ii)
Backward (bottom – up) from effects to causes diagnostic reasoning
-
Formally a Bayesian Net is a directed a cyclic graph (DAG) where is a node for
each random variable and a directed are from A to B whenever A is a direct
causal influence
-
Each node A in a net is conditionally independent of any subset of nodes that
are not descendant of a given the parents of A.
Case based Reasoning: - In
case based reasoning the cases are stored and accessed to solve a new problem.
To get a prediction for a new example, these cases that are similar or close to
the new example this is at one extreme of the learning problem where unlike
decision trees and neural networks relatively little work must be done offline
and virtually all of the work is performed at query time.
Case based reasoning can be used
for classification and regression. It is also applicable when the cases are
complicated, such as in legal cases where the cases are complex legal rulings
and in planning, where the cases are previous solutions to complex problems
If the cases are simple one
algorithm that works well is to use the k – nearest neighbors for some given
number K. given a new example the K training examples that have the input
features closest to that example are used to predict the forget value for the
new example.
The prediction can be the mode
average or some interpolation between the predication of these k. training
examples perhaps weighting closer examples more than distant examples.
For this method to work a
distance metric is required that measures the closeness of two examples. First
define a metric for the domain of each feature in which the values of the
features are converted to a numerical scale that can be used to compare values.
Unit 5
Machine Learning
Learning: - The
process of knowledge as equation is called learning. There are various types of
learning.
- Rote Learning (Learning by
Memorizations): - Knowledge a equation itself includes many
different activities. Simple storing of computing information or rote learning
is the most basic learning activities may computer programs examples database
systems can be used to learn in this sense slough most people could not called
such simple storage as learning however many IT programs rote learning
techniques. When a computer stored a paces of data it is performing a rote
learning such learning are used full for improving the performance of the
systems.
- Learning by Analogy
a) Transformational Analogy
Suppose
we are asked to prove theorem in plane geometry we might look for a previous
theorem that is very similar and copies its proof, making substitution when
necessary. The idea is to transform a solutions to a previous problem into a
solutions for the current problem such learning is called learning by
transformation analogy.
The example for transformational
analogy is five below
Figure:
-
b) Derivational Analogy
Figure:
-
Transformation analogy if does
not look at how the old problem was solved it look at the final solution after
the twist and terms in solving an old problem are relevant to solving a new
problem. The detail history of problem solving is called its derivation
analogical reasoning that tables these histories in to account is called
derivational analogy.
Explanation Based Learning (EBL): - An
explanation based learning system accepts and example (i.e. training example)
an explains what it learns from the example. The EBL system takes only the
relevant aspects of the training. These explanations is translated in to
particular form that a problem solving program can understand so that it can
used to solve other problem
We can think EBL program as
specifying the following input.
-
A training example: - what the training program size in the world.
-
A goal concept: - A high level description of which the problem is supposed to
known
-
A operationally (
): - A description of which concept are useable
-
A domain theory: - A set of groups that gives the relationship between the
activities between domains
Inductive Bias Learning: - A
major problem in machine learning is that of inductive bias how to choose a
learners hypothesis space so that it is large enough to contain a solution to
the problem being learnt yet small enough to ensure reliable generalization
from reasonably sized training sets. Typically such bias is supplied by hand
through the skill and insights of experts. In this paper a model for
automatically learning bias is investigated. The central assumption of the
model is that the learner is embedded within an environment of related learning
tasks.
Within such an environment the
learner can sample from multiple tasks and hence it can search for a hypothec
is space that contains good solutions to many of the contains on the set of all
hypothesis spaces available to the learners we show that a hypothesis space
that performs well on a sufficiently large number of training tasks novel task
in the same environment. Explicit bounds are also derived demonstrating that
learning multiple tasks can potentially give much better generalization than
learning a single task.
Genetic Algorithms: - This
is an introduction to genetic algorithm methods for optimization. The
continuing price/performance improvements of computational systems has made
them attractive for some types of optimization. In particular genetic
algorithms work very well on mixed. Combinational problems. But they tend to be
computationally expensive. To use a genetic algorithm you must represent a
solution to your problem as a genome. This presentation outlines some of the
basics of genetic algorithms. The three most important aspects of using genetic
algorithms are
-
Definition of the objective function
-
Definition and implementation of the genetic representation and
-
Definition and implementation of the genetic operators
Once these three have been
defined the generic algorithm should work fairly well. Beyond that you can try
many different variations to improve performance find multiple optima or
parallelize the algorithms.
Application of AI
Export System: - Export
system are knowledge intensive programs that solve problem in a domain that
require considerable amount of technical information the Brattice computer
society community of the specialist prove on export system as formed the
following generation
-
The embodiment within a computer of a knowledge based component from on export
skill in such a form that the machine can offers that intelligence take
intelligence design about of the specification.
A desirable additional characteristics
which may regard fundamental each the capability of the system on demand to
justified its own line of reasoning in a manner directly to the enquire
Characteristics Expert System (CES)
Following
are the different characteristics expert system
-
They should solve difficult problem in a domain as good as or better than on
expert
-
They should process vast quantities of domain specific knowledge in the detail
-
These system promote the use of heuristic search process. It must be cleared
that brought search techniques are in practical and to managed the problem
heuristic search procedure process the management
-
They explain why they question and justify their confusion. Explanation
facilities enhance treatability system in the mind of human
-
They accept advice modify update and expand
-
They communicate with the users in their own natural language
-
They provides extensive facility part simply processing greater than numeric
processing
Goal in Problem Solving
Introduction: - "Developing
computers programs to solve complex problems by the application of processes
that are analogous to human resourcing process"
AI is the ability of a program
to perform the same kinds of functions that characterize human thoughts which
includes.
i) Systems
that thinks like human
ii) Systems
that thinks acts like human
iii) Systems
that thinks think rationally
iv) Systems
that thinks acts rationally
i) Systems that thinks like humans: - This
requires getting inside of the human mind to see how it works and then
comparing our computer programs to this. This is what cognitive science afferents
to do. An others way to do this is to observe a human problems solving and rogue
that one's programs go about problem solving in similar way.
ii) Systems that act like human: - To
be considered intelligent a program must be able to act sufficiently like a
human to fool an interrogator. The machine and the human are isolated from the
person carrying out the test and messages are exchanged via a keyboard and
screen. If the person cannot distinguish between the computer and the human
being then the computer must be intelligent.
iii) System that think rationally: - For
example all computers use energy. Using energy always generates heat. Therefore
all computers generate heat. This initiates the field of logic. Formal logic
was developed in the lot nineteen century. This was the first step forwards
enabling computer programs to reason logically.
iv) System that act rationally: - Acting
rationally means acting so as to achieve one's goals given one's beliefs. An
agent is just something that perceives and acts. In the logical approach to AI
the emphasis is on correct inferences.
Function of AI
- Philosophy: - Logic methods of
reasoning mind as physical system foundations of Learning, Language, and
Rationality.
- Mathematics: - Formal representation
and proof algorithm, computation, decidability, tractability, probability.
Philosophers staked out most of the important ideas of AI but to move to a
formal science requires a level of mathematics formulism in three main areas
computation logic and probability.
- Economics: - Utility decision theory
- Neap Science: - Physical substrate
for mental activity
- Psychology: - Phenomena of perception
and motor control, experimental techniques. The principle characteristic of
cognitive. Psychology is the brain processes and process information.
- Computer Engineering: - Building fast
computers
- Control Theory: - Design systems that
maximize an objective function over time
- Linguistics: - Knowledge
representation grammar having a theory of how human successfully process
natural language is an AI complete problem if we could solve this problem then
we would have created a model of intelligence.
Application area of an AI: - Today's AI
systems have been able to active limited success in some of these tasks.
- In computer
vision the systems are capable of face recognition
- In Robotics
we have been able to make vehicles that are mostly automats.
- In natural
language processing we have systems that are capable of simple machine
translation
- Today's
Expert systems can carry out medical diagnosis in a narrow domain
- Speech
understanding systems are capable of recognizing several thousand words
continuous speech
- Planning
and scheduling systems had been employed in scheduling experiments with the
Hubble Telescope.
- The
Learning systems are capable of doing text categorization into about a 1000
topics
- In games AI
systems can play at the Grand Master level in chess (World Champion) checkers
etc.
What can AI system NOT do yet?
- Understand
natural language robustly (e.g. read and understand articles in a newspaper)
- Surf the
web
- Interpret
an arbitrary visual science
- Learn a
natural language
- Construct
plans in dynamic real time domains
- Exhibit
true autonomy and intelligence
Goal Schemas: - To build a system to
solve a particular problem we need to do four things.
- Define the
problem precisely. This definition must include precise specifications of what
the initial situations will be as well as what final situations constitute
acceptable solutions to the problem.
- Analyze the
problem. A few very important features can have an immense impact on the
appropriateness of various possible techniques for solving the problem
- Isolate and
represent the task knowledge that is necessary to solve the problem.
- Choose the
best problem solving techniques and apply them to the particular problem
i) Search Problem: - It is
characterized by an initial state and a goal state description. The guesses are
called the operators where a single operator transforms a state into another
state which is expected to be closer to a goal state. Here the objective may be
to find a goal state or to find a sequence of operators to a goal state.
Additionally the problem may require finding just any solution or an optimum
solution.
ii) Planning: - The purpose of planning
is to find a sequence of actions that achieves a given goal when performed
starting in a given state. In other words given a set of operator instances
(defining the possible primitive actions by the agent) an initial state
description and a goal state description or predicate the planning agent
computers a plan.
Simple Planning Agent: - The problem – solving agents are able to
plan a head to consider the consequences of sequences of actions before acting.
And a knowledge – based agents can
select actions based on explicit, logical representations of the current state
and the effects of actions
Problem
Solving Agents + Knowledge – based Agents = Planning Agents
Linear Planning: - Basic idea work and
one goal until completely solved before moving on to the next goal planning
algorithm maintains goal stack
i) Implications
- No inter
leaving of goal achievement
- Efficient
search if goals do not interact
ii) Advantages
- Reduced
search space since goals are solved one at a time
-
Advantageous if goals are (mainly) independent
- Linear
planning is sound
Iii) Disadvantages
- Linear
planning may produce sub optional solutions
- Linear
planning is incomplete
Concept of non – linear planning
Use goal set instead of goal
stack. Include in the search space all possible sub goal ordering. Handles goal
interactions by interleaving.
Advantages
- Non –
linear planning is sound
- Non –
linear planning is complete
- Non –
linear planning may be optimal with respect to plan length (depending on search
strategy employed)
Disadvantage
- Larger
search space since all possible goal orderings may have to be considered
- Somewhat
more complex algorithm more bookkeeping
Means – Ends Analysis: - The means –
ends analysis concentrates around the detection of differences between the
current state and the goal state. Once such difference is isolated an operator
that can reduce the difference must be found. However perhaps that operator
cannot be applied to the current state. Hence, we setup a sub – problem of
getting to a state in which it can be applied. The kind of backward chaining in
which the operators are selected and then sub goals are setup to establish the
preconditions of the operators is known as operator sub – goal.
Just like the other problem
solving techniques, means – ends analysis relies on a set of rules that can
transform one problem state into another. However these rules usually are not
represented with complete state descriptions on each side. Instead, they are
represented as left side, which describes the conditions that must be met for
the rule to be applicable and a right side, which describes those aspects of
the problem state that will be changed by the application of rule. A separate
data structure called a difference table indexes the rules by the differences
that they can be used to reduce.
Algorithm: Means – Ends Analysis
- Compare
CURRENT to GOAL. If there are no differences between them, then return.
- Otherwise,
select the most important difference are reduce it by doing the following until
success or failure is signaled
a) Select a
new operator O, which is applicable to the current difference. If there are no
such operators then signal failure.
b) Apply O to
CURRENT. Generate descriptions of two states, O – START a state in which O's
preconditions are satisfied and O – RESULT, the state that would result if O
were applied in O – START
Production Rules Systems: - Since
search is a very important process in the solution of hard problems for which
no more direct techniques are available, it is useful to structure AI programs
in a way that enables describing and performing the search process. Production
systems provide such structures. A production systems consists of:
- A set of
rules each consisting of a left side that determines the applicability of the
rule and a right side that describes the operation to be performed if the rule
is applied.
- One or more
knowledge or databases that contain whatever information is appropriate for the
particular task.
- A control
strategy that specifies the order in which the rules way of resolving the
conflicts that arise when several rules match at once.
i) Forward Chaining Systems: - In a
forward chaining system the facts in the system are represented in a working
memory which is continually updated. Rules in the system represent possible
actions to take when specified conditions hold on items in the working memory
they are sometimes called condition – action rules. The conditions are usually
patterns that must match items in the working memory while the actions usually
involve adding or deleting items from the working memory.
The interpreter controls the
application of the rules, given the working memory, thus controlling the
system's activity. It is based on a cycle of activity sometimes known as a
recognize act cycle. The system first checks to find all the rules whose
conditions hold, given the current state of working memory. It then selects one
and performs the actions in the action part of the rule. The actions will
result in a new working memory and the cycle begins again. This cycle will be
repeated until either no rules fine or some specified goal state is satisfied.
ii) Backward Chaining Systems: - So far
we have looked at how rule based systems can be used to draw new conclusions
from existing data adding these conclusions to a working memory. This approach
is most use full when you know all the initial facts, but don't have much idea
what the conclusion might be.
If we do know what the
conclusion might be, or have some specific hypothesis to test forward chaining
systems may be inefficient. We could keep on forward chaining until no more
rules apply or you have added your hypothesis to the working memory. But in the
process the system is likely to do a lot of irrelevant work adding
uninteresting conclusions to working memory.
iii) My CIN Style Probability and its
Application: - In artificial intelligence, My CIN was an early expert
system designed to identify bacteria causing severe in factions, such as
bacteremia and meningitis, and to recommend antibiotics, with the amount
adjusted for patient's body weight the name derived from the antibiotics
themselves, as many antibiotics have the suffix "MYCIN". The MYCIN
system was also used for the diagnosis of blood clotting diseases.
MYCIN was developed over five or
six years in the early 1970s at Stanford University in Lisp by Edward short
life. MYCIN was never actually used in practice but research indicated that it
proposed an acceptable therapy in about 69% of cases, which was better than the
performance of infectious disease experts who were judged using the same
criteria. MYCIN operated using a fairly simple inference engine, and a
knowledge base rules. It would query the physician running the program via a
long series of simple Yes/No or textual question. At the end it provided a list
of possible culprit bacteria ranked from high to low based on the probability
of each diagnosis, its confidence in each diagnosis probability, the reasoning
behind each diagnosis and its recommended course of drug treatment.
Practical use/Application: - MYCIN was
never actually used in practice. This wasn't because of any weakness in its
performance. As mentioned in tests it output formed members of the Stanford
medical school faculty. Some observers raised ethical and legal issues related
to the use of computers in medicine if a program gives the wrong diagnosis or
recommends the wrong therapy, who should be held responsible?
Unit 2 Intelligence
Introduction of Intelligence: - Artificial
intelligence is concerned with the design of intelligence in and artificial
device. The turn was invented by MC Cathy in 1956.
Artificial intelligence is about
designing system that are as intelligent as human. This view involves trying to
understand human through and an effort to build machines that emulate the human
though process. This view is the cognitive science approach to AI.
Common Sense Reasoning: - Common sense
is ability to analyze the situation best on it context, using millions of
integrated pieces of common knowledge depends on being able to do common sense resining
central part of intelligent behavior.
Example every know that drawing
a glass of water the glass will break and water will spill. However this
information is not obtained by formula or equation. Common sense knowledge
means what everyone knows. Example: -
- Every
person is younger then the person's mother
- People
don't like being repeatedly interrupted
- If you hold
a knife by its blade then the blade may cut you.
- People
generally sleep at right
Agents: - An agent is anything that can
be viewed as perceiving its environment through sensors and acting upon that
environment through actuators
- Human
agent; eyes, and other organs for sensors; hands, legs, mouth and other body
parts for actuators
- Robotic
agent; cameras and infrared range finders for sensors; various motors for
actuators agents and environments
Figure: -
Personality of Agent
Environment Type
- Fully
observable (Vs. partially observable): An agents sensors give it access to the
complete state of the environment at each point in time
-
Deterministic (Vs. stochastic): The next state of the environment is completely
determined by the current state and the action executed by the agent.
- Episodic (Vs.
sequential): The gent's experience is divided into atomic "episodes",
and the choice of action in each episodes depends only on the episode itself
- Static (Vs.
dynamic): The environment in unchanged while an agent is deliberating. (The
environment is semi dynamic if the environment itself does not change with the
passage of time but the agent's performance score does)
- Discrete (Vs.
continuous): A limited number of distinct clearly defined percepts and actions.
Agent Types
Four basic types in order of
increasing generality
- Simple
reflex agents
- Model based
reflex agents
- Goal based
agents
- Utility
based agents
- Simple Reflex Agents: - The agent
select an action best on the current precept ignoring the rest of the precept
history
Figure: -
Simple Reflex Agent
- Model Based Reflex Agent: - The agent
decides its actions best on of predefined set of condition action rules. For
e.g.: - a telephone operator answering machine
Figure: -
Model based reflex agent
- Goal based Agent: - The agent decides
its action best on a known a goal. For e.g.: - a GPS system finding a path to
certain destination
Figure: -
Goal Based Agent
Unit 3
Knowledge Representation
Knowledge Representation and Reasoning: - Intelligent
should have capacity for
- Receiving: - That is representing its
understanding of the world
- Knowledge Representation: - That is
representing its understanding of the world
- Reasoning: - That is inferring the
implications of what it knows and of the choices ithas.
- Acting: - That is choosing what it
want to do and carry it out.
Representation of knowledge and
the reasoning process are central to the entire field of artificial intelligent.
The primary component of a knowledge best agent is its knowledge base. A
knowledge best is a set of sentences. Each sentence is expressed in a language.
Sentences represent some assertion about the world. There must be mechanisms to
derive new sentences from old sentences. This process is known as inference or
reasoning. Inference must obey primary requirement that the new sentences
should follow logically from the previous one.
Approaches to knowledge Representation: - A
good system for the representation knowledge in a particular dement should
possess the following properties
-Representational Adequacy: - The
ability to represent all of the kinds of knowledge that are needed in that
domain.
-Inferential Adequacy: - The ability to
manipulate the representation structures in such a way as to derive new
structure cross ponding to new knowledge inferred from old.
- Inferential Efficiency: - The ability
to incorporate in to the knowledge structure additional information that can be
used to focus the attention of the inference mechanism in the most promising
direction.
- Inquisitional Efficiency: - The
ability to acquire new information easily. The simplest case involve direct
instruction of new knowledge into the database.
Logic: - Logic is the primary vehicle
for representing and resuming about knowledge. The advantage of using formal
logic as a language of AI is that it is price and deferent. These allows
program to be written which are declarative. This however leads to seven
limitation. Clearly a large person of the reasoning carried out by human depended
on handling knowledge that is on certain. Logic cannot represent this uncertainty
well. Similarly natural language resurging require inferring hidden state like
the intention of the speaker.
A logic consist of two parts, a
language and method of measuring. The logical language intern as two aspects,
syntax and semantics. They are
- Syntax: - The atomic symbols of the
logical language and the rules for constructing well formed a non-atomic expression
of the logic. Syntax specifies the symbols in the language and how they can be
combined to form sentences.
- Semantics: - The meanings of the
symbol of the logic, and rules there for demining the meaning of non – atomic
expression of the logic. It specifics what facts in the world a syntax refers
to. A fact is a claim about the world and may be true or false some popular
logics are propositional logic, first order predicate logic high order
predicate logic and fuzzy logic.
- Propositional Logic: - In PropositionalLogical
(PL) and user defines a set of propositional symbols like P&Q. User defines
the semantics for each of these symbol. For e.g.: -
P means
"It is hot"
Q means
"It is humid"
R means
"It is raining"
- A symbol
- If S is a
sentence than "~" is a sentence, where "~" is the not
logical operator?
- If sand PR
sentences then (S˅T), (S˄T) (S→T) and (S<→T) are also sentences for e.g.: -
(P˄Q)→R
It is hot and
humid then it is raining
Q→P
If it is
humid then it is hot R It is raining
- Given the
truth value of all of the constituent symbol in a sentence that sentence can be
content the value true or fails. This is called an inter pretention of the
sentence
- A model is
an inter pretention of a set of sentences such that each sentence is true. A model
is just a formal mathematical structure that stands in for the world.
- A valid
sentence (also called as tautology) is a sentence that is true under all inter
pretention. Hence no matter what the world is actually like or what the
semantic is the sentence is true.
- An
inconstant sentence (called on satisfy able or a contradiction) is a sentence
that is false under all inter reaction. Hence the world is never like that it
describes
First Order Logic
Syntax: - Syntax are symbol users the
symbols or alphabet be aware that there are all sorts of solidly different ways
to define first order logic
a) Alphabet: - There are different
types of symbols they are
- Logical Symbol: - These are symbols
that have a standard meaning like AND, OR, NOT, ALL, EXIT, IMPLIES if FALSE,
TRUE etc.
- Non Logical Symbol: - They are one
dimensional array two dimensional array N dimensional array functions (1 ary 2
array …….. n …….ary) variables etc.
b) Terms: - A term is either and
individual constant or a variable are any function applied to a terms.
c) Atomic Formula: - An atomic formulae
is either false are an n dimensional array predicate applied to ‘n’ terms
d) Literals: - A literals is either an
atomic formula (Positive literal) or the negation of an atomic formula (a negative
literals) a ground literal is avariable free literal
e) Clauses: - Clause is a disjunction
of literals a ground cause is a variable free clause a Horn clause is a clause
with at most one +ve literal a definite is a hornclause with exactly one +ve literal
Logical Agents
In logical agents we design
agents that can form representation of the world, use a process of in France to
derive new representation about the world and use these new representations to
reduce what to do?
- Knowledge
base agent the central component of knowledge base agent is its knowledge base.
A knowledge base is a set of sentences. Each sentence is expressed in a
language called a knowledge presentation language and represents some accretion
about the world.
|
Function: - KB – AGENT (percepts) return
an action
Static: - KB, a knowledge base t, a
counter initially 0.
TELL (KB, MAKE – PERCEPT – SENTENCE
(Percept t)
Action ← ASK (KB, MAKE – ACTION – QUERY (
TELL (KB MAKE – ACTION – SENTENCE (action
t))
T = ++1
Return action
|
Fig: - A
generic knowledge base agent
Figure shows the outline of a
knowledge best agent program. Like all our agents it text a percept as I/P and
returns an action. The agent Montana a Knowledge Base (KB) which may initially
content some background knowledge base what it perceives, second, it asks the
knowledge base what action should perform. In the process of answering this
query, extensive reasoning may be done about the current state of the world,
about the outcomes of possible action sequences and so on. Third, the agent
recorders its choice with tell and executed the action.
Formal Logic Connectives Syntax, Semantics
Syntax
- Rules for
constructing legal sentences in the logic
- Which
symbol we can use
- How we are
allowed to combine symbols
-
Propositions
- Connective
and, or, not,
implies, if (
)
Semantics
-
How we interpret (read) sentences in the logic
-
Assign a meaning to each sentences
-
Use true the table to work out the truth of statement
Semantic Network
Figure:
The idea behind the semantic
network is that knowledge is often best understood as a set of concept that are
related to one another. The meaning of a concept is defined by its relationship
to another concept. A semantic network consist of a set of node that are
connected by labeled arcs. The nodes represent concepts and the arcs represents
relations between concepts.
Common Sematic Relations
INSTANCE
X
is an INSTANCE of Y, if X is a specific example of the general concept Y.
ISA
X
ISA Y, if X is a subset of the more general concept Y e.g.: - sparrow ISA bird.
Haspart
X
has part Y, if the concept Y is a part of the concept X. e.g.: sparrow has part
tail.
- Semantic Tree
A
semantic tree is a representation that is a semantic net I which shorten links
are called branches. Each branch connects two node. The head node is called
parent node and tail node is called child node. One node has no parent; it is
called the root node. Other nodes have exactly one parents. Some nodes have no
children; they are leaf node when two nodes are connected to each other by a
chain of two or more branches one is set to be the ancestor; the other is set
to be the descendent.
- Inheritance
Inheritance
is a key concept in semantic n/w and can be represented naturally by following
ISA link. In general, if concept X has property P, then all concepts that are a
subset of X should also have property P. In practice, inherited properties are
usually treated has default values. If a node has direct link that contradicts
inherited property, then the default is over rider.
- Multiple Inheritance
Ø
Multiple inheritance allows an object to
inherit properties from multiple concept
Ø
Multiple inheritance can sometime allow
an object to inherit conflicting properties.
Ø
Conflicts are potentiallyunatonable so conflict
resolution strategies are needed
Predicate Calculus (Predicate Logic)
In
mathematical logic, predicate logic is generic turn for symbolic formal systems
like first order logic, second order logic or many sorted logic. This formal
system is distinguished from other system in that its formula content variables
which can be quantified. Two common quantifies are existential ᴲ (“There
exist”) and universal U (“for all”) quantifies. Predicate calculus symbols may
represent either Constance variable, function, predicate. Constance name
specific objects are properties in the domain of this coursed. Thus tree tall
and blue are examples of well form constant symbols. The constant true and false
are included. Functions denote mapping of one or more elements in a set called
the domain of the function. In to a unique element of another set. Elements of
the domain and range are objects in the old of discourse. Every function
symbols have an associated entity indicating the number of element in the
domain mapped on to each element of range.
Predicate
logic uses three additional notation they are
i) Predicate
A predicate is a relation that
binds two items together for example: Krishna like apple. Know we can write
like (Krishna, like apple) where like is predicate that links two items Krishna
and Apple.
Thus predicate can be
generalized as like X, Y where X and Y are the variable it means X likes Y
ii) Terms (Literals)
Terms are arguments in a
predicate logic example Ravi’s father is Ranis father that is father (father
iii) Quantifiers
A quantifiers is a symbol that
permits to declare or identify the range or scope of variables in a logical
expression. There are two types of quantifiers they are
-
Universal quantifiers
-
Existential quantifiers
- Universal Quantifiers
If
A is a variable the ¥a is read as
i)
for all A
ii)
for each A
iii)
for every
- Existential Quantifiers
If B is a variable then ϶b is
read as
i)
there exist B
ii)
for some B
iii)
for at histone B
Resolution
Robinson
in 1965 introduce the resolution principle which can be directly apply to any
set of clues. The principle is given any two clues A and B, if there is lateral
Bin A and which has complementary term >p in B, delete P from A and B an
construct a new close of the remaining clues. The clues so constructed is
called “resolving of A and B”.
Substitution
Resolution
works on the principle of identifying complementary literals in two clues a
deleting then there by forming a new literal. The process is simple an state
forward where are variables the problem becomes complicated and there is
necessary to make proper substitution.
There
are three major types of substitution
-
Substitution of variable by a constant
-
Substitution of variable by another variable
-
Substitution of variable by function that does not have same variable
Unification
In
prepositional logic it is easy to determine that how literals cannot both be
tree at the same time for example: man (John) &Ʌ man (john) thus
in order to determine contradiction win need a machine procedure that compares
two literals at discourse where their exist a set of substitution that made
them identical there is a state forward recursive procedure called unification
algorithm. The basic idea of unified two literals we fast check if their
initial predicate symbols are the same. If so we can processed otherwise there
is no way to unified regard less of their arguments.Suppose we want to unify an
expressions P(K,Y) & P(K,Z) here the predicate is same so we can unify by
substituting Z by Y.
Frame
Frame
is a collection of attribute slots and associated values that describe some
real word entity. Frames on their own are not particularly help full but frames
systems are powerful way of encoding information to reasoning process. A frame
structure provides facilities for describing objects facts over situation
procedure on what to do when a situation is encounter.
Types of Frames
- Declaration Frame: - A
frame that contains description about an object is called a declarative frame.
The computer center frame describable it a typical example of subscribe frame
- Procedural Frame: - It
is possible to have procedural knowledge represented in a frame. Such frame
which have procedural knowledge embedded in it are called procedurals frames.
The procedural frames as following slots
a) Actor Slots: - It
holds information about who is performing the activity
b) Object Slots: - This
slots as information about the item to perform on
c) Source Slots: - Source
slots holds information from where the action as to end
e) Task Slots: - This
generates the necessary sub slots required to perform the operation
Approach to Knowledge Representation: - A
good system for knowledge representation should passes the following property
- Representation Adequacy: -
The ability to represent all kinds of knowledge that are needed in that domain
- Interracial Adequacy: -
The ability to manipulate the representation structure in such a way as to
derive new structures of new knowledge inference form old.
- Acquisitioned Efficiency: - The
ability to acquire the new information easily. The simplex case involves direct
insertion by a person as new knowledge in to the knowledge base.
- Inferential Efficiency: - The
ability to incorporate into the knowledge structure additional information that
can use to fours the attention of the inference mechanism in most per mistingdirection
Knowledge
Representation Technique
(a) Simple relational knowledge: -
The simple way of storing facts page to use a simple relational method where
each fact about a set of object which set at systematically in columns. This
representation gives little opportunityfor inference but it can be used as
knowledge bases for inference engine.
(b)Inheritable knowledge: - Relational
knowledge is made up of constitute of institute and cross ponding associated
values we extend the base more by allowing inference mechanism for property in
heritance is used. In property inheritance of a class.
(c)Inferential knowledge: - In
inferential knowledge logic knowledge is represented as formal for example all
dogs have tell an in formal logic it is return as
Advantage
-
A set of strict rule
-
Can be used to derive
-
Make
-
Popular in AI system
(d) Procedural knowledge: -It
is also called operational knowledge which specifies what to do when. In this
control information is necessary to use the knowledge in embedded in the
knowledge base itself
Unit 4
Inference and Reasoning
State Space Representation Technique: - A
set of all possible states for a give problem is known as state space of the
problem. For example let us consider us consider an 8 tiles puzzle game. The
puzzle consist of a squire frame contenting at tiles and an empty slot. The
tiles are number from 1 to 8. It is possible to move the tiles in the squire field
by moving a tile in to the empty slot. The objective is to get the squire in a
numerical order
Rules: - The
operator for this problems are
Up: - If the heal is not
touching the top frame move it up.
Down: - If
the heal is not touching the bottom frame move it down.
Left: - If
the heal is not touching the left frame move it left.
Right: - If
the heal is not touching the Right frame move it right.
Figure
The state space is a directed
graph with all the state has nodes. A node is set to be existed if it is
possible to up tent it form the initial state by application of a set of
operators. A small fragment of state space for the 8 tile puzzle game as soon
above.
State space representation are
highly perinatal in AI because they provide all possible states operations and
the goal. If the entire state space representation for a problem it’s given it
is possible trace the part from the initial state to the goal state and
identifies the sequence of operators. The major disadvantage of this method is
that it is not possible to visualize all states for a given problem. More ever,
the resources of the computer system are limited to handle huge state space
representation.
Heuristic Search
Breath
first searching is a uniforms search because they do not have any domain
specific knowledge. Heuristics are approximations use to minimize the searching
process. The process of searching can be drastically reduced by the use of
heuristic. Generally two categories of problems are heuristic
-
Problem for which no exact algorithms are known and one needs to find an
approximation and satisfying solution
-
Problem for which exact solution is known but computationally in fusible.
The heuristic which are needed
for serving problems are generally represented as a heuristic function which
maps the problem state in to numbers. This numbers are then approximately used
to guide search. The following algorithm make use a drastic evaluation function
- Hill Climbing Search: - This
algorithm is also called discrete optimization algorithm which uses a simple
heuristic function to calculate the amount of distance the node is from the
goal. In fact there is no different between hill climbing search and deft
search except that the children of the node that has been expended are shorted
by remaining distant
Algorithm
- Put the initial list on
start
-
If start = empty or start = goal terminate search
-
Remove the first node from the start called this node A
-
If A = goal terminate search with success
-
If node has a successor generate all of them. Find out how far they are from
the goal node sort they by remaining distance from the goal and at them to the
- Best First Search: - This
is also heuristic search the heuristic function used here are called evaluation
function each and indicates how far the node is from the goal node. Goal node
have an evaluation function value of O (Zero)
It is explained using a search
give above. First the start node is expended. It has three children A, B and C
with evaluation function 3, 6 and 5 respectively. These values approximately
indicate how far they are from the goal node. The child with minimum value ‘A’
is chosen. The children’s of ‘A’ are generated. They are ‘D’ and ‘E’ with evaluation
function 9 and 8 with evaluation at. The search process has how four node to
search that is the node ‘D’ with evaluation function 9, ‘E’ with 8, ‘B’ with 6
and ‘C’ with 5 where ‘C’ has got the minimum value which is expanded to give
node ‘H’ which value is 7. At this point the node available for search are (D:
9), (E: 6) (H: 7)
Algorithm
-
Put the initial node on a list START
-
If START empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successes generate all of them find out how far they are
from the goal node. Short all the child generated so far by the remaining
distance from the goal
-
Replace start with START
-
Go to step 2
- A* Search (Aversa Search): - In
best first search we brought in a heuristic value called evaluation function
value. It is a value that estimates how far a particular estimate node is from
the goal node. A part from the evaluation function value one can also bring
that is cost function. Cost function indicates how much resources take time
energy money etc. has been spent in reading a particular node from the start.
If it is possible for one to obtain the evaluation values and cost function
values the A* algorithm can be used.
Algorithm
-
Put the initial node unless START
-
If START = empty or START = goal terminate the search
-
Removed the first node first node from start called this node ‘A’
-
If A = goal terminate search with success
-
Else if node ‘A’ has successor generate all of them. Estimate the fitness
number (The sum of evaluation function and cost along the reading to that state
is called fitness number) of the successes by totaling the evaluation function
values and cost function value. Short the list by fitness number
-
Need the new list as START 1
-
Replace start with START 1
-
Go to step 2
AO* Search
Game Playing in AI: - There
are two major components in game playing they are
i) Plausible Move Generator: - If
we are to employee a simple move generator then it might not be possible to
examine all the states. Has it is essential that only very selected moves or
pats the examine for this purpose only one has a flexible move generator that
expends are generates only selected moves
ii) Static Evaluation Function
Generator: - This
is the most important components of the game playing program. Based on
heuristic this generates the static evaluation function value for each and
every move that is being made. The study evaluation function gives a snapshot
of a particular move. More the static evaluation function value more in the possibility
for victory. The basic method available for game playing are
- Min – Max Strategy: - Min
– max strategy is a simple strategy for two person gene playing. Here players
are called maximizer and minimizer both are opponent to each other. Maximizer
and minimizer fights it out to see that the opponent get minimum benefit and
they get the maximum benefit. The play sable move generator generate necessary
for the farther evaluation and the static evaluation function ranks each of the
position
Figure
Let AB the initial state of the
game, the plausible move generator generates children’s for that move and the
static evaluation function generate assign the value given along with each of
the state. It is assume that that the static evaluation function generators
returns a value from – 20 to +20 where a value of +20 indicates a win for
maximizer and a value of -20 indicates a wine for minimizer makes first move
the maximizer always tries to go the position where the static evaluation
function value is maximizer positive value.
The maximizer being the player
to make the first move will to node D because static evaluation function value
of that maximum node. If the minimizer has to move he will go node be because
the static evaluation function value for that node is minimum
Figure
Fig:
- game tree explained by two level their association static evaluation function
value but a game playing strategy never stops with one level but loops a head
that is move a couple of levels down ward to those the optimal movies
Let’s examines this with the
help of above fig: Let’s assume that it is the maximizer who will to play first
floated by minimizer. Before the maximizer move to N, O, P he will have to
thing which move would be highly beneficial to him. It maximizer move to N next
will be minimizer term. The minimizer always this to other and he will move to
are (static evaluation function value = -6) this value is backed off to N.
If M move to O, then the minimizer
will move to V, which is the minimum of +4, +7 and 0 so, the value of 0 is
backed up as 0. Similarly the value of P will backed of -3.
The maximizer will know have to
choose between M, N, O, and P with the value of -6, 0 and -3. Being a maximizer
he will choose node 0 because if provides the maximize value corresponding to
other
- Min – Max Strategy with alphabet cut –
offs: -
Figure:
-
This is the modified version of
min max strategy algorithm where two threshold value are maintain for features
expansion. One threshold value is called alpha, which is lower bound on the
value the maximizer can be originated and other is beta (P) which represent the
upper bound of the value the minimizer can be assigned.
In this figure the maximizer has
to play first floated by the minimizer as done in min – max strategy. The
maximizer assign A value of 6 at Q (minimum at the values sand t). This values
is backed up P so the maximizer as assured of A value of 6 when he move to Q.
Now let see what happened at R. The value at V is -2 and U is unknown. Since,
the move is minimizing 1 by moving to R, P can get only A value of -2 or less
that is unacceptable for P because by moving to Q he is assured of value up 6 hence
he will never tries move other than children of R
Role of Alpha (α)
Figure: -
For P the maximizer A value of 6
is assured by moving a node Q. this value P is compared with that of value at
R, P be the maximizer could flow any path which value is greater than 6. Hence,
this value of 6 being the least at a maximizing move and set as value of α.
This value of alpha is now used as reference point. Any node which value is
greater than alpha is acceptable and all the node which values are less than
alpha is rejected.
Role of Beta (β)
Figure: -
In this figure is the minimizer
and the path for extension are chosen from values at the leaf node. Since 5 and
T are maximizer the maximum value of their children are back up as static
evaluation function value. Node Q being minimizer always moves to 5 rather than
T. the value at 5 (6) is not we used by Q as a reference point. The value is
called β is acceptable and values more than β are seldom.
Bayesian Networks
-
Bayesian networks also known as Bayes Nets, Belief Nets cause nets and
probability nets, are a space efficient data structure for encoding all of the
information in the full joint probability distribution for the set of random
variables defining a domain
-
Represents all of the direct causal relationships between variables
-
In punitively to construct a Bayesian net for a given set of variables draw are
from cause variables to immediate effects.
-
Space efficient because it exploits the fact that in many real world problem
domains the dependencies between variables are generally local, so there are a
lot of conditionally independent variables
-
Captures both qualitative and quantitative relationships between variables
-
Can be used to reason: -
i)
Forward (top – down) from causes to effects predictive reasoning (aka causal
reasoning)
ii)
Backward (bottom – up) from effects to causes diagnostic reasoning
-
Formally a Bayesian Net is a directed a cyclic graph (DAG) where is a node for
each random variable and a directed are from A to B whenever A is a direct
causal influence
-
Each node A in a net is conditionally independent of any subset of nodes that
are not descendant of a given the parents of A.
Case based Reasoning: - In
case based reasoning the cases are stored and accessed to solve a new problem.
To get a prediction for a new example, these cases that are similar or close to
the new example this is at one extreme of the learning problem where unlike
decision trees and neural networks relatively little work must be done offline
and virtually all of the work is performed at query time.
Case based reasoning can be used
for classification and regression. It is also applicable when the cases are
complicated, such as in legal cases where the cases are complex legal rulings
and in planning, where the cases are previous solutions to complex problems
If the cases are simple one
algorithm that works well is to use the k – nearest neighbors for some given
number K. given a new example the K training examples that have the input
features closest to that example are used to predict the forget value for the
new example.
The prediction can be the mode
average or some interpolation between the predication of these k. training
examples perhaps weighting closer examples more than distant examples.
For this method to work a
distance metric is required that measures the closeness of two examples. First
define a metric for the domain of each feature in which the values of the
features are converted to a numerical scale that can be used to compare values.
Unit 5
Machine Learning
Learning: - The
process of knowledge as equation is called learning. There are various types of
learning.
- Rote Learning (Learning by
Memorizations): - Knowledge a equation itself includes many
different activities. Simple storing of computing information or rote learning
is the most basic learning activities may computer programs examples database
systems can be used to learn in this sense slough most people could not called
such simple storage as learning however many IT programs rote learning
techniques. When a computer stored a paces of data it is performing a rote
learning such learning are used full for improving the performance of the
systems.
- Learning by Analogy
a) Transformational Analogy
Suppose
we are asked to prove theorem in plane geometry we might look for a previous
theorem that is very similar and copies its proof, making substitution when
necessary. The idea is to transform a solutions to a previous problem into a
solutions for the current problem such learning is called learning by
transformation analogy.
The example for transformational
analogy is five below
Figure:
-
b) Derivational Analogy
Figure:
-
Transformation analogy if does
not look at how the old problem was solved it look at the final solution after
the twist and terms in solving an old problem are relevant to solving a new
problem. The detail history of problem solving is called its derivation
analogical reasoning that tables these histories in to account is called
derivational analogy.
Explanation Based Learning (EBL): - An
explanation based learning system accepts and example (i.e. training example)
an explains what it learns from the example. The EBL system takes only the
relevant aspects of the training. These explanations is translated in to
particular form that a problem solving program can understand so that it can
used to solve other problem
We can think EBL program as
specifying the following input.
-
A training example: - what the training program size in the world.
-
A goal concept: - A high level description of which the problem is supposed to
known
-
A operationally (
): - A description of which concept are useable
-
A domain theory: - A set of groups that gives the relationship between the
activities between domains
Inductive Bias Learning: - A
major problem in machine learning is that of inductive bias how to choose a
learners hypothesis space so that it is large enough to contain a solution to
the problem being learnt yet small enough to ensure reliable generalization
from reasonably sized training sets. Typically such bias is supplied by hand
through the skill and insights of experts. In this paper a model for
automatically learning bias is investigated. The central assumption of the
model is that the learner is embedded within an environment of related learning
tasks.
Within such an environment the
learner can sample from multiple tasks and hence it can search for a hypothec
is space that contains good solutions to many of the contains on the set of all
hypothesis spaces available to the learners we show that a hypothesis space
that performs well on a sufficiently large number of training tasks novel task
in the same environment. Explicit bounds are also derived demonstrating that
learning multiple tasks can potentially give much better generalization than
learning a single task.
Genetic Algorithms: - This
is an introduction to genetic algorithm methods for optimization. The
continuing price/performance improvements of computational systems has made
them attractive for some types of optimization. In particular genetic
algorithms work very well on mixed. Combinational problems. But they tend to be
computationally expensive. To use a genetic algorithm you must represent a
solution to your problem as a genome. This presentation outlines some of the
basics of genetic algorithms. The three most important aspects of using genetic
algorithms are
-
Definition of the objective function
-
Definition and implementation of the genetic representation and
-
Definition and implementation of the genetic operators
Once these three have been
defined the generic algorithm should work fairly well. Beyond that you can try
many different variations to improve performance find multiple optima or
parallelize the algorithms.
Application of AI
Export System: - Export
system are knowledge intensive programs that solve problem in a domain that
require considerable amount of technical information the Brattice computer
society community of the specialist prove on export system as formed the
following generation
-
The embodiment within a computer of a knowledge based component from on export
skill in such a form that the machine can offers that intelligence take
intelligence design about of the specification.
A desirable additional characteristics
which may regard fundamental each the capability of the system on demand to
justified its own line of reasoning in a manner directly to the enquire
Characteristics Expert System (CES)
Following
are the different characteristics expert system
-
They should solve difficult problem in a domain as good as or better than on
expert
-
They should process vast quantities of domain specific knowledge in the detail
-
These system promote the use of heuristic search process. It must be cleared
that brought search techniques are in practical and to managed the problem
heuristic search procedure process the management
-
They explain why they question and justify their confusion. Explanation
facilities enhance treatability system in the mind of human
-
They accept advice modify update and expand
-
They communicate with the users in their own natural language
-
They provides extensive facility part simply processing greater than numeric
processing
No comments:
Post a Comment