CS440/ECE448 Fall 2016Assignment 2: Constraint Satisfaction Problems and GamesDeadline: Monday, October 24, 11:59:59PMAs on Assignment 1, you have the option of working in groups of up to three people.You are free to either stay with the same team or pick a new one, but as before, all the group members must be enrolled in the same section for the same number of credits (except for online students, who can work with Section Q students enrolled for the same numer of credits). Contents
Part 1: CSP: Word SudokuCreated by Daniel Calzada based on dkmGames version of the game Sudoku is a puzzle that has gained much popularity since its first release in a US Newspaper in 2004. The object of the original Sudoku is to fill in a partially-completed 99 grid with numbers 1-9 such that each row, column, and the nine 33 sub-grids contain no duplicate numbers. In this assignment, you will implement a variation on Sudoku where, instead of filling the grid with numbers, you will fill the grid with words. You will be given a word bank, or a list of words that must be used exactly once (unless otherwise specified), and you must arrange them so that every cell in the grid contains a letter. Note that words will take up multiple cells in the grid and can be oriented either horizontally or vertically, and words are allowed to overlap. Following the rules of Sudoku, each row, column, and 33 cell cannot contain duplicate letters. To familiarize yourself with this game, we recommend playing it for yourself at http://dkmgames.com/WordSudoku.htm. The only difference between the online game and the game in this assignment is that in the online version, you are given the orientation of the words, but in this assignment, your code must be able to determine this for itself.
The word bank will contain one word per line ( example). The grid files will contain nine lines of nine characters each. If the character is an underscore _, assume that the letter that goes in that cell is unknown. Otherwise, assume that the character belongs in the corresponding grid cell ( example). Your task is to implement backtracking search (see lecture) to solove the puzzles below. First, you need to determine your formulation of the CSP and include it in your report. What are the variables, domains, and constraints in your formulation? With these in mind, implement any ordering heuristics that make sense for your formulation to make your search efficient. Briefly describe your implementation. For each of the inputs below, please include in your report:
Input 1 (for everybody): Start Grid with Hints Input 2 (for everybody): Empty Start Grid Input 3 (for four credits only): Decoy Words Part 2: Game of BreakthroughCreated by Shreya Rajpal based on this game The goal of this part of the assignment is to implement an agent to play a simple 2-player zero-sum game called Breakthrough. Rules of the game
For more information, check out Breakthroughs Wikipedia page. 2.1 Minimax and alpha-beta agents (for everybody)Your task is to implement agents to play the above game, one using minimax searchand one using alpha-beta search(see this lecture) as well as two heuristic functions one which is more offensive(i.e., more focused on moving forward and capturing enemy pieces), while the other which is more defensive(i.e., more focused on preventing the enemy from moving into your territory or capturing your pieces). Your program should use depth-limited search with an evaluation function which you, of course, need to design yourself and explain in the report. Try to determine the maximum depth to which it is feasible for you to do the search (for alpha-beta pruning, this depth should be larger than for minimax). The worst-case number of leaf nodes for a tree with a depth of three in this game is roughly 110,592, but in practice is usually between 25,000 35,000. Thus, you should at least be able to do minimax search to a depth of three.You are to run four games for each of the following match-ups:
The first game should have the offensiveagent going first, the second game should have the defensiveagent going first, the third should be offensive vs. offensive, and the fourth should be defensive vs. defensive. For each matchup, report the following:
Finally, you should summarize any general trends or conclusions that you have observed. How do search depth and type of evaluation function (offensive vs. defensive) affect the outcome? For players of equal strength (i.e., equal depth of search), what can give an advantage (going first, offensive vs. defensive evaluation function)? Tips
2.2 Extended rules (for four-credit students)Modify your implementation and evaluation functions to support the rule changes below and run several matchups for alpha-beta agents only with the maximum depth you can manage. You can choose any combination of offensive or defensive agents. Report outcomes of 2-4 representative matchups (or averages over several matchups of the same type), and summarize any interesting trends and differences from part 2.1.
For bonus points
Report ChecklistYour report should briefly describe your implemented solution and fully answer the questions for every part of the assignment. Your description should focus on the most interesting aspects of your solution, i.e., any non-obvious implementation choices and parameter settings, and what you have found to be especially important for getting good performance. Feel free to include pseudocode or figures if they are needed to clarify your approach. Your report should be self-contained and it should (ideally) make it possible for us to understand your solution without having to run your source code. For full credit, your report should include the following. Part 1:
Part 2:
Extra credit:
Statement of individual contribution:
WARNING: You will not get credit for any solutions that you have obtained, but not included in your report! For example, if your code prints out path cost and number of nodes expanded on each input, but you do not put down the actual numbers in your report, or if you include pictures/files of your output solutions in the zip file but not in your PDF. The only exception is animated paths (videos or animated gifs). Submission InstructionsAs for Assignment 1, one designated person from the groupwill need to submit on Compass 2g by the deadline. Three-unit students must upload under Assignment 2 (three credits)and four-unit students must upload under Assignment 2 (four credits). Each submission must consist of the following two attachments:
Multiple attempts will be allowed but only your last submission before the deadline will be graded. We reserve the right to take off points for not following directions. Late policy:For every day that your assignment is late, your score gets multiplied by 0.75. The penalty gets saturated after four days, that is, you can still get up to about 32% of the original points by turning in the assignment at all. If you have a compelling reason for not being able to submit the assignment on time and would like to make a special arrangement, you must send me email at least a week before the due date(any genuine emergency situations will be handled on an individual basis). Be sure to also refer to course policies on academic integrity, etc. |
Programming
[SOLVED] C++-: CS440 ECE448 Constraint Satisfaction Problems and Games
$25
File Name: C++-:_CS440_ECE448_Constraint_Satisfaction_Problems_and_Games.zip
File Size: 574.62 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.