AI Assignment
AI Assignment
Assignment
Course: Introduction to Artificial Intelligence
Duration: 03 weeks
I. Formation
• The midterm project is conducted in groups of 04 – 05 students.
• Student groups conduct required tasks and submit the project following instructions.
II. Tasks
a) Task 1 (4.0 points): 8-Puzzle
In the game 8-puzzle, you have to move tiles, given an initial state, to obtain one goal
state. Note that
• The initial state can be arbitrary permutation of 8 tiles and the blank cell.
• There are two goal states illustrated in the table below.
• For A* algorithm, students propose at least one heuristic function and determine its
admissibility and consistency.
• Implement a program, in which
o Generate randomly 1000 initial states
o For every initial state, execute BFS and A* algorithms, compute the path cost
for each algorithm
o Compute the average cost for each algorithm
o Draw a bar chart, using Matplotlib, to illustrate average path costs above.
• Students organize the program regarding to the OOP model, ensure source code is
compact and rational.
Source: https://blog.sciencemuseum.org.uk/pac-man-turns-40/
• Implement a complete program to execute designated algorithms, in which
o Input: path to a layout file; name of the expected algorithm
o Output: list of actions (North, East, West, South, Stop); total cost
o The maze structure is as below
§ % à obstacles/walls
§ P à initial location of the pacman
§ . à food points, there could be multiple points
§ spaces à blank cells.
§ There are no ghosts in the maze.
IV. Policy
- Student groups submitting late get 0.0 points for each member.
- Missing required materials in the submission loses at least 50% points of the
presentation.