Anwerml
Anwerml
Artificial Intelligence is the study of how to make computers do things, which, at the
moment, people do better.
According to the father of Artificial Intelligence, John McCarthy, it is “The science and
engineering of making intelligent machines, especially intelligent computer programs”.
Artificial Intelligence is a way of making a computer, a computer-controlled robot, or a
software think intelligently, in the similar manner the intelligent humans think.
State space is a set of legal positions, starting at the initial state, using the set of rules
to move from one state to another and attempting to end up in a goal state.
We must make explicit the preciously implicit goal of not only playing a legal game of
chess but also winning the game, if possible.
3q. Explain Breadth-first search (BFS) with an example. List down the advantages and disadvantages.
Advantages:
BFS will not get trapped exploring blind Alleys
5qWrite and elaborate the Algorithm for Steepest –Ascent Hill Climbing.
Write and elaborate the Algorithm for Steepest –Ascent Hill Climbing.
If there is solution, then BFS is guaranteed to find it. If there are multiple solutions then a
minimal solution will be found
Longer paths are never explored until all shorter ones have been examined
4Q
Water Jug Problem: You are given two jugs, a 4-gallon one and a 3-gallon one, a pump which has unlimited water
which you can use to fill the jug, and the ground on which water may be poured. Neither jug has any measuring
markings on it. How can you get exactly 2 gallons of water in the 4-gallon jug
i)Write down the production rules for the above problem
5Q
A. Write and explain hill climbing algorithm.
B. Elaborate the Algorithm for Steepest –Ascent Hill Climbing.
c. Comment on Hill climbing issues which terminates algorithm without finding a goal state or getting to state from
which no better state can be generated.
Hill Climbing
Hill Climbing is heuristic search used for mathematical optimization problems in the field of
Artificial Intelligence .
Given a large set of inputs and a good heuristic function, it tries to find a sufficiently good
solution to the problem. This solution may not be the global optimal maximum.
Features of Hill Climbing
1. Variant of generate and test algorithm: It is a variant of generate and test algorithm. The
generate and test algorithm is as follows:
Simple Hill climbing : It examines the neighboring nodes one by one and selects the first
neighboring node which optimizes the current cost as next node.
Algorithm for Simple Hill climbing :
Step 1 : Evaluate the initial state. If it is a goal state then stop and return success. Otherwise,
make initial
state as current state.
Step 2 : Loop until the solution state is found or there are no new operators present which can be
applied
to current state.
a) Select a state that has not been yet applied to the current state and apply it to produce a
new state.
b) Perform these to evaluate new state
i. If the current state is a goal state, then stop and return success.
ii. If it is better than the current state, then make it current state and proceed further.
iii. If it is not better than the current state, then continue in the loop until a solution is found.
Step 3 : Exit.
Steepest-Ascent Hill climbing : It first examines all the neighboring nodes and then selects
the node closest to the solution state as next node.
Step 1 : Evaluate the initial state. If it is goal state then exit else make the current state as initial
state
Step 2 : Repeat these steps until a solution is found or current state does not change
i. Let ‘target’ be a state such that any successor of the current state will be better than it;
ii. for each operator that applies to the current state
a. apply the new operator and create a new state
b. evaluate the new state
c. if this state is goal state then quit else compare with ‘target’
d. if this state is better than ‘target’, set this state as ‘target’
e. if target is better than current state set current state to Target
Step 3 : Exit
Comment on Hill climbing issues which terminates algorithm without finding a goal state or getting to state
from which no better state can be generate
AO*Refer text
8Q. Explain different approaches to knowledge Representation
A knowledge representation system should have following properties.
1. Representational Adequacy
The ability to represent all kinds of knowledge that are needed in that domain.
2. Inferential Adequacy
Also, The ability to manipulate the representational structures to derive new
structures corresponding to new knowledge inferred from old.
3. Inferential Efficiency
The ability to incorporate additional information into the knowledge structure that
can be used to focus the attention of the inference mechanisms in the most
promising direction.
4. Acquisitional Efficiency
Moreover, The ability to acquire new knowledge using automatic methods
wherever possible rather than reliance on human intervention.
Relational Knowledge
The simplest way to represent declarative facts is a set of relations of the same sort used
in the database system.
Provides a framework to compare two objects based on equivalent attributes. o Any
instance in which two different objects are compared is a relational type of knowledge.
The table below shows a simple way to store facts.
Also, The facts about a set of objects are put systematically in columns.
This representation provides little opportunity for inference.
Given the facts, it is not possible to answer a simple question such as: “Who is the
heaviest player?”
Also, But if a procedure for finding the heaviest player is provided, then these facts will
enable that procedure to compute an answer.
Moreover, We can ask things like who “bats – left” and “throws – right”.
Inheritable Knowledge
Here the knowledge elements inherit attributes from their parents.
The knowledge embodied in the design hierarchies found in the functional, physical and
process domains.
Within the hierarchy, elements inherit attributes from their parents, but in many cases, not
all attributes of the parent elements prescribed to the child elements.
Also, The inheritance is a powerful form of inference, but not adequate.
Moreover, The basic KR (Knowledge Representation) needs to augment with inference
mechanism.
Property inheritance: The objects or elements of specific classes inherit attributes and
values from more general classes.
So, The classes organized in a generalized hierarchy.
A Predicate is a truth assignment given for a particular statement which is either true or
false. Tosolve common sense problems by computer system, we use predicate logic.
First-order Predicate logic (FOPL) models the world in terms of
Objects, which are things with individual identities
Properties of objects that distinguish them from other objects
Relations that hold among sets of objects
10Q For the above statements, apply Resolution Algorithm to Prove “Marcus hated Ceaser”
12Q Describe the Issues of Knowledge Representation
Refer text book chapter 4: section 4.3( Evaine Rich & Knight for AI)