asg2 - CSE 3402 3.0 Intro. to Concepts of AI Dept. of...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSE 3402 3.0 Intro. to Concepts of AI Dept. of Computer Science & Engineering Winter 2012 York University Assignment 2 Total marks: 100. Out: February 10 Due: March 5 at 14:30 Note 1: To hand in your report for this assignment, submit it electronically and submit a printout either in the 3402 drop box in CSEB or by bringing it to class by the deadline. To submit electronically, use the following Prism lab command: submit 3402 a2 files or directory Your Prolog code should work correctly on Prism. Note 2: Your report for this assignment should be the result of your own individual work. Take care to avoid plagiarism (copying). You may discuss the problems with other students, but do not take written notes during these discussions, and do not share your written solutions. In this assignment, you are supplied with some starter code and have to design a program that plays a slightly modified version of Othello against a human user. 1 Modified Othello Othello is a boardgame that is played with black and white stones placed on a chessboard. The players (black and white) take turns placing stones on the board. Occasionally, one of the players might have nowhere to place their colored stone. In this case their only valid move is to play a pass where they do not place any stones. The next player then takes their turn. A state where neither player can place a stone is a terminal state. In the original Othello, the winner of a terminal state is the player who has more stones on the board. However, in the modified version that you will implement, the winner of a terminal state is the player who has less stones on the board . A tie is declared in a terminal state if the number of white and black stones are equal. The game begins with four stones placed in a square in the middle of the grid, two white stones and two black stones (Figure 1). Player 1 (black) makes the first move. To understand rules of the game, it is useful to think of the 8 directions, N (north), NE (north-east), E (east), SE (south-east), S (south), SW (south-west), W (west) and NW (north-west). Viewing the top of the board as being North, these directions specify 8 lines moving away from any position on the board. At each players turn, the player may place a stone (of her color) on any square s of the board such that: 1 Figure 1: Initial State Figure 2: Possible moves of player 1 (black) Along at least one of the 8 direction from the square s we have a sequence of one or more opponent stones followed by the players stone (with no empty squares in between). Note that we can start looking for legal places to put our stone by considering only those squares that are adjacent (in one of the directions) to an opponents stone....
View Full Document

This note was uploaded on 02/13/2012 for the course CSE 3402 taught by Professor Yves during the Winter '12 term at York University.

Page1 / 8

asg2 - CSE 3402 3.0 Intro. to Concepts of AI Dept. of...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online