Programming Assignment 1
Programming Assignment 1
Lab
Lab Instructor
Shafaqat Ali
Programming Assignment # 1
Submission:
● Submit your work in a single zip file with the name StudentName_RollNumber_01.zip
containing code and report.pdf
● The assignment is only acceptable in a jupyter notebook python file with .ipnyb
extension. No PyCharm, Spider, or other IDEs.
● You will submit a report containing the screenshots of your output(program output) and
any other detail if you want to provide.
● Follow the above naming convention for submission, there is a 5% penalty if you don’t
follow it.
● 10% (of obtained marks) deduction per day for a late submission. There will be no
submission after 5 days.
● You cannot look at others’ code or use others’ code, however, you can discuss it with
each other. Plagiarism will lead to a straight zero with additional consequences as well.
Note: For this assignment (and for others in general) you are not allowed to search online for
any kind of implementation. Do not share code or look at the other’s code. You should not have
any implementation related to the assignment, other than your own.
Programming Task
Write a program to solve the 8-puzzle problem using the A* search algorithm.
The 8-puzzle problem is a puzzle invented and popularized by Noyes Palmer Chapman in the
1870s. It is played on a 3-by-3 grid with 8 square blocks labeled 1 through 8 and a blank square
labeled with 0. Your goal is to rearrange the blocks so that they are in order. You are permitted
to slide blocks horizontally or vertically into the blank square. The following shows a sequence
of legal moves from an initial board position (left) to the goal position (right).
Implementation Details:
🤓 Good Luck 🤓