0% found this document useful (0 votes)
11 views8 pages

2425 CSC14003 23CLC1 Quiz01

The document contains a series of quizzes for a course on Artificial Intelligence, covering topics such as search algorithms, game trees, and genetic algorithms. Each quiz includes questions on specific algorithms, their performance, and theoretical concepts, along with space for student responses and scores. The quizzes assess understanding of search strategies, minimax algorithms, and the implications of genetic algorithm parameters.

Uploaded by

minhducc2kg
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)
11 views8 pages

2425 CSC14003 23CLC1 Quiz01

The document contains a series of quizzes for a course on Artificial Intelligence, covering topics such as search algorithms, game trees, and genetic algorithms. Each quiz includes questions on specific algorithms, their performance, and theoretical concepts, along with space for student responses and scores. The quizzes assess understanding of search strategies, minimax algorithms, and the implications of genetic algorithm parameters.

Uploaded by

minhducc2kg
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/ 8

Class 23CLC01 – Term III/2024-2025

QUIZ 01-A Course: CSC14003 – Artificial Intelligence

Student ID: Duration: 30 mins Date: 05/6/2025


Student name: Score: /5

Q1 (2.5pts) Consider the following graph. The initial state is vertex A, and the goal state is vertex G. The heuristic
table is shown aside the graph. The ties are broken in alphabetical order.

For each of the following search strategies, state the order in which states are expanded and the path returned.
Vertices should be presented in their exact order. Note that:
• The path returned will not be accepted if the list of expanded states is wrong.
• We apply early stopping for BFS, DFS, and GBFS.

Algorithm List of expanded states in exact order Path returned

Uniform cost search (0.5pt) A B C D E F H J G A D H G

Breadth-first search (0.5pt) A B C D E F J A C J G


Tree-search Depth-first search (0.5pt)
A B E F D H A B F D H G
avoid repeating any state on the current path

Graph-search GBFS (0.5pt) A B E F D H A D H G

Graph-search A* (0.5pt) A B E D F H G A D H G

Q2 (0.5pt) Consider the Knight's Tour problem on an 8×8 chessboard. What are the maximum branching factor
and minimum branching factor in this problem? Draw the board configurations that demonstrates these factors.

Maximum branching factor: 8 (white knight)


Minimum branching factor: 2 (black knight)
Q3 (1.5pts) Consider the game tree below, which depicts a position reached in a minimax game. Inside each leaf
node is the estimated score of that resulting position returned by the evaluation function. It’s MAX’s turn to move.

a) (0.5pt) Apply the minimax algorithm (without pruning) to obtain the value of each non-leaf node.
Node A B C D E F G H I J K L M N O
Value 9 9 3 9 10 4 3 9 8 10 1 4 0 3 1

b) (1pt) Apply the alpha-beta pruning algorithm. Mark the pruned node directly on the figure and explain for each
pruned node or pruned subtree.
Prune I – 11: I inherits  = 9 from node D. I gets  = 8 after visiting the left child. Thus [, ] = [9, 8] invalid.
Prune subtree rooted at K: E inherits  = 9 from node B. E gets  = 10 after visiting the left child. Thus [, ] =
[10, 9] invalid.
Prune L – 4: L inherits  = 9 from node A. L gets  = 5 after visiting the left child. Thus [, ] = [9, 5] invalid.
Prune M – 0: M inherits  = 9 from node A. M gets  = 4 after visiting the left child. Thus [, ] = [9, 4] invalid.
Prune subtree rooted at G: C inherits  = 9 from node A. C gets  = 5 after visiting the left child. Thus [, ] = [9,
5] invalid.

Q4 (0.5pt) What might happen if we eliminate the mutation step from the genetic algorithm?
Removing the mutation step from a genetic algorithm reduces genetic diversity, limits exploration, and increases
the risk of premature convergence to local optima. Over time, the algorithm may stagnate, as crossover alone
cannot introduce new traits.
Class 23CLC01 – Term III/2024-2025
QUIZ 01-B Course: CSC14003 – Artificial Intelligence

Student ID: Duration: 30 mins Date: 05/6/2025


Student name: Score: /5

Q1 (2.5pts) Consider the following graph. The initial


state is vertex A, and the goal state is vertex H.
For each state, its heuristic value is written aside (in
the parentheses).
The ties are broken in alphabetical order

For each of the following search strategies, state the


order in which states are expanded and the path
returned. Vertices should be presented in their exact
order. Note that:

• The path returned will not be accepted if the list of expanded states is wrong.
• We apply early stopping for BFS, DFS, and GBFS.

Algorithm List of expanded states in exact order Path returned


A C F G H
Uniform cost search (0.5pt) A B C D F E G H
A C F E G H

Breadth-first search (0.5pt) A B C D F E G A C F G H


Tree-search Depth-first search (0.5pt)
A B D E F C G A B D E F G H
avoid repeating any state on the current path

Graph-search GBFS (0.5pt) A B D E G A B D E G H


A C F G H
Graph-search A* (0.5pt) A B D C F E G H
A C F E G H

Q2 (0.5pt) For each of the following terms on the left, write in the letter corresponding to the best answer or the
correct definition on the right. The first one is done for you as an example.

A Agent A Perceives environment by sensors, acts by actuators

C State Space B Guaranteed to find a solution if one is accessible

F Frontier C All states reachable from the initial state by a sequence of actions

E Optimality D Apply each legal action to state, generating a new set of states

B Completeness E Guaranteed to find lowest cost solution among all solutions


Stores the set of all leaf nodes available for expansion at any given
D Expand a state F
time
Q3 (1.5pts) Consider the game tree below, which depicts a position reached in a minimax game. Inside each leaf
node is the estimated score of that resulting position returned by the evaluation function. It’s MAX’s turn to move.

a) (0.5pt) Apply the minimax algorithm (without pruning) to obtain the value of each non-leaf node.
Node A B C D E F G H I J K L M N O
Value -2 -2 -3 -2 -1 -3 1 -2 -8 -1 -5 -3 -6 1 -7

b) (1pt) Apply the alpha-beta pruning algorithm. Mark the pruned node directly on the figure and explain for each
pruned node or pruned subtree.
Prune I – 6: I inherits  = -2 from node D. I gets  = -8 after visiting the left child. Thus [, ] = [-2, -8] invalid.
Prune subtree rooted at K: E inherits  = -2 from node B. E gets  = -1 after visiting the left child. Thus [, ] =
[-1, -2] invalid.
Prune M – 8: M inherits  = -2 from node A. M gets  = -6 after visiting the left child. Thus [, ] = [-2, -6]
invalid.
Prune subtree rooted at G: C inherits  = -2 from node A. C gets  = -3 after visiting the left child. Thus [, ] =
[-2, -3] invalid.

Q4 (0.5pt) Describe an advantage and one disadvantage of local search over global search.
Advantage: Local search requires less memory because it does not track reached states.
Disadvantage: Local search may not be able to find the solution even when the solution exists in the state space
because it may stop when no better successor is found.
Class 23CLC01 – Term III/2024-2025
QUIZ 01-C Course: CSC14003 – Artificial Intelligence

Student ID: Duration: 30 mins Date: 05/6/2025


Student name: Score: /3

Q1 (2.5pts) Consider the following graph. The initial state is vertex S, and the goal state is vertex G. The heuristic
table is shown aside the graph. The ties are broken in alphabetical order.

For each of the following search strategies, state the order in which states are expanded and the path returned.
Vertices should be presented in their exact order. Note that:
• The path returned will not be accepted if the list of expanded states is wrong.
• We apply early stopping for BFS, DFS, and GBFS.

Algorithm List of expanded states in exact order Path returned

Uniform cost search (0.5pt) S B A C D E G S A D G

Breadth-first search (0.5pt) S A B C D S A D G

Tree-search Depth-first search (0.5pt)


S A D S A D G
avoid repeating any state on the current path

Graph-search GBFS (0.5pt) S B D S B D G

Graph-search A* (0.5pt) S B C A D G S A D G

Q2 (0.5pt) Consider the Tower of Hanoi problem with three pegs and N disks. How many valid states exist in the
state space? Explain how you compute this number.
A state is legal where the disks are arranged in decreasing order of sizes from bottom to top. For the largest disk,
it can be in one of the three pegs. And next, for the second largest disk, it can be in one of the three pegs without
violating the rule. And so on until the smallest disk. Thus, the product of N numbers, 3  3  …  3 = 3N
Q3 (1.5pts) Consider the game tree below, which depicts a position reached in a minimax game. Inside each leaf
node is the estimated score of that resulting position returned by the evaluation function. It’s MAX’s turn to move.

a) (0.5pt) Apply the minimax algorithm (without pruning) to obtain the value of each non-leaf node.
Node A B C D E F G H I J K L M N O
Value 8 8 1 8 10 1 7 6 8 10 4 0 1 3 7

b) (1pt) Apply the alpha-beta pruning algorithm. Mark the pruned node directly on the figure and explain for each
pruned node or pruned subtree.
Prune subtree rooted at K: E inherits  = 8 from node B. E gets  = 10 after visiting the left child. Thus [, ] =
[10, 8] invalid.
Prune L – 0: L inherits  = 8 from node A. L gets  = 7 after visiting the left child. Thus [, ] = [8, 7] invalid.
Prune M – 1: M inherits  = 8 from node A. M gets  = 6 after visiting the left child. Thus [, ] = [8, 6] invalid.
Prune subtree rooted at G: C inherits  = 8 from node A. C gets  = 7 after visiting the left child. Thus [, ] = [8,
7] invalid.

Q4 (0.5pt) In genetic algorithm, what might happen if we set the probability of mutation to a high value?
Setting a high mutation probability in a genetic algorithm can disrupt good solutions by introducing too much
randomness, making the search behave more like a random walk. This reduces the algorithm's ability to refine and
exploit promising solutions, potentially slowing convergence and lowering overall performance.
Class 23CLC01 – Term III/2024-2025
QUIZ 01-D Course: CSC14003 – Artificial Intelligence

Student ID: Duration: 30 mins Date: 05/6/2025


Student name: Score: /3

Q1 (2.5pts) Consider the following graph. The initial state is vertex S, and the goal state is vertex G. The heuristic
table is shown aside the graph. The ties are broken in alphabetical order.

For each of the following search strategies, state the order in which states are expanded and the path returned.
Vertices should be presented in their exact order. Note that:
• The path returned will not be accepted if the list of expanded states is wrong.
• We apply early stopping for BFS, DFS, and GBFS.

Algorithm List of expanded states in exact order Path returned


S F G
Uniform cost search (0.5pt) S A F B C D E G
S A D G

Breadth-first search (0.5pt) S A B C F S F G


Tree-search Depth-first search (0.5pt)
S A D S A D G
avoid repeating any state on the current path

Graph-search GBFS (0.5pt) S B D S B D G

S F G
Graph-search A* (0.5pt) S F A B D G
S A D G

Q2 (1pt) For each of the following terms on the left, write in the letter corresponding to the best answer or the
correct definition on the right. The first one is done for you as an example.

A Agent A Perceives environment by sensors, acts by actuators

C Branching Factor B Returns the state that results from doing an action in the given state

F Problem formulation C The average/maximum number of successors of any node

E Successor D Represents all the possible action sequences starting at the initial state
D Search tree E A state reachable from a given state by a single action
The agent devises a description of the states and actions necessary to
B Transition model F
reach the goal.

Q3 (1.5pts) Consider the game tree below, which depicts a position reached in a minimax game. Inside each leaf
node is the estimated score of that resulting position returned by the evaluation function. It’s MAX’s turn to move.

a) (0.5pt) Apply the minimax algorithm (without pruning) to obtain the value of each non-leaf node.
Node A B C D E F G H I J K L M N O
Value 0 0 -2 0 1 -2 1 0 -1 1 -3 -2 -3 1 -4

b) (1pt) Apply the alpha-beta pruning algorithm. Mark the pruned node directly on the figure and explain for each
pruned node or pruned subtree.
Prune I – 8: I inherits  = 0 from node D. I gets  = -1 after visiting the left child. Thus [, ] = [0, -1] invalid.
Prune subtree rooted at K: E inherits  = 0 from node B. E gets  = 1 after visiting the left child. Thus [, ] = [1,
0] invalid.
Prune L – 5: L inherits  = 0 from node A. L gets  = -2 after visiting the left child. Thus [, ] = [0, -2] invalid.
Prune subtree rooted at G: C inherits  = 0 from node A. C gets  = -2 after visiting the left child. Thus [, ] = [-
2, 0] invalid.

Q4 (0.5pt) While graph-search greedy best-first search and steepest-ascent hill climbing both use heuristic
functions, their behaviors and outcomes are quite different. Point out two differences between these algorithms.
Backtracking: Graph-search greedy best-first search can backtrack and explore multiple paths, while steepest-
ascent hill climbing only moves to the best neighbor and cannot backtrack.
Completeness: Greedy best-first search is more likely to find a solution (more complete), whereas hill climbing
can get stuck in local maxima and fail to find the goal.

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