CS Software Studio Assignment 1

Slides:



Advertisements
Similar presentations
COSC2007 Data Structures II
Advertisements

Examples for Discrete Constraint Programming
Polynomial Time Algorithms for the N-Queen Problem Rok sosic and Jun Gu.
4.1 Introduction to Matrices
8 Queens. Problem: Placing 8 queens on a chessboard such that they don’t attack each other Three different Prolog programs are suggessted as solutions.
PROLOG 8 QUEENS PROBLEM.
An Introduction to Channel Routing
G53CLP Constraint Logic Programming Modeling CSPs – Case Study I Dr Rong Qu.
Algebra 2 Section 4-4 Matrices and Determinants. What You’ll Learn Why It’s Important To evaluate the determinant of a 3 x 3 matrix, To find the area.
B ACKTRACK SEARCH ALGORITHM. B ACKTRACKING Suppose you have to make a series of decisions, among various choices, where You don’t have enough information.
Eight queens puzzle. The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard such that none of them are able to capture.
Backtracking COP Backtracking  Backtracking is a technique used to solve problems with a large search space, by systematically trying and eliminating.
Backtracking What is backtracking?
Search Problems Russell and Norvig: Chapter 3, Sections 3.1 – 3.3 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2003/home.htm by Prof. Jean-Claude.
Graphics Output Primitives Pixel Addressing and Fill Area Dr. M. Al-Mulhem Feb. 1, 2008.
Lesson 2: Reflecting Shapes. When Doing Reflections… You use a line of reflection No matter where the shape is in relation to the line of reflection,
CS 101 Problem Solving and Structured Programming in C Sami Rollins Spring 2003.
Graph an equation in standard form
SOLVING SUDOKU WITH MATLAB VERIFICATION FUNCTION correctness verification of the puzzle: checks if the current element appears twice in the same line,
Functions. A function is a relation that has exactly one output for each input.
Data Structures Using C++ 2E Chapter 6 Recursion.
Lecture 17: Spanning Trees Minimum Spanning Trees.
Groups of the Periodic Table
Data Structures Using C++ 2E Chapter 6 Recursion.
Back Tracking Project Due August 11, 1999 N-queens: –A classic puzzle for chess buffs is the N- Queens problem. Simply stated: is it possible to place.
Bellwork April 29 th – May 3 rd. Bellwork 4/29/13 Put eight x's into this 8-by-8 grid so that no two x's are in line with each other vertically, horizontally,
Two Dimensional Arrays
CS1020 Lab 1 Discussion.
Mental Starter: to solve mathematical problems or puzzles How many sticks have I used to make these two squares? How many sticks will I need to make 4.
1 N -Queens via Relaxation Labeling Ilana Koreh ( ) Luba Rashkovsky ( )
Data Structures Using C++ 2E1 Recursion and Backtracking: DFS Depth first search (a way to traverse a tree or graph) Backtracking can be regarded as a.
Sudoku Jordi Cortadella Department of Computer Science.
Please snarf the code for today’s class. Then think about the famous 8-Queen’s Puzzle. The question is: is there a way to arrange 8 queens on a (8x8) chessboard.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Ver Chapter 5: Recursion as a Problem-Solving Technique Data Abstraction.
Two Dimensional Arrays. Two-dimensional Arrays Declaration: int matrix[4][11]; 4 x 11 rows columns
Chapter 2 Graphing and Writing Linear Equations. 2.1 Graphing Linear Equations.
3D Puzzle Assignment #1 Programming Language, Spring 2003.
The 8-queens problem CS 5010 Program Design Paradigms “Bootcamp” Lesson TexPoint fonts used in EMF. Read the TexPoint manual before you delete this.
Analysis Introduction Data files, SPSS, and Survey Statistics.
Data Structures Using Java1 Chapter 5 Recursion. Data Structures Using Java2 Chapter Objectives Learn about recursive definitions Explore the base case.
Grid References.
Introduction to State Space Search
Groups of the Periodic Table. CONCLUSION…front of 13 1.Why is “shape” not a good test for determining if an element is a metal or a nonmetal? 2.You have.
© 2006 Pearson Addison-Wesley. All rights reserved 6-1 Chapter 6 Recursion as a Problem- Solving Technique.
N- Queens Solution with Genetic Algorithm By Mohammad A. Ismael.
N-queens problem Original problem: How to place 8 queens on an 8x8 chessboard so that no two queens attack each other N-queen problem: Generalization for.
February 11, 2016Introduction to Artificial Intelligence Lecture 6: Search in State Spaces II 1 State-Space Graphs There are various methods for searching.
Software. Introduction n A computer can’t do anything without a program of instructions. n A program is a set of instructions a computer carries out.
4-5 Inequalities (pages ) P6  Represent inequalities on a number line or a coordinate plane.
Graphing Linear Equations
CSSE 230 Day 25 Skip Lists.
Click the mouse button or press the Space Bar to display the answers.
Introduction to Matrices
N+k Queens Reflections
Standard Form.
Sit-In Lab 1 Ob-CHESS-ion
Constraint Satisfaction Problem
Data Structures Using Java
Introduction to Matrices
Objective: Today we will investigate the ‘magic’ in magic squares.
Magic Squares   10   X.
Sudoku.
© T Madas.
The N-Queens Problem Search The N-Queens Problem Most slides from Milos Hauskrecht.
7.4 Slope Objectives: To count slope To use slope formula.
What is a spreadsheet? A program that can carry out calculations
Matrices and Determinants
3-in-a-row Die 1 Die 2 (4 , 3).
Warm up 19 1.) Graph using 3 points x +3y =6
3-in-a-row Die 1 Die 2 (4 , 3).
Presentation transcript:

CS241001 Software Studio Assignment 1 2010.10.21 Deadline: 2010.11.11

Eight Queen Puzzle Queen : move any number of squares vertically, horizontally or diagonally Place Eight Queens on an empty chessboard(8x8) so that no queen can attack any other No two queens share the same row, column, or diagonal This problem can extend to N Queens on an NxN chessboard (N >= 4 )

Requirement Solve the problem of N Queens on an NxN chessboard. Find two different solutions, discuss the performance and implement the better one you think. Implementation Input: N A coordinate of one Queen on the chessboard Output: The solution of Eight Queen Puzzle with one Queen place on the input coordinate Draw your chessboard on screen( Q: Queen, *: empty) Report: At most three pages word file Describe the two solutions and discuss them Brief describe your implementation(DO NOT COPY PASTE YOUR SOURCE CODE) Main classes and methods introduction Algorithm * Q

Reference http://en.wikipedia.org/wiki/Eight_queens_puzzle