0% found this document useful (0 votes)
10 views

Anwerml

Artificial intelligence is the study of how to make computers do tasks that typically require human intelligence. The main domains of AI include computer vision, robotics, planning and scheduling, natural language processing, and game playing. State space search is a problem-solving technique where the problem is represented as a graph consisting of states, with the initial state at the start and goal states that represent solutions. Breadth-first search is a technique that explores all nodes at the current depth prior to moving to the next depth level, providing completeness but not necessarily optimal solutions. Knowledge representation involves representing information about the world in a form that allows an AI system to derive new facts. Common approaches include relational, inheritance-based, semantic networks and frames
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Anwerml

Artificial intelligence is the study of how to make computers do tasks that typically require human intelligence. The main domains of AI include computer vision, robotics, planning and scheduling, natural language processing, and game playing. State space search is a problem-solving technique where the problem is represented as a graph consisting of states, with the initial state at the start and goal states that represent solutions. Breadth-first search is a technique that explores all nodes at the current depth prior to moving to the next depth level, providing completeness but not necessarily optimal solutions. Knowledge representation involves representing information about the world in a form that allows an AI system to derive new facts. Common approaches include relational, inheritance-based, semantic networks and frames
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

1A Define AI. Explain the different task domains of AI.

 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.

Different task domains of AI:

(Note: Briefly Explain each task in your own words)

2. Define State Space Search. Explain in detail with an general AI Problem

Defining the Problem as a State Space Search

Problem solving = Searching for a goal state


It is a structured method for solving an unstructured problem. This approach consists of number
of states. The starting of the problem is “Initial State” of the problem. The last point in the
problem is called a “Goal State” or “Final State” of the problem.

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.

Methodology of State Space Approach


1. To represent a problem in structured form using different states
2. Identify the initial state
3. Identify the goal state
4. Determine the operator for the changing state
5. Represent the knowledge present in the problem in a convenient form
6. Start from the initial state and search a path to goal state
Example:

 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

(ii) Write any one solution to the above problem

Refer text or notes for solution.

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

Different regions in the State Space Diagram


1. Local maximum : It is a state which is better than its neighboring state however there exists a
state which is better than it(global maximum). This state is better because here value of objective
function is higher than its neighbors.
2. Global maximum : It is the best possible state in the state space diagram. This because at this
state, objective function has highest value.
3. Plateua/flat local maximum : It is a flat region of state space where neighboring states have the
same value.
4. Ridge : It is region which is higher than its neighbours but itself has a slope. It is a special kind
of local maximum.
5. Current state : The region of state space diagram where we are currently present during the
search.
6. Shoulder: It is a plateau that has an uphill edge. Problems in different regions in Hill climbing
Hill climbing cannot reach the optimal/best state(global maximum) if it enters any of the
following regions :
1. Local maximum : At a local maximum all neighboring states have a values which is worse
than the current state. Since hill climbing uses greedy approach, it will not move to the worse
state and terminate itself. The process will end even though a better solution may exist.
To overcome local maximum problem : Utilize backtracking technique. Maintain a list of visited
states. If the search reaches an undesirable state, it can backtrack to the previous configuration
and explore a new path.
2. Plateau : On plateau all neighbors have same value . Hence, it is not possible to select the best
direction.To overcome plateaus : Make a big jump. Randomly select a state far away from
current state. Chances are that we will land at a non-plateau region
3. Ridge : Any point on a ridge can look like peak because movement in all possible directions is
downward. Hence the algorithm stops when it reaches this state.

Q6 Write and explain AO* Algorithm.


Apply AO* algorithm for the following graph and find the final path.

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.

Boxed nodes — objects and values of attributes of objects.


Arrows — the point from object to its value.
This structure is known as a slot and filler structure, semantic network or a collection of
frames.
The steps to retrieve a value for an attribute of an instance object:
1. Find the object in the knowledge base
2. If there is a value for the attribute report it
3. Otherwise look for a value of an instance, if none fail
4. Also, Go to that node and find a value for the attribute and then report it
5. Otherwise, search through using is until a value is found for the attribute.
Inferential Knowledge
This knowledge generates new information from the given information.
This new information does not require further data gathering form source but does
require analysis of the given information to generate new knowledge.
Example: given a set of relations and values, one may infer other values or relations. A
predicate logic (a mathematical deduction) used to infer from a set of attributes.
Moreover, Inference through predicate logic uses a set of logical operations to relate
individual data.
Represent knowledge as formal logic: All dogs have tails ∀x: dog(x) → hastail(x)
Advantages:
A set of strict rules.
Can use to derive more facts.
Also, Truths of new statements can be verified.
Guaranteed correctness.
So, Many inference procedures available to implement standard rules of logic popular in
AI systems.
Procedural Knowledge
A representation in which the control information, to use the knowledge, embedded in the
knowledge itself. For example, computer programs, directions, and recipes; these indicate
specific use or implementation;
Moreover, Knowledge encoded in some procedures, small programs that know how to do
specific things, how to proceed.
Advantages:
Heuristic or domain-specific knowledge can represent.
Moreover, Extended logical inferences, such as default reasoning facilitated.
Also, Side effects of actions may model. Some rules may become false in time.
Keeping track of this in large systems may be tricky.

9Q . Define predicate logic.

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

Represent following sentences into equivalent predicate logic form.


1. Marcus was a man.
man(Marcus)
2. Marcus was a Pompeian.
Pompeian(Marcus)
3. All Pompeians were Romans.
∀x: Pompeian(x) → Roman(x)
4. Caesar was a ruler.
ruler(Caesar)
5. All Pompeians were either loyal to Caesar or hated him.
inclusive-or
∀x: Roman(x) → loyalto(x, Caesar) ∨ hate(x, Caesar)
exclusive-or
∀x: Roman(x) → (loyalto(x, Caesar) ∧¬ hate(x, Caesar)) ∨
(¬loyalto(x, Caesar) ∧ hate(x, Caesar))
69
6. Everyone is loyal to someone.
∀x: ∃y: loyalto(x, y)
7. People only try to assassinate rulers they are not loyal to.
∀x: ∀y: person(x) ∧ ruler(y) ∧ tryassassinate(x, y)
→¬loyalto(x, y)
8. Marcus tried to assassinate Caesar.
tryassassinate(Marcus, Caesar)

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)

You might also like