0% found this document useful (0 votes)
44 views2 pages

Assignment 1: Solving Bloxorz Using Search: Due Sunday, 1 November, 11pm

1) The document describes Assignment 1 for CS 404 Artificial Intelligence, which involves implementing and comparing Uniform Cost Search and A* search algorithms to solve Bloxorz puzzles. 2) Students must model Bloxorz as a search problem, specifying states, successors, initial state, goal test, and costs. They then implement UCS and prove an admissible heuristic for A*. 3) Experiments comparing UCS and A* on sample puzzles are required, with results presented in a table and discussion. Code and documentation are submitted along with sample puzzle boards.

Uploaded by

Mehmet Başaran
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)
44 views2 pages

Assignment 1: Solving Bloxorz Using Search: Due Sunday, 1 November, 11pm

1) The document describes Assignment 1 for CS 404 Artificial Intelligence, which involves implementing and comparing Uniform Cost Search and A* search algorithms to solve Bloxorz puzzles. 2) Students must model Bloxorz as a search problem, specifying states, successors, initial state, goal test, and costs. They then implement UCS and prove an admissible heuristic for A*. 3) Experiments comparing UCS and A* on sample puzzles are required, with results presented in a table and discussion. Code and documentation are submitted along with sample puzzle boards.

Uploaded by

Mehmet Başaran
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/ 2

CS 404, Fall 2020 Artificial Intelligence

Assignment 1:
Solving Bloxorz using Search
Due Sunday, 1 November, 11pm

Bloxorz is a game where the goal is to drop a 1 × 2 × 1 block through a hole in the
middle of a board without falling off its edges. This game is available at

http://www.coolmath-games.com/0-bloxorz/index.html.

Please implement in Python

• a Uniform Cost Search (UCS) algorithm, and

• an A* search algorithm

to solve the following version (stage 2) of this puzzle.

Input of the problem The input game board of size m×n is represented by a matrix
of size m × n where

• O denotes safe tiles: the block can stand on these anytime;

• X denotes empty tiles: the block may never touch an empty tile, even if half of
the block is on a safe tile;

• S denotes the tile(s) occupied by the block: if the block is in the vertical orien-
tation then there is one tile labeled S, otherwise (if the block is in the horizontal
orientation) there are two adjacent tiles labeled S;

• G denotes the goal tile: the block needs to be on it (vertically) in order to fall
into the goal.

For instance, the matrix below represents the game board depicted in Figure 1.

O O O X X X X X X X
O O O O O O X X X X
O O O S O O O O O X
X O O S O O O O O O
X X X X X O O G O O
X X X X X X O O O X

1
CS 404, Fall 2020 Artificial Intelligence

Figure 1: A game board for Bloxorz.

Output of the problem A shortest sequence of legal states that navigate the block
from its given initial location into the goal.

What to do The assignment consists of five parts:

1. (10 points) Model the puzzle as a search problem: specify the states, successor
state function, initial state, goal test, and step cost.

2. (30 points, provided that the first part is completed) Implement in Python a UCS
algorithm to solve the puzzle.

3. (10 points, provided that the first part is completed) Extend your search model
for A* search: Find a heuristic function and prove that it is admissible.

4. (30 points, provided that the third part is completed) Implement in Python an
A* search algorithm to solve the puzzle.

5. (20 points) Compare your UCS and A* codes on some sample puzzle instances.
Construct a table that shows, for each instance, time and memory consump-
tion. Discuss the results of these experiments: Are the results surprising or as
expected? Please explain.

Submit

• A pdf copy of a description of your solutions (search model and heuristic func-
tion), and experimental evaluation (table and discussion).

• Your Python code for each algorithm, with comments describing your solution.

• Several test boards you created for the fifth part of the assignment.

In each one of the deliverables above, please include your name and student id.

Demos You are expected to make a demo of your solution so that we can grade parts
2, 4, and 5. The demos are planned for November 2, Monday 17:40–18:30, and/or,
November 3, Tuesday 16:40–18:30. The demos will be scheduled later on.

You might also like