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

Intro To Artificial Intelligence Assignment 1: Search Algorithms

This document provides instructions for an assignment on search algorithms. Students are asked to implement and compare five search algorithms - breadth-first/uniform-cost search, depth-limited/iterative deepening/bidirectional search, and A* search using different heuristics - on a grid world problem read from a file. They must code the ability to read the grid and problem, run the selected algorithm, and display the resulting path and cost. In their analysis, students must determine if the algorithms are complete/optimal and if the heuristics are consistent/admissible. Results should be plotted and compared.

Uploaded by

Jay Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views

Intro To Artificial Intelligence Assignment 1: Search Algorithms

This document provides instructions for an assignment on search algorithms. Students are asked to implement and compare five search algorithms - breadth-first/uniform-cost search, depth-limited/iterative deepening/bidirectional search, and A* search using different heuristics - on a grid world problem read from a file. They must code the ability to read the grid and problem, run the selected algorithm, and display the resulting path and cost. In their analysis, students must determine if the algorithms are complete/optimal and if the heuristics are consistent/admissible. Results should be plotted and compared.

Uploaded by

Jay Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Intro to Artificial Intelligence

Assignment 1: Search algorithms

Summer, 2021

General Instructions
Teams: Assignment should be completed by teams of two students. No additional credit for
working individually. Use this form https://forms.gle/nFWwmcncohXTVbDE7 to inform the TAs
you either a) have a team (only one member of the team) b) looking for a team or c) working
alone (discourage).
Submission: Submit a PDF file to Sakai. For the programming questions, submit your code
in a compressed file. DO NOT submit documents in Word, raw text, images, etc. One submission
per team is enough. Be sure to submit before the deadline (see Sakai). You have unlimited
submission, partial submissions are encourage! Code submitted must run on ilab machines in
order the be graded.
Program Demonstrations: Each team will have 10 minutes to demonstrate the implementa-
tion to one TA as well as answer questions on a date scheduled after the deadline. Be sure to
prepare ahead to show the program running.
LATEX: Extra credit (10%) for submitting answers using LATEX. If you choose to do this, submit
all files (*.tex) as a separate compressed file.
Plagiarism: Each team must implement and answer questions independently. Indicate any
external sources used for your submission. If plagiarism is detected, the assignment will receive
0 points.

Description
Consider a grid world like the one shown in Fig. 1, where an agent can move freely in the non-
blocked cells. The objective of this assignment is to implement and compare search algorithms
that will allow the agent to move from a given initial state to given goal state without colliding.

Properties of the agent:


• Is deterministic

• Moving left or right has a cost of 1

• Moving up or down has a cost of 2

1
CS440: Intro to AI

Figure 1: An example grid world

• Cannot move diagonally

Your program must:

• Read the problem.txt file

• Read the specified grid world

• Solve the problem using the specified algorithm

• Show the resulting path and its cost

The problem.txt file


By lines (see example on Sakai):

0. Size of the maze N - integer

1. Start state xy - two integers: 0 ≤ x, y < N

2. Goal state xy - two integers: 0 ≤ x, y < N

3. Algorithm - integer from 0 to 4

4. Maze - integer representing the maze to use

Algorithms:
0. Select one of: Breadth-first search or Uniform-cost search

1. Select one of: Depth-limited, Iterative deepening depth-first search or bidirectional search

2. A* using one of h0 , h1 or h2

3. A* using one of h3 , h4 or h5

4. A* using your own heuristic

2/3
CS440: Intro to AI

Heuristics:

• h0 - Euclidean distance

• h1 - Manhattan distance

• h2 - Infinity norm (Max of x,y)

• h3 (n) = min{ hi (n), h j (n)}, hi 6= h j ; i, j ∈ [0, 2]

• h4 (n) = w ∗ hi (n)(1 − w) ∗ h j (n), w = rand(0, 1); hi 6= h j ; i, j ∈ [0, 2]

• h5 (n) = max { hi (n), h j (n)}, hi 6= h j ; i, j ∈ [0, 2]

1 Questions
Setup [5 points]: (Code) Be able to read the files and show the grid world with the initial state of
the agent.
A well defined problem [5 points]: (pdf) Describe the problem to be solved. What kind of task
environment is this?
Algorithm 0 [10 points]: (Code) Implement and run the selected algorithm on 50 environments.
Algorithm 1 [10 points]: (Code) Implement and run the selected algorithm on 50 environments.
Algorithm 2 [10 points]: (Code) Implement and run the selected algorithm on 50 environments.
Algorithm 3 [10 points]: (Code) Implement and run the selected algorithm on 50 environments.
Algorithm 4 [10 points]: (Code) Implement and run the selected algorithm on 50 environments.
Analysis [20]: (pdf) Answer (and explain why / why not):

• Is the implemented Algorithm 0 complete? optimal? What about the other one?

• Is the implemented Algorithm 1 complete? optimal?

• For algorithm 2, is the selected heuristic consistent? admissible?

• For algorithm 3, is the selected heuristic consistent? admissible?

• For algorithm 4, is the selected heuristic consistent? admissible? Explain how the choice
was made and if it is better than the other ones.

Results [20 points]: (pdf) Show, compare (plot) and explain your results.

3/3

You might also like