FJK Home CPE/CSC 480 Syllabus Schedule Lecture Notes Assignments Labs Project Teams
CPE/CSC 480 Artificial Intelligence Fall 2009
Name(s):
Status Final
Points: 10
Deadline: Tuesday, Nov. 3, end of lab

CPE/CSC 480-F09 Artificial Intelligence Lab Exercise 6

This lab exercise uses tool in the Computational Intelligence Lab at UBC in Vancouver ( http://www.cs.ubc.ca/labs/lci/CIspace or http://aispace.org/constraint/). Yyou can use the online version, or download the code, and run it locally on your machine as a Java application.

The topic of this exercise is local search, and we will use the n-queens problem to investigate some local search methods.

Constraint Satisfaction

Instructions

Invoke the Constraint Satisfaction applet, and load the sample "Five Queens Problem". Look at the graph displayed, and determine the relationship between the conventional representation of the queens problem on a chess board, and this one. Then use the tool to solve the problem. You can do this either in "Auto-Solve" mode, or manually: Select values for a variable, and then let the tool calculate compatible values for the other variables. This is done with the "Auto Arc Consistency" button. If you made a choice that does not have a possible solution, you can backtrack, and select different values. You can speed up the process by selecting "Very Fast" for the Arc-Consistency Speed in the CSP Options.

Once you're comfortable with the tool, try your luck on the eight queens problem. This will take longer, but it should be tolerable; I could generate 30 solutions in a few minutes.

Questions

Hill Climbing

Instructions

Invoke the Stochastic Local Search ("SLS for CSP") applet (hill.jar), and load the sample "Five Queens Problem". Under "Hill Options -> Algorithm Options", select the "Greedy Descent" method, initialize the graph, and press the "Autosolve" button. You can view additional information about the progress on the "Plot" and "Trace" panes. The "Batch" button will initiate multiple runs of the sample; it is initially set to 100 runs.

After experimenting with the regular greedy descent method, try out some of the modifications to see the effects they have. The most relevant for this type of problems is probably the "min-conflicts" heuristic.

Finally, try out the "Simulated Annealing" method. For this one, I recommend to observe the plot, and do some batch runs. You can also try to increase the number of steps.

Questions

Assignment Submission

This assignment should be submitted electronically via the assignment submission function on Blackboard under "Labs" by the deadline specified above.

Collaboration

This is a "pair" assignment, and you can either do it individually, or together with one other student. Each pair must figure out and formulate their own answers, and run their own experiments. It is fine with me to discuss general aspects of this lab with others (e.g. general aspects of the different search methods investigated ).

Questions about the Assignment

If you have questions or comments concerning the programming aspects of the lab, post them on the Blackboard Discussion Forum for the lab. The grader and I will check that forum on a regular basis, and try to answer your questions.

FJK Home CPE/CSC 480 Syllabus Schedule Lecture Notes Assignments Labs Project Teams
Lab-6.html
last modified:
Thursday, October, 29, 2009, 13:54:52 PDT
© 2000-2025
Franz Kurfess