The goal of this homework assignment is to implement local search for a constraint satisfaction problem: namely the 8-queens problem.
For this assignment, record your responses to the following activities in the
README.md file in the
homework03 folder of your assignments GitLab
repository and push your work by 11:59 PM Friday, September 28.
To create a
homework03 branch in your local repository, follow the
$ cd path/to/cse-40171-fa18-assignments # Go to assignments repository $ git remote add upstream https://gitlab.com/wscheirer/cse-40171-fa18-assignments # Switch back over to the main class repository $ git fetch upstream # Toggle the upstream branch $ git pull upstream master # Pull the files for homework03 $ git checkout -b homework03 # Create homework03 branch and check it out $ cd homework03 # Go into homework03 folder
According to Sec. 3.2 of Russell and Norvig, "The goal of the 8-queens problem is to place eight queens on a chessboard such that no queens attacks any other". Recall from the proper game of chess that a queen attacks any piece in the same row, column, or diagonal. The figure below shows one of the possible solutions for this problem.
$ python eightqueens.py
If you have any questions, comments, or concerns regarding the course, please
provide your feedback at the end of your
To submit your assignment, please commit your work to the
homework03 branch in your assignment's GitLab repository:
$ cd path/to/cse-40171-fa18-assignments # Go to assignments repository $ git checkout master # Make sure we are in master branch $ git pull --rebase # Make sure we are up-to-date with GitLab $ git checkout -b homework03 # Create homework03 branch and check it out $ cd homework03 # Go to homework03 directory ... $ $EDITOR README.md # Edit appropriate README.md $ git add README.md # Mark changes for commit $ git commit -m "homework03: complete" # Record changes ... $ git push -u origin homework03 # Push branch to GitLab
Procedure for submitting your work: create a merge request by the process that is described here, but make sure to change the target branch from wscheirer/cse-40171-fa18-assignments to your personal fork's master branch so that your code is not visible to other students. Additionally, assign this merge request to your TA and add wscheirer, agraese, and AndroidKitKat as approvers (so all class staff can track your submission). Your assigned TA is agraese if you have a last name starting with A through Ki, or AndroidKitKat if you have a last name starting with Kl through W.