Presentation is loading. Please wait.

Presentation is loading. Please wait.

Checkers Steven Prockup Spencer MacDonald. Project Overview A computer checkers playing program where the human interface is through a physical checkerboard.

Similar presentations


Presentation on theme: "Checkers Steven Prockup Spencer MacDonald. Project Overview A computer checkers playing program where the human interface is through a physical checkerboard."— Presentation transcript:

1 Checkers Steven Prockup Spencer MacDonald

2 Project Overview A computer checkers playing program where the human interface is through a physical checkerboard. Objectives of the Project: Human interaction is primarily through moving checkers Displaying the computer moves on the physical checkerboard Detecting game rule violations A scaleable computer intelligence Determining game state from the physical checkerboard and previous game states

3 Project Operating Range The checkerboard must be lit by normal room lighting, with no heavy shadows cast over it. The checkers cannot let light through. People will not swap checkers of different colors or king incorrectly.

4 Sensors 32 photocell sensors are placed in the center of the dark squares. These will detect the presence of a checker in that square. The photocell was chosen to make the detection of checkers simple. StateResistanceV out Dark1Meg4.16V Light15k0.35V Photocell Circuitry

5 Initialization Start Checkers on the PC Select difficulty and color Place pieces on the checkerboard and hit ‘Start Game’ Crash Recovery When in an error state the ‘Error’ LED will be on The location of the violating square is shown by blinking LEDs Place checkers in appropriate location as displayed by the computer Push ‘Resume from Error’ button

6 Checkerboard Interface

7 Program Interface

8 COMM Protocol PC -> µP LED Data Message 0x80 Signals the start of the transmission. The next 8 bytes (on blink) represent the LEDs that will be on or blinking. The following 8 bytes (off blink) represent the LEDs that are on and not blinking. Photocell/Button Data Request 0xC0 Requests the photocell/button state be sent to the PC. The microcontroller will respond with a Photocell Data Message within 30 seconds, failure to send the message will result in a communications error. µP -> PC Photocell Data Message 0xE0 Signals the start of the transmission. The next 8 bytes represent the state of the photocells/buttons. The computer will reply with F0, if F0 is not received the ‘Comm Error’ LED will be on.

9 Artificial Intelligence Depending on difficulty the AI will look into a number of future moves. Each move is assigned a score which will be used to select the next move. The score will be based on the number of kings and location of checkers.

10 Turn Completion The photocell data only indicates if there is a checker or not. The photocell data is used to update the checkerboard stored in the computer’s memory. The conversion is done in the following way (Assuming the current player is dark): A square that has a dark checker in the computer’s board and is empty in the photocell data is the moving checker. If there is more then one moving checker an error has occurred. A square that is empty in the computer’s board and is occupied in the photocell data is the final location of the moving checker. If there is more then one location then an error has occurred. Any square that is occupied by a light checker in the computer’s board and empty in the photocell data is assumed to be jumped. If there is a moving checker the computer verifies that it could jump all jumped checkers and land in the final location. If verification fails then an error has occurred. If no moving checker is found and there are jumped checkers then the above verification is done on every dark checker using its current location as both the start and end point. If all checkers fail verification it is an error. When the board has changed and there are no errors dark’s turn is over.

11 Feasibility / Problems Photocells detection of a checker is almost guaranteed because the checker increases the resistance by two orders in magnitude. There are no anticipated problem areas.

12 Testing Procedure The microcontroller functionality will be tested by verifying proper detection of checkers through the photocells and by verifying the correct LEDs are lit with a given input. The software will be tested for proper turn completion, artificial intelligence by using a simulated checkerboard to represent the photocells. Overall system will be tested by playing a game of checkers, in which the following moves will be performed: Jump, Jump with King Move, Move with King Incorrect Move

13 Integration The checkerboard and software be integrated using the communications protocol over an R232 connection.

14 Questions ?


Download ppt "Checkers Steven Prockup Spencer MacDonald. Project Overview A computer checkers playing program where the human interface is through a physical checkerboard."

Similar presentations


Ads by Google