Among the many applications of the constraint satisfaction problem (CSP) paradigm, one of the first was to perform a process called line-labeling to attempt to use a 2-dimensional image of a “blocks-world” environment to infer its 3-dimensional structure so that a robot can reconfigure the blocks to achieve a goal. In this task, you will utilize code that we provide to you, and extend it with code that you write, to develop a deeper understanding of the CSP paradigm and its application to line labeling.
As an introduction to the line-labeling problem, see the separate document provided that summarizes it.
Part of the line labeling code has been written for you (Python 2.7). Parts a to i will provide more instruction on finishing the code.
Many of the utility functions written in diagram.py will be helpful. The class Vertex is used extensively in diagram.py and is defined in vertex.py.
You will use main.py to run the code. Example commands: python main.py examples/cube.txt propagation -p ac_3 # only run AC3 on cube.txt
python main.py examples/cube.txt backtracking -p ac_3 -o mrv # find all solutions of AC3 and MRV
python main.py examples/cube.txt backtracking -s -p ac_3 -o mrv # find ONE solution using backtracking with AC3 and MRV
python main.py examples/cube.txt backtracking -p forward_checking -o first_unassigned # find ONE solution using backtracking with forward checking and the first unassigned heuristic
Run python main.py -h for detailed usage instructions.
row#
#solns
propagation
ordering
# assignments TOWER
# assignments POIUYT
1
all
No-prop
First-unassigned
2
all
Forward-checking
First-unassigned
3
all
Arc-consistency
First-unassigned
4
all
No-prop
MRV
5
all
Forward-checking
MRV
6
all
Arc-consistency
MRV
7
one
No-prop
First-unassigned
8
one
Forward-checking
First-unassigned
9
one
Arc-consistency
First-unassigned
10
one
No-prop
MRV
11
one
Forward-checking
MRV
12
one
Arc-consistency
MRV
13
all
Arc-consistency**
MRV
h. Finally, create a version where you modify the search_solutions method to apply arc-consistency (ac_3) to every vertex before any search is done. Fill in row 13 of the table, and briefly explain any difference(s) with row 6.
*STARTER CODE ATTACHED*
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more