You are on page 1of 7

Quiz Number 1

Q1. What can be a suitable heuristic function for

(i) Chess Playing

Answer:

Step 1: Select a move available from all possible moves.

Step 2: Count up the value of the pieces vs. the value of your opponent's
pieces with the following rule:

White Pawn = 10,White Bishop/Knight = 30,White Rook = 50,White Queen


= 90,White King = 900

Black Pawn = -10,Black Bishop/Knight = -30,Black Rook = -50,Black


Queen = -90,Black King = -900

Step 2: Count and Identify the squares controlled by each side.

Step 3: Check for structural weaknesses in either king's position.

If structural weakness is found in the opponent's king’s position,


move appropriate piece to take advantage.

Else if structural weakness is found in own king’s position, move


appropriate piece to defend it.

Else goto Step 4:

Step 4: Move piece to decrease the squares controlled by opponent.

Step 5: Repeat step 1-4


(ii) Travelling Salesman Problem

Answer:

Step 1: Pick any starting node.

Step 2: Look at all the arcs coming out of the starting node that have not
been visited and choose the next closest node.

Step 3: Repeat the process until all the nodes have been visited at least
once.

Step 4: Check and see if all nodes are visited. If so return to the starting
point which gives us a tour.

Step 5: Draw and write down the tour, and calculate the distance of the
tour.

Q2. Can the following facts be represented in the predicate logic in the form
of well-formed formulae's? If yes then How ?

(i) only hardworking people become successful.

Answer: ∀X:Hardworking(X) → Successful(X)

(ii) Every monkey has a tail

Answer: ∀X:Monkey(X)→ hasTail(X)

(iii) Every big blue block is on the red block


Answer: ∀X∃Y:BigBlueBlock(X)^RedBlock(Y)→isOn(X,Y)

(iv) All birds fly

Answer: ∀X:Bird(X)→Fly(X)

Q3. To solve the following problems, tell whether the search should
proceed forward or backward

Ans.

(i) Water jug problem.

The search should proceed forward since we reason forward from


the initial stage configuration towards the given final stage configuration.

(ii) Block world problem.


The search should proceed forward since we reason forward from
the initial stage configuration towards the given final stage configuration.
Q4. Is the following statement true? Justify your answer

“ Best First Search is a combination of Breadth first and depth first search”

Ans. The answer is No.

The reason is as follows: Both depth-first search and breadth-first search


are uninformed search algorithms. A distinctive feature of these algorithms
is that they stop once the goal node is generated.

If all operators are given the same cost (so that you consider them to have
the same cost equal to 1), then:

Breadth-first search is guaranteed to find the solution, and also to


deliver an optimal one. This is, it is both complete and admissible (some
people refer to this also as been optimal).

Depth-first search, however, is neither complete nor admissible because it


is bounded by a maximum depth. It might well happen that the goal lies
beyond it and thus, it cannot guarantee to find it.

Best-First search, on the other hand, uses an OPEN list where nodes are
sorted in increasing order of f(n)=g(n)+h(n) where: g(n) is the cost of the
current path from the start node to node n, and h(n) is an estimate of the
remaining effort to reach the goal from n. As such, f(n) stands for an
estimate of the best path from the start node to the goal that goes through
node n. However, in contrast with the case of uninformed search
algorithms, Best-first search algorithms halt only when the solution is about
to be expanded!

Q5 What kind of clauses are available in Conjunctive Normal Form?


a) Disjunction of literals

b) Disjunction of variables

c) Conjunction of literals

d) Conjunction of variables

Ans. (a) Disjunction of literals.

Q6. A production rule consists of

a) A set of Rule

b) A sequence of steps

c) Set of Rule & sequence of steps

d) Arbitrary representation to problem

Ans. (a) A set of rules.

Q7. A problem in a search space is defined by which one of these states

a) Initial state
b) Last state

c) Intermediate state

d) All of the mentioned

Ans. (a) Initial state

Q8.Which form is called as a conjunction of disjunction of literal s?

a) Conjunctive normal form

b) Disjunctive normal form

c) Normal form

d) All of the mentioned

Ans. (a) Conjunctive normal form

Q9. Which search method takes less memory

a) DFS

b) BFS
c) Linear Search

d) All will take same memory

Ans. (a) DFS

Q10. In propositional logic P ⇔ Q is equivalent to (Where ~ denotes NOT):

a.~ (P ˅ Q) ˄ ~ (Q ˅ P)

b.(~ P ˅ Q) ˄ (~ Q ˅ P)

c.(P ˅ Q) ˄ (Q ˅ P)

d.~ (P ˅ Q) → ~ (Q ˅ P)

Ans. (b) (~ P ˅ Q) ˄ (~ Q ˅ P)

You might also like