0% found this document useful (0 votes)
4K views32 pages

21cs502 Unit 4 Ai Notes Short

Uploaded by

vallaturulohitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4K views32 pages

21cs502 Unit 4 Ai Notes Short

Uploaded by

vallaturulohitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

21CS502 ARTIFICIAL INTELLIGENCE

UNIT 4 - KNOWLEDGE REPRESENTATION AND PLANNING

Ontological engineering- Categories and objects- Events- Mental objects and modal logic-
Reasoning systems for categories- Reasoning with default information- Classical planning-
Algorithms for classical planning -Heuristics for planning- Hierarchical planning -non-
deterministic domains Time, schedule, and resources – Analysis

ONTOLOGICAL ENGINEERING

Ontology:

 It is a branch of metaphysics that studies the nature of being, the nature of existence.

 Ontologies enable more effective knowledge representation and reasoning in AI Systems.

 Ontologies provide a structured and formal way to represent knowledge.

 Conceptualization is an abstract simplified view of some selected part of the world, containing
objects and concepts.
 An ontology is an explicit description of a domain:

 Concepts

 Properties and attributes of concepts

 Constraints on properties and attributes.

Ontology of the world:

Ontologies are expressed in the form of:

 Categories
 Measures
 Composite objects
 Time
 Changes
 Events
 Physical objects
 Beliefs

Ontological engineering:

 It is a discipline within artificial intelligence (AI) and computer science that focuses on creating
and managing ontologies to enable more effective knowledge representation and reasoning in AI
systems.

 Ontological engineering is a vital component of artificial intelligence that enables

 Better knowledge representation,

 Reasoning

 Interoperability across various applications and domains.


 It provides a structured foundation for AI systems to understand and work with complex
knowledge, making them more intelligent and capable of supporting a wide range of tasks.

 Ontological Engineering is a set of tasks related to the development of ontologies for a particular
domain. It involves

 Defining concepts in the domain(classes)

 Arranging the concepts in a hierarchy (superclass-subclass hierarchy)

 Defining which attributes and properties can have constraints on their values

 Defining individuals and filling in the properties.

Key aspects of Ontological Engineering in AI:

1) Ontology Development: Ontological engineering involves designing and building ontologies for
specific domains.

2) Knowledge Representation: Ontologies provide a structured and formal way to represent


knowledge.

3) Semantic Web: Ontologies play a fundamental role in making web content machine-readable and
understandable by both humans and machines.

4) Reasoning: Ontologies are used for inferencing and reasoning within AI systems.

5) Natural Language Processing: By mapping text to ontological concepts, AI systems can extract
more meaningful information and improve language understanding.

6) Data Integration and Knowledge Management: Helps to structure and organize data, making it
more accessible and useful for decision support and analytics.

CATEGORIES AND OBJECTS

CATEGORIES

 The organization of objects into categories is a vital part of knowledge representation.

 Although interaction with the world takes place at the level of individual objects, much
reasoning takes place at the level of categories.

 For example, a shopper would normally have the goal of buying a basketball, rather than a
particular basketball such as BB9.

There are two choices for representing categories in first-order logic:

1. Predicates - Basketball (b)

2. Object - We can reify the category as an object, Basketballs


 We could then say Member(b, Basketballs ), which we will abbreviate as b Є Basketballs, to say
that b is a member of the category of basketballs.

 We say Subset(Basketballs, Balls), abbreviated as Basketballs Balls, to say that Basketballs is a


subcategory of Balls. We will use subcategory, subclass, and subset interchangeably.

Category Organization - Inheritance and taxonomy

 If we say that all instances of the category Food are edible, and if we assert that Fruit is a
subclass of Food and Apples is a subclass of Fruit, then we can infer that every apple is edible.
We say that the individual apples inherit the property of edibility, in this case from their
membership in the Food category.

 Subclass relations organize categories into a taxonomy, or taxonomic hierarchy

An object is a member of a category.

BB9 ∈ Basketballs

A category is a subclass of another category.

Basketballs ⊂ Balls

All members of a category have some properties.

(x ∈ Basketballs) ⇒ Spherical (x)

Members of a category can be recognized by some properties.

Orange(x) ∧ Round (x) ∧ Diameter (x) = 9.5′′ ∧ x ∈ Balls ⇒ x ∈ Basketballs

Relations between Categories:

Disjoint:

 Two or more categories are disjoint if they have no members in common.

 Example : Disjoint({Males, Females})

 A member of male category cannot be a female and a member of female category cannot be a
male. We say that two or more categories are disjoint if they have no members in common.

Partition (Disjoint Exhaustive Decomposition)

 Disjoint Exhaustive Decomposition - A partition is a disjoint exhaustive decomposition

 A set of categories S constitutes an exhaustive decomposition of a category C, if all members of


the set C are covered by the categories in S.

 Males and females constitute an exhaustive decomposition of the animals. A disjoint exhaustive
decomposition is known as a partition.
Physical Composition

 We use the general PartOf relation to say that one thing is part of another. Objects can be
grouped into PartOf hierarchies, reminiscent of the Subset hierarchy:

PartOf (Bucharest , Romania )

PartOf (Romania, EasternEurope )

PartOf (EasternEurope, Europe)

PartOf (Europe, Earth) .

 The PartOf relation is transitive and reflexive; that is,

PartOf (x, y) ∧ PartOf (y, z) ⇒ PartOf (x, z) .

PartOf (x, x) .

Therefore, we can conclude PartOf (Bucharest , Earth)

Composite object

Categories of composite objects are often characterized by structural relations among parts. For
example, a biped has two legs attached to a body

Measurements

The values that we assign for the object properties are called measures.

 Eg: Height, Mass, Cost.

 If the line segment is called L1, we can write Length(L1) = Inches(1.5) = Centimeters(3.81) .

Conversion between units is done by equating multiples of one unit to another


 Centimeters(2.54 × d) = Inches(d)

 Diameter (Basketball 12) = Inches(9.5) .

Measurements are comparable

 For example, we might well believe that Norvig’s exercises are tougher than Russell’s, and that
one scores less on tougher exercises:

e1 ∈ Exercises ∧ e2 ∈ Exercises ∧ Wrote(Norvig, e1) ∧ Wrote(Russell , e2) ⇒ Difficulty(e1) >


Difficulty(e2) .

OBJECTS

The real world can be seen as consisting of primitive objects (e.g., atomic particles) and composite
objects built from them. By reasoning at the level of large objects such as apples and cars, we can
overcome the complexity involved in dealing with vast numbers of primitive objects individually.

Individuation

 A significant portion of reality that seems to defy any obvious individuation—division into distinct
objects. We give this portion the generic name stuff.

 Any part of a butter-object is also a butter-object:

b Є Butter∧ PartOf (p, b) ⇒ p Є Butter .

Intrinsic and extrinsic properties

Intrinsic properties : They belong to the very substance of the object, rather to the object as a
whole.

Eg: density, boiling point,flavor, color, ownership, and so on

Extrinsic properties : They are not retained under subdivision. They do depend on the size of a
sample.Eg: weight, length, shape, and so on

 The category Stuff is the most general substance category, specifying no intrinsic properties.

 The category Thing is the most general discrete object category, specifying no extrinsic
properties.

EVENTS

 Events are represented in two ways: 1) Situation Calculus 2) Event Calculus


Example for Situation Calculus

 Consider a continuous action, such as filling a bathtub.

 Situation calculus can say that the tub is empty before the action and full when the action is
done, but it can’t talk about what happens during the action.

 It also can’t describe two actions happening at the same time—such as brushing one’s teeth
while waiting for the tub to fill.

Example for Event Calculus

 Events are described as instances of event categories.

 Event calculus, is based on points of time rather than on situations.

Events & fluents

 In the event calculus, fluents are reified. This means that they are not formalized by means of
predicates but by means of functions.

 To assert that a fluent is actually true at some point in time ‘t’, we use the predicate T , as in
T (At(Shankar , Berkeley), t).

T (f, t) Fluent f is true at time t

 The fluent At(Shankar , Berkeley) is an object that refers to the fact of Shankar being in
Berkeley, but does not by itself say anything about whether it is true.

 The event E1 of Shankar flying from San Francisco to Washington, D.C. is described as

E1 ∈ Flyings(Shankar , SF , DC ) or

E1 Є Flyings ∧ Flyer (E1, Shankar ) ∧ Origin(E1, SF) ∧ Destination(E1,DC) .

Happens(e, i) Event e happens over the time interval i

Initiates(e, f, t) Event e causes fluent f to start to hold at time t

Process or Liquid Event

 Ex: Shankar’s trip has a beginning, middle, and end. If interrupted halfway, the event would be
something different—it would not be a trip from San Francisco to Washington, but instead a
trip from San Francisco to somewhere over Kansas.

 Categories of events with this property are called process categories or liquid event.

Time intervals

 Two kinds of time intervals: moments and extended intervals. The distinction is that only
moments have zero duration.
MENTAL EVENTS AND MENTAL OBJECTS

 Knowledge about one’s own knowledge and reasoning processes is useful for controlling
inference.

 For example, suppose Alice asks “what is the square root of 1764” and Bob replies “I don’t
know.” If Alice insists “think harder,” Bob should realize that with some more thought, this
question can in fact be answered.

 Propositional attitudes are used to represent mental events - An agent can have toward mental
objects: attitudes such as Believes, Knows, Wants, Intends, and Informs. The difficulty is that
these attitudes do not behave like “normal” predicates.

For example:

The following sentence asserts that Lois knows that Superman can fly:

If “Superman is Clark Kent is true”, then the inferential rules conclude that “Lois knows that Clark
Kent can fly”. This is an example of Referential Transparency. But in reality, Lois doesn’t actually
know that clark can fly.

Referential Transparency

 An expression always evaluates to the same result in any context

 E.g. if agent knows that 2+2=4 and 4<5, then agent should know that 2+2<5 built into inferential
rules of most formal logic languages

Referential Opacity

 Not referential transparent


 We want referential opacity for propositional attitudes because terms do matter and not all
agents know which terms are co-referential

 Not directly possible in most formal logic languages (except Modal Logic)

MODAL LOGIC

 Regular logic is concerned with single modality (the modality of truth), allowing us to express “P
is true”

 In modal logic a model consists of a collection of possible worlds (instead of 1 true world)

 Modal logic includes modal operators that takes sentences (rather than terms) as arguments. E.g.
“A knows P” is represented with notation KAP where K is the modal operator for knowledge, A
is the agent(written as the subscript), and P is a sentence)

 Syntax of modal logic is the same as first-order logic, with the addition that sentences can also
be formed with modal operators semantics of modal logic is more complicated.

 In modal logic we want to be able to consider both the possibility that Superman’s secret identity
is Clark and that it isn’t.

 For example, we can say that, even though Lois doesn’t know whether Superman’s secret
identity is Clark Kent, she does know that Clark knows:

Example:

 The worlds are connected in a graph by accessibility relations (one relation for each modal
operator).

 Consider the possible worlds with accessibility relations K Superman (solid arrows), K Lois (Dotted
arrows).

 The proposition R means “The weather report for tomorrow is rain”

 The proposition R means “Superman’s secret identity is Clark Kent”

 In the world A, it is common knowledge that Superman knows his own identity, and neither
he nor Lois has seen the weather report. So in w0 the worlds w0 and w2 are accessible to
Superman; maybe rain is predicted, maybe not. For Lois all four worlds are accessible from
each other; she doesn’t know anything about the report or if Clark is Superman.But she does
know that Superman knows whether he is Clark, because in every world that is accessible to
Lois, either Superman knows I, or he knows ¬ I. Lois does not know which is the case, but
either way she knows Superman knows.

 In the world B, it is common knowledge that Lois has seen the weather report. So in w4 she
knows rain is predicted and in w6 she knows rain is not predicted Superman does not know the
report, but he knows that Lois knows, because in every world that is accessible to him, either
she knows R or she knows ¬R.

 In the world C, we represent the scenario where it is common knowledge that Superman
knows his identity, and Lois might or might not have seen the weather report.

 We represent this by combining the two top scenarios, and adding arrows to show that Superman
does not know which scenario actually holds. Lois does know, so we don’t need to add any
arrows for her.

 In w0 Superman still knows I but not R, and now he does not know whether Lois knows R. From
what Superman knows, he might be in w0 or w2, in which case Lois does not know whether R is
true, or he could be in w4, in which case she knows R, or w6, in which Case she knows ¬R.
REASONING SYSTEMS FOR CATEGORIES

TWO WAYS FOR ORGANIZING AND REASONING WITH CATEGORIES

Semantic networks

 Semantic networks provide graphical aids for visualizing a knowledge base and efficient
algorithms for inferring properties of an object on the basis of its category membership

Description logics

 Description logics provide a formal language for constructing and combining category definitions
and efficient algorithms for deciding subset and superset relationships between categories.

SEMANTIC NETWORKS

 A typical graphical notation displays object or category names in ovals or boxes, and connects
them with labeled links.

 The above semantic network has a MemberOf link between Mary and FemalePersons,
corresponding to the logical assertion Mary ∈ FemalePersons ;

 similarly, the SisterOf linkbetween Mary and John corresponds to the assertion SisterOf (Mary,
John). We can connect categories using SubsetOf links, and so on. It is such fun drawing
bubbles and arrows that one can get carried away.

 For example, we know that persons have female persons as mothers, so can we draw a
HasMother link from Persons to FemalePersons? The answer is no, because HasMother is a
relation between a person and his or her mother, and categories do not have mothers.

 HasMother link is mentioned with double lined box.


DESCRIPTION LOGIC:

 Description logics are notations that are designed to make it easier to describe definitions and
properties of categories.

 The principal inference tasks for description logics are subsumption (checking if one category is
a subset of another by comparing their definitions)

 Classification - Checking whether an object belongs to a category.

 Some systems also include consistency of a category definition—whether the membership criteria
are logically satisfiable

Any description in CLASSIC can be translated into an equivalent first-order sentence, but some
descriptions are more straightforward in CLASSIC .
Example 1:
Bachelors are unmarried adult males

Example 2:

REASONING WITH DEFAULT INFORMATION

The reasoning is the mental process of deriving logical conclusion and making predictions from
available knowledge, facts, and beliefs. Or we can say, "Reasoning is a way to infer facts from
existing data." It is a general process of thinking rationally, to find valid conclusions.

In artificial intelligence, the reasoning is essential so that the machine can also think rationally as a
human brain, and can perform like a human.

Types of Reasoning

o Deductive reasoning
o Inductive reasoning
o Abductive reasoning
o Common Sense Reasoning
o Monotonic Reasoning
o Non-monotonic Reasoning

1. Deductive reasoning:

 Deductive reasoning is deducing new information from logically related known information. It is
the form of valid reasoning, which means the argument's conclusion must be true when the
premises are true.

2. Inductive Reasoning:
 Inductive reasoning is a form of reasoning to arrive at a conclusion using limited sets of facts by
the process of generalization. It starts with the series of specific facts or data and reaches to a
general statement or conclusion.

3. Abductive reasoning:

 Abductive reasoning is a form of logical reasoning which starts with single or multiple
observations then seeks to find the most likely explanation or conclusion for the observation.

4. Common Sense Reasoning

 Common sense reasoning is an informal form of reasoning, which can be gained through
experiences.

5. Monotonic Reasoning:

 In monotonic reasoning, once the conclusion is taken, then it will remain the same even if we
add some other information to existing information in our knowledge base. In monotonic
reasoning, adding knowledge does not decrease the set of prepositions that can be derived.

6. Non-monotonic Reasoning

 In Non-monotonic reasoning, some conclusions may be invalidated if we add some more


information to our knowledge base.
 Logic will be said as non-monotonic if some conclusions can be invalidated by adding more
knowledge into our knowledge base.
CIRCUMSCRIPTION

 The idea is to specify particular predicates that are assumed to be “as false as possible”—that is,
false for every object except those for which they are known to be true.

 For example, suppose we want to assert the default rule that birds fly. We would introduce a
predicate, say Abnormal 1(x), and write

Bird (x) ∧ ¬Abnormal 1(x) ⇒ Flies(x) .

 If we say that Abnormal 1 is to be circumscribed, a circumscriptive reasoner is entitled to


assume ¬Abnormal 1(x) unless Abnormal 1(x) is known to be true.

 This allows the conclusion Flies(Penguin) to be drawn from the premise Bird (Penguin), but the
conclusion no longer holds if Abnormal 1(Penguin) is asserted.

MODEL PREFERENCE

 Circumscription can be viewed as an example of a model preference logic

 A sentence is entailed (with default status) if it is true in all preferred models of the KB,as
opposed to the requirement of truth in all models in classical logic.

 Richard Nixon was both a Quaker (and hence by default a pacifist) and a Republican (and hence
by default not a pacifist). We can write this as follows:

 If we circumscribe Abnormal 2 and Abnormal 3, there are two preferred models:


1) Abnormal 2(Nixon) and Pacifist(Nixon) hold
2) Abnormal 3(Nixon) and ¬Pacifist(Nixon) hold
 If we wish, in addition, to assert that religious beliefs take precedence over political beliefs,
We can use a formalism called prioritized circumscription to give preference to models where
Abnormal 3 is minimized.
DEFAULT LOGIC
Default logic is a formalism in which default rules can be written to generate contingent, non-
monotonic conclusions. A default rule looks like this:

This rule means that if Bird (x) is true, and if Flies(x) is consistent with the knowledge base,then
Flies(x) may be concluded by default. In general, a default rule has the form

where P is called the prerequisite, C is the conclusion, and Ji are the justifications

The Richard Nixon example can be represented in default logic with one fact and two default rules:

 To interpret what the default rules mean, we define the notion of an extension.

 Extension S consists of the original known facts and a set of conclusions from the default rules,
such that no additional conclusions can be drawn from S and the justifications of every default
conclusion in S are consistent with S.

 As in the case of the preferred models in circumscription, we have two possible extensions for
the Nixon diamond: one wherein he is a pacifist and one wherein he is not. Prioritized schemes
exist in which some default rules can be given precedence over others, allowing some
ambiguities to be resolved.

TRUTH MAINTENANCE SYSTEMS

 Many of the inferences drawn by a knowledge representation system will have only default status,
rather than being absolutely certain.

 Inevitably, some of these inferred facts will turn out to be wrong and will have to be retracted in
the face of new information. This process is called belief revision.

 Suppose that a knowledge base KB contains a sentence P—perhaps a default conclusion recorded
by a forward-chaining algorithm, or perhaps just an incorrect assertion—and we want to execute
TELL(KB, ¬P). To avoid creating a contradiction, we must first execute RETRACT(KB, P).

 Problems arise, however, if any additional sentences were inferred from P and asserted in the KB.
For example, the implication P ⇒ Q might have been used to add Q.
 The obvious “solution”—retracting all sentences inferred from P—fails because such sentences
may have other justifications besides P. For example, if R and R ⇒ Q are also in the KB, then Q
does not have to be removed after all.

 One simple approach to truth maintenance is to keep track of the order in which sentences are
told to the knowledge base by numbering them from P1 to Pn. When the call RETRACT (KB, Pi) is
made, the system reverts to the state just before Pi was added, thereby removing both Pi and
any inferences that were derived from Pi. The sentences Pi+1 through Pn can then be added
again.

Justification Truth Maintenance System

 In a JTMS, each sentence in the knowledge base is annotated with a justification consisting of
the set of sentences from which it was inferred.

 For example, if the knowledge base already contains P ⇒ Q, then TELL(P ) will cause Q to be
added with the justification {P, P ⇒ Q}. In general, a sentence can have any number of
justifications. Justifications make retraction efficient.

 Given the call RETRACT(P ), the JTMS will delete exactly those sentences for which P is a
member of every justification. So, if a sentence Q had the single justification {P, P ⇒ Q}, it
would be removed; if it had the additional justification {P, P ∨ R ⇒ Q}, it would still be removed.
Assumption-based Truth maintenance system

Explanations and Assumptions in Truth Management System

 Truth maintenance systems also provide a mechanism for generating explanations.

 An explanation of a sentence P is a set of sentences E such that E entails P.

 If the sentences in E are already known to be true, then E simply provides a sufficient basis for
proving that P must be the case.

 But explanations can also include assumptions— sentences that are not known to be true, but
would suffice to prove P if they were true.

 Computational Complexity- NP hard

CLASSICAL PLANNING

What is planning in AI?

 The planning in Artificial Intelligence is about the decision making tasks performed by the robots
or computer programs to achieve a specific goal.

 The execution of planning is about choosing a sequence of actions with a high likelihood to
complete the specific task.

Planning Domain Definition Language:

 PDDL, the Planning Domain Definition Language in which a state of the world is represented by a
collection of variables that allows us to express all Actions with one action schema.

 PDDL describes the four things we need to define a search problem:

 The initial state


 The actions that are available in a state
 the result of applying an action
 the goal test.
 Each state is represented as a conjunction of fluents that are ground, functionless atoms.

 Eg: A state in a package delivery problem might be At(Truck 1, Melbourne) ∧ At(Truck 2,


Sydney).

 Actions are described by a set of action schemas that implicitly define the ACTIONS(s) and
RESULT(s, a) functions needed to do a problem-solving search.

 Classical planning concentrates on problems where most actions leave most things unchanged.

Action schema

 A set of ground (variable-free) actions can be represented by a single action schema. The schema
is a lifted representation—it lifts the level of reasoning from propositional logic to a restricted
subset of first-order logic.

 The schema consists of the action name, a list of all the variables used in the schema, a
precondition and an effect

 For example, here is an action schema for flying a plane from one location to another:
Example:The blocks world

 This domain consists of a set of cube-shaped blocks sitting on a table. The blocks can be stacked,
but only one block can fit directly on top of another.

 A robot arm can pick up a block and move it to another position, either on the table or on top of
another block.

 The arm can pick up only one block at a time, so it cannot pick up a block that has another one
on it. The goal will always be to build one or more stack of what other blocks.s of blocks,
specified in terms of what blocks are on top
Components of Planning System

 The planning consists of following important steps:

1. Choose the best rule for applying the next rule based on the best available heuristics.
2. Apply the chosen rule for computing the new problem state.

3. Detect when a solution has been found.

4. Detect dead ends so that they can be abandoned and the system’s effort is directed in more
fruitful directions.

5. Detect when an almost correct solution has been found.

Goal stack planning:

 This is one of the most important planning algorithms, which is specifically used by STRIPS.

 The stack is used in an algorithm to hold the action and satisfy the goal. A knowledge base is
used to hold the current state, actions.

 Goal stack is similar to a node in a search tree, where the branches are created if there is a
choice of an action.

The important steps of the algorithm are as stated below:

 Start by pushing the original goal on the stack. Repeat this until the stack becomes empty. If
stack top is a compound goal, then push its unsatisfied subgoals on the stack.

 If stack top is a single unsatisfied goal then, replace it by an action and push the action’s
precondition on the stack to satisfy the condition.

 If stack top is an action, pop it from the stack, execute it and change the knowledge base by the
effects of the action.

 If stack top is a satisfied goal, pop it from the stack.

Non-linear planning

 This planning is used to set a goal stack and is included in the search space of all possible subgoal
orderings. It handles the goal interactions by interleaving method.

Advantage of non-Linear planning

 Non-linear planning may be an optimal solution with respect to plan length (depending on search
strategy used).

Disadvantages of Nonlinear planning

 It takes larger search space, since all possible goal orderings are taken into consideration.

 Complex algorithm to understand.

Algorithm

1. Choose a goal 'g' from the goalset


2. If 'g' does not match the state, then

 Choose an operator 'o' whose add-list matches goal g

 Push 'o' on the opstack

 Add the preconditions of 'o' to the goalset

3. While all preconditions of operator on top of opstack are met in state

 Pop operator o from top of opstack

 state = apply(o, state)

 plan = [plan; o]

ALGORITHMS FOR PLANNING AS STATE-SPACE SEARCH

The two planners are:

1. Forward (progression) state-space search/Forward Planner/Progression Planner

2. Backward (regression) relevant-states search/Backward Planner/Regression Planner

1. Forward (progression) state-space search/Forward Planner/Progression Planner

 A forward planner, or progression planner starts at the initial state, and applies actions in an
effort to find a path to the goal state for many years, forward planning was thought to be too
inefficient to be practical.

 Forward search is prone to exploring irrelevant actions.

 Example: Consider an air cargo problem with 10 airports, where each airport has 5 planes and 20
pieces of cargo. The goal is to move all the cargo at airport A to airport B.

 There is a simple solution to the problem: load the 20 pieces of cargo into one of the planes at A,
fly the plane to B, and unload the cargo.

 Finding the solution can be difficult because the average branching factor is huge: each of the
50 planes can fly to 9 other airports, and each of the 200 packages can be either unloaded (if it is
loaded) or loaded into any plane at its airport (if it is unloaded). So in any state there is a
minimum of 450 actions (when all the packages are at airports with no planes) and a maximum of
10,450 (when all packages and planes are at the same airport).

 On average, let’s say there are about 2000 possible actions per state, so the search graph up to
the depth of the obvious solution has about 2000 41 node.
2. Backward(Regression)state-space search/Backward Planner/Regression Planner

 A backward planner, or regression planner, starts at the goal state, and works backwards from
that to try to find a path to the state.

 For many decades, backward planners were thought to be inherently more efficient than
forward planners because they only consider actions that are relevant to the goal the reason for
their presumed superiority was they result in smaller branching factors because they focus on
relevant states.

 The PDDL representation was designed to make it easy to regress actions—if a domain can be
expressed in PDDL, then we can do regression search on it.

 Example: Suppose the goal is to deliver a specific piece of cargo to SFO: At(C2, SFO).

 That suggests the action Unload(C2, p’ , SFO):

Example: Consider the goal Own(0136042597), given an initial state with 10 Billion ISBN’s and a single
action schema.

 Forward search without heuristic would start enumerating the 10 million ground BUY actions.

 But, with Backward search, we would unify the goal Own(0136042597)with the (standardized)
Own(i’), yielding the substitution θ = { i’ / 0136042597}. Then, we would regress over the action
Subst(θ, A’) to yield the predecessor state description ISBN(0136042597).

Heuristics for Planning:

 A heuristic function h(s) estimates the distance from a state s to the goal and that if we can
derive an admissible heuristic for this distance—one that does not overestimate—then we can use
A∗ search to find optimal solutions.

 An admissible heuristic can be derived by defining a relaxed problem that is easier to solve.

 The exact cost of a solution to this easier problem then becomes the heuristic for the original
problem.

 It appears now that the best planners are forward planners, the essential reason is that very
good general-purpose, and problem-specific, heuristics have been found for forward planners,
but similarly good heuristics have not been found for backwards planners.
 For example, one good general-purpose forward planning heuristic is to can relax this problem to
make it easier:

 By adding more edges to the graph,making it strictly easier to find a path.

 By grouping multiple nodes together, forming an abstraction of the state space that has
fewer states, and thus is easier to search.

1. Add more edges to the graph ---ignore preconditions heuristic

 First, we relax the actions by removing all preconditions and all effects except those that are
literals in the goal.

 The ignore preconditions heuristic, drops all preconditions from actions.

 This almost implies that the number of steps required to solve the relaxed problem is the
number of unsatisfied goals—almost but not quite, because (1) some action may achieve multiple
goals and (2) some actions may undo the effects of others.

2.Ignore delete lists

 Assume for a moment that all goals and preconditions contain only positive literals .We want to
create a relaxed version of the original problem that will be easier to solve, and where the
length of the solution will serve as a good heuristic.

 We can do that by removing the delete lists from all actions (i.e., removing all negative literals
from effects). That makes it possible to make monotonic progress towards the goal—no action
will ever undo progress made by another action

 Relaxations that decrease the number of states by forming a state abstraction—a many-to-one
mapping from states in the ground representation of the problem to the abstract representation.

HIERARCHICAL PLANNING

 Hierarchical planning is a planning method based on Hierarchical Task Network (HTN) or HTN
planning.

 HTN planning is often formulated with a single “top level” action called Act, where the aim is to
find an implementation of Act that achieves the goal.

 In HTN planning, the initial plan is viewed as a very high level description of what is to be done.
This plan is refined by applying decomposition actions. Each action decomposition reduces a
higher level action to a partially ordered set of lower level actions. This decomposition
continues until only the primitive actions remain in the plan.

 Consider the example of a hierarchical plan to travel from a certain source to destination,
 In the above hierarchical planner diagram, suppose we are Travelling from source “Mumbai” to
Destination “Goa”.

 Then, you can plan how to travel: whether by Plane, Bus, or a Car. Suppose, you choose to
travel by “Bus”.Then, “Take-Bus” plan can be further broken down into set of actions like: Goto
Mumbai – Bus stop, Buy-Ticket for Bus, Hop-on Bus, & Leave for Goa.

 Now, the four actions in previous point can be individually broken down. Take, “By-Ticket for
Bus”.

 It can be decomposed into: Go to Bus stop counter, Request Ticket & Pay for Ticket.

 Thus, each of these actions can be decomposed further, until we reach the level of actions that
can be executed without deliberation to generate the required motor control sequences.

 Here, we also use the concept of “One level Partial Order Planner” where say, if you plan to
take a trip, you need to decide a location first. This can be done by One Level Planner as:

 Switch on computer > Start web browser > Open Redbus website > Select date > Select class >
Select bus > …

Advantages of Hierarchical Planning:

 The key benefit of hierarchical structure is that, at each level of the hierarchy, plan is reduced
to a small number of activities at the next lower level,so the computational cost of finding the
correct way to arrange those activities for the current problem is small.

 HTN methods can create the very large plans required by many real-world applications.

 Hierarchical structure makes it easy to fix problems in case things go wrong.

 For complex problems hierarchical planning is much more efficient than single level planning.
Disadvantages of Hierarchical Planning:

 Many of the HTN planners require a Deterministic environment.

 Many of the HTN planners are unable to handle uncertain outcomes of actions.

Searching for primitive solutions:

 Repeatedly choose an HLA in the current plan and replace it with one of its refinements, until
the plan achieves the goal.

 One possible implementation based on breadth-first tree search. Plans are considered in order of
depth of nesting of the refinements, rather than number of primitive steps.

 It is straightforward to design a graph-search version of the algorithm as well as depth-first and


iterative deepening versions.

Searching for abstract solutions:

 Write precondition–effect descriptions of the HLAs,just as we write down what the primitive
actions do. From the descriptions, it ought to be easy to prove that the high-level plan achieves
the goal.

 Every high-level plan that “claims” to achieve the goal (by virtue of the descriptions of its steps)
does in fact achieve the goal in the sense defined earlier: it must have at least one
implementation that does achieve the goal.

 This property has been called the downward refinement property for HLA descriptions.

Planning and acting in non deterministic domains

 Consider this problem: given a chair and a table, the goal is to have them match—have the same
color. In the initial state we have two cans of paint, but the colors of the paint and the furniture
are unknown. Only the table is initially in the agent’s field of view

 There are two actions: removing the lid from a paint can and painting an object using the paint
from an open can

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy