In this mini-project, you’ll implement an agent that can solve Block World problems for an arbitrary initial arrangement of blocks. You will be given an initial arrangement of blocks and a goal arrangement of blocks, and return a list of moves that will transform the initial state into the goal state. You will submit the code for solving the problem to the Mini-Project 2 assignment in Gradescope. You will also submit a report describing your agent to Canvas. Your grade will be based on a combination of your report (50%) and your agent’s performance (50%).
About the Project
In a Block World problem, you are given an original arrangement of blocks and a target arrangement of blocks, like this:
For us, blocks will be identified as single letters from A to Z.
Blocks may be moved one at a time. A block may not be moved if there is another block on top of it. Blocks may be placed either on the table or on top of another block. Your goal is to generate a list of moves that will turn the initial state into the goal state. In the example above, that could be: Move D to the table, move B to A, move C to D, move B to C, and move A to B.
There may be more than one sequence of moves that can accomplish the goal. If so, your goal is to generate the smallest number of moves that will turn the initial state into the goal state.
Your Agent
To write your agent, download the starter code below. Complete the solve() method, then upload it to Gradescope to test it against the autograder. Before the deadline, make sure to select your best performance in Gradescope as your submission to be graded.
Starter Code
Here is your starter code: BlockWorldAgent.zip (https://gatech.instructure.com/courses/498210/files/69861271/download) .
The starter code contains two files: BlockWorldAgent.py and main.py. You will write your agent in BlockWorldAgent.py. You may test your agent by running main.py. You will only submit BlockWorldAgent.py; you may modify main.py to test your agent with different inputs.
In BlockWorldAgent.py, your solve() method will have two parameters: the initial configuration of blocks, and the goal configuration of blocks. Configurations will be represented by lists of lists of characters, where each character represents a different block (e.g. “A” would be Block A). Within each list, each subsequent block is on top of the previous block in the list; the first block in the list is on the table. For example, this list would represent the configuration shown above: two stacks, one with D on B and B on C, and the other with just A:
[[“C”, “B”, “D”], [“A”]]
There may be up to 26 blocks in a puzzle and you may create as many stacks as there are blocks. You may assume that the goal configuration contains all the blocks and only the blocks present in the initial configuration.
Returning Your Solution
Your solve() method should return a list of moves that will convert the initial state into the goal state. Each move should be a 2-tuple. The first item in each 2-tuple should be what block is being moved, and the second item should be where it is being moved to—either the name of another block or “Table” if it is to be put into a new pile.
For example, imagine the following initial and target state:
Initial: [[“A”, “B”, “C”], [“D”, “E”]] Goal: [[“A”, “C”], [“D”, “E”, “B”]]
Put in simple terms, the goal here is to move Block B from the middle of the pile on the left and onto the top of the pile on the right.
Given that, this sequence of moves would be an acceptable solution:
(“C”, “Table”)
(“B”, “E”)
(“C”, “A”)
Submitting Your Solution
To submit your agent, go to the course in Canvas and click Gradescope on the left side. Then, select CS7637 if need be.
You will see an assignment named Mini-Project 2. Select this project, then drag your BlockWorldAgent.py file into the autograder. If you have multiple files, add them to a zip file and drag that zip file into the autograder.
When your submission is done running, you’ll see your results.
How You Will Be Graded
Your agent will be run against 20 pairs of initial and goal configurations. 8 of these will be the same every time your agent is tested; these are present in the original BlockWorldAgent.py file. The remaining 12 will be randomly generated, with up to 26 blocks each.
You can earn up to 40 points. You will earn 1 point for each of the 20 pairs of configurations you solve correctly (meaning that your solution does in fact transform the initial state into the goal state), and an additional point for each of the 20 configurations you solve optimally (in the minimum number of moves).
You may submit up to 40 times prior to the deadline. The large majority of students do not need nearly that many submissions, so do not feel like you should use all 40; this cap is in place primarily to prevent brute force methods for farming information about patterns in hidden test cases or submitting highly random agents hoping for a lucky submission. Note that Gradescope has no way for us to increase your individual number of submissions, so we cannot return submissions to you in the case of errors or other issues, but you should have more than enough submissions to handle errors if they arise.
You must select which of your submissions you want to count for a grade prior to the deadline. Note that by default, Gradescope marks your last submission as your submission to be graded. We cannot automatically select your best submission. Your agent score is worth 50% of your overall mini-project grade.
Your Report
In addition to submitting your agent to Gradescope, you should also write up a short report describing your agent’s design and performance. Your report may be up to 4 pages, and should answer the following questions:
How does your agent work? Does it use Generate & Test? Means-Ends Analysis? Some other approach?
How well does your agent perform? Does it struggle on any particular cases?
How efficient is your agent? How does its performance change as the number of blocks?
Does your agent do anything particularly clever to try to arrive at an answer more efficiently?
How does your agent compare to a human? Does your agent solve the problem the same way you would?
You are encouraged but not required to include visuals and diagrams in your four page report. The primary goal of the report is to share with your classmates your approach, and to let you see your classmates’ approaches. You may include code snippets if you think they are particularly novel, but please do not include the entirety of your code.
Tip: Remember, we want to see how you put the content of this class into action when designing your agent. You don’t need to use the principles and methods from the lectures precisely, but we want to see your knowledge of the content reflected in your terminology and your reflection.
Submission Instructions
Complete your assignment using JDF (https://drive.google.com/open?id=1xDYIomn9e9FxbIeFcsclSbXHTtHROD1j) , then save your submission as a PDF. Assignments should be submitted to the corresponding assignment submission page in Canvas
(https://gatech.instructure.com/courses/498210/assignments) . You should submit a single PDF for this assignment. If your assignment involves things (like videos, working software prototypes, etc.) that cannot be provided in PDF, you should provide them separately (through OneDrive, Google Drive, Dropbox, etc.) and submit a PDF that links to or otherwise describes how to access that material. Make sure that any content outside the PDF is, at a minimum, accessible to anyone with a Georgia Tech account; we recommend confirming in an incognito browser that any content outside the uploaded PDF is available prior to the deadline as no credit can be given for inaccessible content.
Participating in peer review is optional but highly encouraged, and is the primary expected way to earn points toward your class participation grade (https://gatech.instructure.com/courses/498210/assignments/2344398) . To participate in peer review, submit to the separate peer review assignment (https://gatech.instructure.com/courses/498210/assignments/2351442) in Canvas to share your assignment with peers and receive assignments to review in turn. Review the Primer on Peer Review page (https://gatech.instructure.com/courses/498210/pages/primer-on-peer-review) for more details.
Late work is not accepted without advanced agreement except in cases of medical or family emergencies. In the case of such an emergency, please contact the Dean of Students (https://studentlife.gatech.edu/request-assistance) .
This is an individual assignment. Even if you already plan to work on a team for the project, this assignment should still be completed individually.
Grading Information
Your report is worth 50% of your mini-project grade. As such, your report will be graded on a 40-point scale coinciding with a rubric designed to mirror the questions above. Make sure to answer those questions; if any of the questions are irrelevant to the design of your agent, explain why.
Mini-Project 2 Journal Rubric
| Criteria | Ratings | Pts | |||||
| JDF Format
Does your submission conform to the important parts of JDF formatting—that is, margin size, line spacing, font, and font size? (Deduction only) |
0 pts
Correctly Formatted Your essay conforms to the important portions of JDF formatting. |
0 pts
JDF Error [Deduction] Your submission violates JDF format in one or more substantive ways: font size, typeface, margins, or line spacing. See the comment for more details. As a result, you have been assigned a negative score on this rubric item to deduct from your assignment score. |
0 pts | ||||
| Agent Description
15 points: How does your agent work? Does it use Generate & Test? Means-Ends Analysis? Some other approach? |
15 pts
Full Credit You have adequately and thoroughly described your agent’s operations. |
10 pts
2/3rds Credit You have made an attempt to describe your agent’s operations, but your description is lacking a couple critical details, such as adequate detail on how it implements the method it uses. See the comment for more details. |
5 pts
1/3rd Credit You have made an attempt to describe your agent’s operations, but your description is lacking several significant details, such as what strategy it implements and the details of that strategy’s implementation. See the comment for more details. |
0 pts
No Credit Your journal makes little to no effort to describe how your agent operates. |
15 pts | ||
| Agent Performance
10 points: How well does your agent perform? Does it struggle on any particular cases? |
10 pts
Full Credit You have adequately described your agent’s performance, including how many problems it |
5 pts
1/2 Credit You have made an attempt to describe your agent’s performance, but you have left out significant details, such as how many test cases it gets |
0 pts
No Credit Your journal makes little to no attempt to describe the performance of your agent in terms of the number of |
10 pts | |||
| Criteria | Ratings | Pts | ||
| gets right and what kinds of problems (if any) it struggles on. | right or what it struggles on and why. See the comment for more details. | problems it solves and where it struggles. | ||
| Agent Efficiency
5 points: How efficient is your agent? How does its performance change as the number of blocks rises? (Note: Using Big O notation is recommended, but not required; it is just easier to know you’ve adequately answered the prompt if you include a Big O analysis.) |
5 pts
Full Credit You have described your agent’s efficiency, in terms of both how much time it takes at present and in terms of how the runtime changes as the number of blocks rises. |
2.5 pts
1/2 Credit You have made some attempt to describe the efficiency of your agent, but you have left out one or more important details, such as how the runtime changes as the number of blocks rises. See the comment for more details. |
0 pts
No Credit Your journal makes little to no attempt to describe the performance of your agent in terms of its runtime efficiency. |
5 pts |
| Human Comparison
10 points: How does your agent compare to a human? Does your agent solve the problem the same way you would? |
10 pts
Full Credit You have discussed in adequate detail how your agent compares to a human, including the similarities and differences between both its reasoning strategy and its likely performance. |
5 pts
1/2 Credit You have made some attempt to compare your agent to humans, but your analysis is lacking in one or more significant areas. It may be lacking adequate depth, a sufficient comparison in terms of both similarities and differences, or a sufficient comparison of both performance and strategy. |
0 pts
No Credit Your journal makes little to no attempt to describe how your agent’s strategy and performance compares to that of a human. |
10 pts |
| Total Points: 40 | ||||






