


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A programming assignment for a computer science course where students are required to write a program to solve sudoku puzzles of various sizes. The assignment covers different file formats, logic for reading and processing puzzles, and various heuristics for selecting the next variable and value to try. Students are encouraged to test their programs on different puzzles and evaluate the performance of different heuristics.
Typology: Assignments
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Date assigned: April 24, 2007 Date due: 11:59:59 May 3, 2007 In this programming assignment, you will be asked to solve Sudoku puzzles of various sizes. Traditionally Sudoku puzzles are 9×9 grids filled with numbers between 1 and 9 such that:
...|..5|.4.
While here’s another sample from the web using a different format: Puzzle: X-wing +-------+-------+-------+ | 3 4 5 | 1 9 2 | 7 6 8 | | 9 2 8 | 4 7 6 |. 3 1 | | 6 7 1 | 5 3 8 | 2 4 9 | +-------+-------+-------+ | 2 1 3 | 9 6 4 | 8. 7 | | 5 8 9 | 3 2 7 | 6 1 4 | | 7 6 4 | 8 1. | 9 2 3 | +-------+-------+-------+ | 4 9 2 | 7 5 1 | 3 8 6 | | 1 3 6 | 2 8 9 | 4 7 5 | | 8 5 7 | 6 4 3 | 1 9 2 | +-------+-------+-------+ Logistics: You can work alone or in groups of at most 3. Code must be submitted (with comments) by the due date. Use of Java for this assignment is strongly encouraged – if you'd rather use something else, please discuss it with the TA (if you would like to practice Matlab (you won’t need it this quarter), this is an assignment where it should work fine). A copy of your write up as a pdf should be included. Turn in the code using the turnin script. Hard copies of write-ups are due at the beginning of class the following class, printed and stapled. Code should be included in the printout. Write-ups should include a brief description of the approach taken, answers to any questions posed, and sample output on some examples. See below for more details on the content of the write up. Half of the points are based on the quality of the write-up and the comments. The other half are based on the performance of your code, both as reported in your write up and on a test set of problems. Bonus points may be awarded at the TA's discretion for going above and beyond the HW's description. Points will be deducted for not following these instructions. Note that no late programming assignments will be accepted! Project specifics
Google for pointers) that capture some of these higher order dependencies and can trim your search immensely. There will likely be some trade off, as better pruning will improve # of nodes visited but time-intensive pruning will eventually start increasing runtimes. Write up: Please describe the approach taken and how your program should be executed. What kind of testing did you do, and how did your methods fare? Often, Sudoku puzzles are rated by difficulty, so this is a variable you may want to measure over. Also, perform some analysis on the efficacy of the different approaches with different puzzles. Your write up should include at least one graph. Testing: Your programs will be run on several puzzles for each of the flags described above. Test set files will be in the first of the .ss formats described above (but we encourage you to accept the more general formats). Your own reported testing should be thorough enough that there are no surprises here. We’ll be including pointers to some .ss repositories on the discussion board. Lots of websites have downloadable .ss files, and some will even spawn novel puzzles for you on the fly. Programs will also be run using the –best flag and the scores here will be compared by a) # of nodes visited b) the total execution time. The best program(s) on each metric will receive 10 pts, the worst 1, and the remainder spread uniformly between. Hints: -Start testing on small, trivial problems. -You may want to introduce additional command line arguments for your testing. Be sure to document this.