Specification Due Date: Friday April 7 at 6am Top-down Program Outline Due Date: Wednesday April 19 at 6am Program Due Date: Monday May 15 at 6am

Size: px
Start display at page:

Download "Specification Due Date: Friday April 7 at 6am Top-down Program Outline Due Date: Wednesday April 19 at 6am Program Due Date: Monday May 15 at 6am"

Transcription

1 Kerry Ojakian s CSI 31 Class Specification Due Date: Friday April 7 at 6am Top-down Program Outline Due Date: Wednesday April 19 at 6am Program Due Date: Monday May 15 at 6am HW: Final Project Do ONE of the projects listed below (if you want to do something else, you must check with me now!). As usual for all homework: Work on your own, without help from others, whether a person, someone online, or by copying code from some source. For all projects, the first part consists of typing up a detailed and clear specification. The projects are somewhat open-ended and not fully specified; in your specification, you should make everything completely precise. For all projects, the second part consists of writing up a Top-Down outline of the program. As we did with the raquet ball simulation, this should be a functioning piece of code broken down into all (or almost all) the functions that you plan on using. It should be organized in a top-down fashion with the functions at the top-levels fully written, and the functions at the bottom levels completely unwritten. Your main function must be complete, though other parts do not need to be. For each function, its interface (inputs and outputs) should be complete. For each function you should have comments precisely describing it. Project Descriptions 1. Multiple-Pile Nim Nim is a 2-player game. There are some number of piles (say p piles) each with some number of objects (say each pile has n objects). Play alternates between the players. On a turn, a player may remove any number of objects (at least one) from any one of the piles. The player to remove the last objects wins. Design Nim for the computer (if you want to do this using graphics, you must first do a text interface version and submit it to me, receive the okay from me, and then work on one that uses graphics). First the program should prompt the user for the p and the n (you can require that p is at most 5 and n is at most 20, especially for a graphical version). Then it should prompt the user for the option of a two player game or a one player game (in the one player case, the other player is the computer). Then play commences. The program should be fool-proof and easy to use, for example: If a player wants to remove no objects, the program should object (i.e. it should be fool-proof!). 1

2 After each move inform the user whose turn it is and what the state of the piles are (i.e. it should be easy-to-use!). Final Feature: Once the above is working, add ONE of the following features: (a) When played against the computer design it so that the user is prompted for difficulty levels (the hardest should be one which always wins when it can; there is a known best strategy in Nim and this will require understanding that strategy). (b) Add a feature that allows the computer to play itself. Then design various strategies (at least 3). Then pit the various strategies against one another in hundreds to thousands of games to see how the strategies compare. You must describe the different strategies and describe the outcome of your experiments. 2. Dominoes Implement a simplified version of dominoes in which there are two players and the dominoes all go in one line, so there is always a left side and a right side. The program follows these rules of dominoes: Distribute 7 dominoes to each player. There are 28 dominoes (each side of a dominoe goes from 0 to 6). The rest of the dominoes are in the boneyard. Determine some way for deciding who starts. Then play alternates. On a turn, a player can play a dominoe that has a side matching one of the ends. If a player does not have a legal play, she must draw from the boneyard till she has a legal play. As soon as the player can play, she must play. A player scores if the total of the two ends adds up to a multiple of 5 The game ends when a player runs out of dominoes or both players cannot play. If the game ends because one player runs out of dominoes, then that player gets the other player s remaining dominoes as her points (rounded to the nearest 5). If the game ends because both players cannot play, then each gets the other player s dominoes as their points (rounding to the nearest 5). Whoever has the most points wins. Your program should give the user the option of playing two player or against the computer. The computer does not have to be a good player, but make the computer as good as possible. Your program should be text based but nicely display all the dominoes already played in the current game. If you want to do this using graphics, you must first do a text interface version and submit it to me, receive the okay from me, and then work on one that uses graphics. But I do not recommend even trying to do this one graphically. Your program should be fool-proof and easy to use, for example: 2

3 (a) It should not allow the player to take from the boneyard if the player can play (i.e. it should be fool-proof). (b) It should let the player know how many dominoes are left in the boneyard (i.e. it should be easy to use). 3. Othello Implement a simplified version of the game of Othello. The (simplified) rules are as follows. The board is a 4 by 4 grid (so it has 16 squares). There are two players: Black and White. Players alternate placing a piece of their color onto an unoccupied square. Suppose it is White s turn: If the piece White places causes White to have a piece of her color on either end of a row or column of Black pieces, then the Black pieces are all turned White. The same rules apply to Black on her turn. The game is over when the last piece is placed, and the winner is the player with more pieces on the board; a draw is possible. Your program should have the following properties: (a) All interaction should be through the graphical interface. (b) It should allow two players to play against one another. (c) At the beginning, the empty board should be displayed. Players alternately click on the square where they want their piece and it should appear. (d) The program should indicate when the game is over and who won. Then it should offer the chance to play a new game. (e) The program should be fool-proof and easy to use, for example: If a player clicks on an occupied space, the program should inform the user (politely?) of her mistake and wait for a legal move (i.e. it should be foolproof!). At each move inform the user whose turn it is (i.e. it should be easy-to-use!) (f) Final feature: Once the above is all working, create an option for playing against the computer. While the computer does not need to play well, try to make the computer play as well as possible. 3

4 4. Crytopgraphy Write an encoder and decoder (as we did in class) but instead of the key being a shift, it should be a rearrangement of the 26 letters of the alphabet indicating how to do the substitution in the encoding. The encoder and decoder should take a file as input and create a file as output. For example if the key starts out: then ACE would be encoded as BYA. BSY JA... Also write a code cracker: It takes a coded file (and no key) and tries to decode the file using frequency analysis. To decode, it should take the file and an ordered list of the frequency of letters in English (call this the frequency list), starting with most frequent letter. The program should use the frequency list to try to crack the code by matching the frequency of letters in the coded file with the frequency list. For example, suppose the frequency list is as follows (middle missing): EIS... XZ Then the most frequent letter in the coded file would be replaced by E, the second most frequent by I, and so on. To emphasize: The frequency list is one of the inputs to the function; you do not need to find it. Once you have written the encoder, decoder, and code cracker, run experiments to see how good your code cracker is. Do this by: Taking longer texts, encoding them, and then running the code cracker on them; try different frequency lists and look up established frequency lists. The program should be fool-proof and easy to use, for example: If the key is too short or repeats letters, the program should ask for a new key (i.e. it should be fool-proof!). In using the program, it should clearly direct the user on what to input at each step (i.e. it should be easy-to-use!). Final Feature: Write another piece of code to determine a frequency list experimentally; call it the frequency finder. The frequency finder should read in a file and then output a frequency list of the 26 letters of the alphabet. Run the frequency finder on many files to come up with a frequency list, then use this frequency list on coded files to see how it works. 4

5 5. Simulation: Left, Right, Center This project is a mini-mini-research project. If you cannot deal with an open-ended project, choose something else! Consider the game of Left-Right-Center. For the rules, see your kit. Consider the game generalized to allow the players to start with a various amounts of starting chips (not just 3). Write a simulation that you use to answer the following questions as well as you can. (a) How long does the game last as a function of number of players and number of starting chips? (b) Consider the last question, but ask about how long the game lasts till one person gets to 0, or till two people get to 0, and so on? How about till half the people get to 0, and so on? (c) How is the game effected by starting the various players with an unequal number of starting chips? Test out various scenarios that seem interesting. (d) How are your answers to the last questions effected by changing the rules in various ways: i. Allow more dice. ii. Change the dice in various ways (example: make them 8-sided with 3 L s 4 R s and 1 C; etc) (e) Use the simulation to investigate other questions that occur to you (for example: if players were allowed to have a negative number of chips, how would you change the rules and how would the simultation answer the above questions differently?) 5

Game 0: One Pile, Last Chip Loses

Game 0: One Pile, Last Chip Loses Take Away Games II: Nim April 24, 2016 The Rules of Nim The game of Nim is a two player game. There are piles of chips which the players take turns taking chips from. During a single turn, a player can

More information

Grade 7/8 Math Circles Game Theory October 27/28, 2015

Grade 7/8 Math Circles Game Theory October 27/28, 2015 Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grade 7/8 Math Circles Game Theory October 27/28, 2015 Chomp Chomp is a simple 2-player game. There is

More information

Example: I predict odd, roll a 5, and then collect that many counters. Play until time is up. The player with the most counters wins.

Example: I predict odd, roll a 5, and then collect that many counters. Play until time is up. The player with the most counters wins. Odds and Evens Skill: Identifying even and odd numbers Materials: 1 die to share 1. Each player takes 5 counters and puts the rest in a pile between them. 2. Player 1 predicts whether he will roll ODD

More information

Grade 6 Math Circles Combinatorial Games - Solutions November 3/4, 2015

Grade 6 Math Circles Combinatorial Games - Solutions November 3/4, 2015 Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grade 6 Math Circles Combinatorial Games - Solutions November 3/4, 2015 Chomp Chomp is a simple 2-player

More information

Senior Math Circles February 10, 2010 Game Theory II

Senior Math Circles February 10, 2010 Game Theory II 1 University of Waterloo Faculty of Mathematics Centre for Education in Mathematics and Computing Senior Math Circles February 10, 2010 Game Theory II Take-Away Games Last Wednesday, you looked at take-away

More information

Overview. Equipment. Setup. A Single Turn. Drawing a Domino

Overview. Equipment. Setup. A Single Turn. Drawing a Domino Overview Euronimoes is a Euro-style game of dominoes for 2-4 players. Players attempt to play their dominoes in their own personal area in such a way as to minimize their point count at the end of the

More information

Grade 6 Math Circles Combinatorial Games November 3/4, 2015

Grade 6 Math Circles Combinatorial Games November 3/4, 2015 Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grade 6 Math Circles Combinatorial Games November 3/4, 2015 Chomp Chomp is a simple 2-player game. There

More information

COUNT ON US SECONDARY CHALLENGE STUDENT WORKBOOK GET ENGAGED IN MATHS!

COUNT ON US SECONDARY CHALLENGE STUDENT WORKBOOK GET ENGAGED IN MATHS! 330 COUNT ON US SECONDARY CHALLENGE STUDENT WORKBOOK GET ENGAGED IN MATHS! INTRODUCTION The Count on Us Secondary Challenge is a maths tournament involving over 4000 young people from across London, delivered

More information

Welcome to Family Dominoes!

Welcome to Family Dominoes! Welcome to Family Dominoes!!Family Dominoes from Play Someone gets the whole family playing everybody s favorite game! We designed it especially for the ipad to be fun, realistic, and easy to play. It

More information

Game Playing in Prolog

Game Playing in Prolog 1 Introduction CIS335: Logic Programming, Assignment 5 (Assessed) Game Playing in Prolog Geraint A. Wiggins November 11, 2004 This assignment is the last formally assessed course work exercise for students

More information

Classic Dominoes. Number of Players: 2-4

Classic Dominoes. Number of Players: 2-4 Classic Dominoes Number of Players: 2-4 First, all dominoes must be turned face down and mixed. Each player then draws five dominoes and stands them up on end in front of them so the backs of the dominoes

More information

Figure 1: The Game of Fifteen

Figure 1: The Game of Fifteen 1 FIFTEEN One player has five pennies, the other five dimes. Players alternately cover a number from 1 to 9. You win by covering three numbers somewhere whose sum is 15 (see Figure 1). 1 2 3 4 5 7 8 9

More information

Stat 155: solutions to midterm exam

Stat 155: solutions to midterm exam Stat 155: solutions to midterm exam Michael Lugo October 21, 2010 1. We have a board consisting of infinitely many squares labeled 0, 1, 2, 3,... from left to right. Finitely many counters are placed on

More information

COUNT ON US SECONDARY CHALLENGE STUDENT WORKBOOK

COUNT ON US SECONDARY CHALLENGE STUDENT WORKBOOK 330 COUNT ON US SECONDARY CHALLENGE STUDENT WORKBOOK INTRODUCTION The Count on Us Secondary Challenge is a maths tournament involving over 4000 young people from across London, delivered by the Mayor s

More information

OCTAGON 5 IN 1 GAME SET

OCTAGON 5 IN 1 GAME SET OCTAGON 5 IN 1 GAME SET CHESS, CHECKERS, BACKGAMMON, DOMINOES AND POKER DICE Replacement Parts Order direct at or call our Customer Service department at (800) 225-7593 8 am to 4:30 pm Central Standard

More information

select the 4 times tables and then all the number tiles used would be 4 x something

select the 4 times tables and then all the number tiles used would be 4 x something Notes for the User: This resource contains the instructions for 6 multiplication games as well as the resources to make the games. These games are appropriate for students in Grade 3 and up who are working

More information

Jim and Nim. Japheth Wood New York Math Circle. August 6, 2011

Jim and Nim. Japheth Wood New York Math Circle. August 6, 2011 Jim and Nim Japheth Wood New York Math Circle August 6, 2011 Outline 1. Games Outline 1. Games 2. Nim Outline 1. Games 2. Nim 3. Strategies Outline 1. Games 2. Nim 3. Strategies 4. Jim Outline 1. Games

More information

Round Away. ten. Number created: 5,678 Round to the nearest ten

Round Away. ten. Number created: 5,678 Round to the nearest ten Round Away Objective - Create numbers that will round to your side of the game board. Materials - Game board Rounding Die Deck of digit cards, 0-sided dice, or decimal dice Progression of Games - Round

More information

PLAYERS AGES MINS.

PLAYERS AGES MINS. 2-4 8+ 20-30 PLAYERS AGES MINS. COMPONENTS: (123 cards in total) 50 Victory Cards--Every combination of 5 colors and 5 shapes, repeated twice (Rainbow Backs) 20 Border Cards (Silver/Grey Backs) 2 48 Hand

More information

GAMES AND STRATEGY BEGINNERS 12/03/2017

GAMES AND STRATEGY BEGINNERS 12/03/2017 GAMES AND STRATEGY BEGINNERS 12/03/2017 1. TAKE AWAY GAMES Below you will find 5 different Take Away Games, each of which you may have played last year. Play each game with your partner. Find the winning

More information

a b c d e f g h 1 a b c d e f g h C A B B A C C X X C C X X C C A B B A C Diagram 1-2 Square names

a b c d e f g h 1 a b c d e f g h C A B B A C C X X C C X X C C A B B A C Diagram 1-2 Square names Chapter Rules and notation Diagram - shows the standard notation for Othello. The columns are labeled a through h from left to right, and the rows are labeled through from top to bottom. In this book,

More information

CSE548, AMS542: Analysis of Algorithms, Fall 2016 Date: Sep 25. Homework #1. ( Due: Oct 10 ) Figure 1: The laser game.

CSE548, AMS542: Analysis of Algorithms, Fall 2016 Date: Sep 25. Homework #1. ( Due: Oct 10 ) Figure 1: The laser game. CSE548, AMS542: Analysis of Algorithms, Fall 2016 Date: Sep 25 Homework #1 ( Due: Oct 10 ) Figure 1: The laser game. Task 1. [ 60 Points ] Laser Game Consider the following game played on an n n board,

More information

Equipment for the basic dice game

Equipment for the basic dice game This game offers 2 variations for play! The Basic Dice Game and the Alcazaba- Variation. The basic dice game is a game in its own right from the Alhambra family and contains everything needed for play.

More information

Introduction to Auction Theory: Or How it Sometimes

Introduction to Auction Theory: Or How it Sometimes Introduction to Auction Theory: Or How it Sometimes Pays to Lose Yichuan Wang March 7, 20 Motivation: Get students to think about counter intuitive results in auctions Supplies: Dice (ideally per student)

More information

Plan. Related courses. A Take-Away Game. Mathematical Games , (21-801) - Mathematical Games Look for it in Spring 11

Plan. Related courses. A Take-Away Game. Mathematical Games , (21-801) - Mathematical Games Look for it in Spring 11 V. Adamchik D. Sleator Great Theoretical Ideas In Computer Science Mathematical Games CS 5-25 Spring 2 Lecture Feb., 2 Carnegie Mellon University Plan Introduction to Impartial Combinatorial Games Related

More information

EXPLORING TIC-TAC-TOE VARIANTS

EXPLORING TIC-TAC-TOE VARIANTS EXPLORING TIC-TAC-TOE VARIANTS By Alec Levine A SENIOR RESEARCH PAPER PRESENTED TO THE DEPARTMENT OF MATHEMATICS AND COMPUTER SCIENCE OF STETSON UNIVERSITY IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR

More information

Fraction Race. Skills: Fractions to sixths (proper fractions) [Can be adapted for improper fractions]

Fraction Race. Skills: Fractions to sixths (proper fractions) [Can be adapted for improper fractions] Skills: Fractions to sixths (proper fractions) [Can be adapted for improper fractions] Materials: Dice (2 different colored dice, if possible) *It is important to provide students with fractional manipulatives

More information

In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours!

In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours! Memory Introduction In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours! Step 1: Random colours First, let s create a character that can change

More information

G r a d e. 2 M a t h e M a t i c s. Blackline Masters

G r a d e. 2 M a t h e M a t i c s. Blackline Masters G r a d e 2 M a t h e M a t i c s Blackline Masters BLM K 4.1 Assessment Checklist Student s Name Comments BLM 2.N.1.1 Eyes and Fingers BLM 2.N.1.2 Ten-Strips BLM 2.N.1.2 Ten-Strips (continued) BLM 2.N.1.3

More information

Acing Math (One Deck At A Time!): A Collection of Math Games. Table of Contents

Acing Math (One Deck At A Time!): A Collection of Math Games. Table of Contents Table of Contents Introduction to Acing Math page 5 Card Sort (Grades K - 3) page 8 Greater or Less Than (Grades K - 3) page 9 Number Battle (Grades K - 3) page 10 Place Value Number Battle (Grades 1-6)

More information

MULTIPLICATION FACT FOOTBALL

MULTIPLICATION FACT FOOTBALL DIRECTIONS FOR STUDENTS: MULTIPLICATION FACT FOOTBALL 1. Students pair up and decide who will answer questions first (be on offense). That student places his or her helmet (or a colored counter) onto the

More information

Number Partners Primary Maths Games Box Crib Sheet EASY

Number Partners Primary Maths Games Box Crib Sheet EASY Number Partners Primary Maths Games Box Crib Sheet Below is an overview of the games found in the Number Partners games box to get an idea before looking at the full instructions together with pupils during

More information

Gough, John , Doing it with dominoes, Australian primary mathematics classroom, vol. 7, no. 3, pp

Gough, John , Doing it with dominoes, Australian primary mathematics classroom, vol. 7, no. 3, pp Deakin Research Online Deakin University s institutional research repository DDeakin Research Online Research Online This is the published version (version of record) of: Gough, John 2002-08, Doing it

More information

Domino Games. Variation - This came can also be played by multiplying each side of a domino.

Domino Games. Variation - This came can also be played by multiplying each side of a domino. Domino Games Domino War This is a game for two people. 1. Place all the dominoes face down. 2. Each person places their hand on a domino. 3. At the same time, flip the domino over and whisper the sum of

More information

Pay attention to how flipping of pieces is determined with each move.

Pay attention to how flipping of pieces is determined with each move. CSCE 625 Programing Assignment #5 due: Friday, Mar 13 (by start of class) Minimax Search for Othello The goal of this assignment is to implement a program for playing Othello using Minimax search. Othello,

More information

Introduction to Computing 2014 Assignment 4 (Preliminary Version) Simple Checkers Game

Introduction to Computing 2014 Assignment 4 (Preliminary Version) Simple Checkers Game 705003 Introduction to Computing 2014 Assignment 4 (Preliminary Version) Simple Checkers Game Assignment Value 10% of total mark for this paper. Date Due 5pm Friday 24 October 2014. Requirements 1. Design

More information

FIFTH AVENUE English Rules v1.2

FIFTH AVENUE English Rules v1.2 FIFTH AVENUE English Rules v1.2 GAME PURPOSE Players try to get the most victory points (VPs) by raising Buildings and Shops. Each player has a choice between 4 different actions during his turn. The Construction

More information

Episode 4 30 th March 2 nd April 2018 Odd Even & Substitution Variations By R Kumaresan and Amit Sowani

Episode 4 30 th March 2 nd April 2018 Odd Even & Substitution Variations By R Kumaresan and Amit Sowani Episode 4 30 th March 2 nd April 2018 Variations By R Kumaresan and Amit Sowani Sudoku Mahabharat rounds will also serve as qualifiers for Indian Sudoku Championship for year 2018. Please check http://logicmastersindia.com/sm/2018sm.asp

More information

Would You Like To Earn $1000 s With The Click Of A Button?

Would You Like To Earn $1000 s With The Click Of A Button? Would You Like To Earn $1000 s With The Click Of A Button? (Follow these easy step by step instructions and you will) - 100% Support and all questions answered! - Make financial stress a thing of the past!

More information

ECE 499/599 Data Compression/Information Theory Spring 06. Dr. Thinh Nguyen. Homework 2 Due 04/27/06 at the beginning of the class

ECE 499/599 Data Compression/Information Theory Spring 06. Dr. Thinh Nguyen. Homework 2 Due 04/27/06 at the beginning of the class ECE 499/599 Data Compression/Information Theory Spring 06 Dr. Thinh Nguyen Homework 2 Due 04/27/06 at the beginning of the class Problem 2: Suppose you are given a task of compressing a Klingon text consisting

More information

Hackenbush. Nim with Lines (and something else) Rules: Example Boards:

Hackenbush. Nim with Lines (and something else) Rules: Example Boards: Hackenbush Nim with Lines (and something else) 1. There is a long horizontal line at the bottom of the picture known as the ground line. All line segments in the picture must be connected by some path

More information

Episode 3 8 th 12 th February Substitution and Odd Even Variations By Kishore Kumar and Ashish Kumar

Episode 3 8 th 12 th February Substitution and Odd Even Variations By Kishore Kumar and Ashish Kumar Episode 3 8 th 12 th February 2019 Substitution and Odd Even Variations By Kishore Kumar and Ashish Kumar Sudoku Mahabharat rounds will also serve as qualifiers for Indian Sudoku Championship for year

More information

Figure 1: A Checker-Stacks Position

Figure 1: A Checker-Stacks Position 1 1 CHECKER-STACKS This game is played with several stacks of black and red checkers. You can choose any initial configuration you like. See Figure 1 for example (red checkers are drawn as white). Figure

More information

CPSC 217 Assignment 3

CPSC 217 Assignment 3 CPSC 217 Assignment 3 Due: Friday November 24, 2017 at 11:55pm Weight: 7% Sample Solution Length: Less than 100 lines, including blank lines and some comments (not including the provided code) Individual

More information

Checkpoint Questions Due Monday, October 7 at 2:15 PM Remaining Questions Due Friday, October 11 at 2:15 PM

Checkpoint Questions Due Monday, October 7 at 2:15 PM Remaining Questions Due Friday, October 11 at 2:15 PM CS13 Handout 8 Fall 13 October 4, 13 Problem Set This second problem set is all about induction and the sheer breadth of applications it entails. By the time you're done with this problem set, you will

More information

* How many total outcomes are there if you are rolling two dice? (this is assuming that the dice are different, i.e. 1, 6 isn t the same as a 6, 1)

* How many total outcomes are there if you are rolling two dice? (this is assuming that the dice are different, i.e. 1, 6 isn t the same as a 6, 1) Compound probability and predictions Objective: Student will learn counting techniques * Go over HW -Review counting tree -All possible outcomes is called a sample space Go through Problem on P. 12, #2

More information

Ace of diamonds. Graphing worksheet

Ace of diamonds. Graphing worksheet Ace of diamonds Produce a screen displaying a the Ace of diamonds. 2006 Open University A silver-level, graphing challenge. Reference number SG1 Graphing worksheet Choose one of the following topics and

More information

Would You Like To Earn $1000 s With The Click Of A Button?

Would You Like To Earn $1000 s With The Click Of A Button? Would You Like To Earn $1000 s With The Click Of A Button? (Follow these easy step by step instructions and you will) This e-book is for the USA and AU (it works in many other countries as well) To get

More information

Words Mobile Ready Game Documentation

Words Mobile Ready Game Documentation Words Mobile Ready Game Documentation Joongly games 2016 Words Mobile Ready Game Contents Overview... 3 Quick Start... 3 Game rules... 4 Basics... 4 Board... 4 Tiles... 4 Extra Point Values... 4 Game start...

More information

CS Programming Project 1

CS Programming Project 1 CS 340 - Programming Project 1 Card Game: Kings in the Corner Due: 11:59 pm on Thursday 1/31/2013 For this assignment, you are to implement the card game of Kings Corner. We will use the website as http://www.pagat.com/domino/kingscorners.html

More information

Online Courses with the Writers Workshop

Online Courses with the Writers Workshop Online Courses with the Writers Workshop Welcome Thank you for booking a course with the Writers Workshop. You ve made a good choice! We ve got passionate, expert tutors and we have a formidable record

More information

Whenever possible, ask your child to tell you the time to the nearest 5 minutes. Use a clock with hands as well as a digital watch or clock.

Whenever possible, ask your child to tell you the time to the nearest 5 minutes. Use a clock with hands as well as a digital watch or clock. Can you tell the time? Whenever possible, ask your child to tell you the time to the nearest 5 minutes. Use a clock with hands as well as a digital watch or clock. Also ask: What time will it be one hour

More information

The Teachers Circle Mar. 20, 2012 HOW TO GAMBLE IF YOU MUST (I ll bet you $5 that if you give me $10, I ll give you $20.)

The Teachers Circle Mar. 20, 2012 HOW TO GAMBLE IF YOU MUST (I ll bet you $5 that if you give me $10, I ll give you $20.) The Teachers Circle Mar. 2, 22 HOW TO GAMBLE IF YOU MUST (I ll bet you $ that if you give me $, I ll give you $2.) Instructor: Paul Zeitz (zeitzp@usfca.edu) Basic Laws and Definitions of Probability If

More information

Counters in a Cup In and Out. The student sets up the cup, drops the counters on it, and records how many landed in and out of the cup.

Counters in a Cup In and Out. The student sets up the cup, drops the counters on it, and records how many landed in and out of the cup. Counters in a Cup In and Out Cup Counters Recording Paper The student sets up the cup, drops the counters on it, and records how many landed in and out of the cup. 3 + 4 =7 2 + 5 =7 For subtraction, take

More information

Monday, February 2, Is assigned today. Answers due by noon on Monday, February 9, 2015.

Monday, February 2, Is assigned today. Answers due by noon on Monday, February 9, 2015. Monday, February 2, 2015 Topics for today Homework #1 Encoding checkers and chess positions Constructing variable-length codes Huffman codes Homework #1 Is assigned today. Answers due by noon on Monday,

More information

Analysis of Don't Break the Ice

Analysis of Don't Break the Ice Rose-Hulman Undergraduate Mathematics Journal Volume 18 Issue 1 Article 19 Analysis of Don't Break the Ice Amy Hung Doane University Austin Uden Doane University Follow this and additional works at: https://scholar.rose-hulman.edu/rhumj

More information

2359 (i.e. 11:59:00 pm) on 4/16/18 via Blackboard

2359 (i.e. 11:59:00 pm) on 4/16/18 via Blackboard CS 109: Introduction to Computer Science Goodney Spring 2018 Homework Assignment 4 Assigned: 4/2/18 via Blackboard Due: 2359 (i.e. 11:59:00 pm) on 4/16/18 via Blackboard Notes: a. This is the fourth homework

More information

COMPOUND EVENTS. Judo Math Inc.

COMPOUND EVENTS. Judo Math Inc. COMPOUND EVENTS Judo Math Inc. 7 th grade Statistics Discipline: Black Belt Training Order of Mastery: Compound Events 1. What are compound events? 2. Using organized Lists (7SP8) 3. Using tables (7SP8)

More information

GETTING STARTED CONTENTS. welcome. Getting Started. How to Play. installing the Shanghai software

GETTING STARTED CONTENTS. welcome. Getting Started. How to Play. installing the Shanghai software CONTENTS GETTING STARTED Getting Started WELCOME 3 INSTALLING THE SHANGHAI SOFTWARE 3 LAUNCHING SHANGHAI 3 REGISTERING SHANGHAI 4 How to Play THE RULES 5 HISTORY 5 GETTING STARTED 6 SHANGHAI OPTIONS 7

More information

Each later round starts with the player who has drawn the next-lowest double. For example, the player who draws the double-11 in the second

Each later round starts with the player who has drawn the next-lowest double. For example, the player who draws the double-11 in the second MexicanTrainFun.com is a USA-based company dedicated to all things related to Mexican Train dominoes. These rules are based on the most popular and challenging version of the game. These are the rules

More information

Intro to Java Programming Project

Intro to Java Programming Project Intro to Java Programming Project In this project, your task is to create an agent (a game player) that can play Connect 4. Connect 4 is a popular board game, similar to an extended version of Tic-Tac-Toe.

More information

by Teresa Evans Copyright 2005 Teresa Evans. All rights reserved.

by Teresa Evans Copyright 2005 Teresa Evans. All rights reserved. by Teresa Evans Copyright 2005 Teresa Evans. All rights reserved. Permission is given for the making of copies for use in the home or classroom of the purchaser only. Making Math More Fun Math Games Ideas

More information

Dragon Canyon. Solo / 2-player Variant with AI Revision

Dragon Canyon. Solo / 2-player Variant with AI Revision Dragon Canyon Solo / 2-player Variant with AI Revision 1.10.4 Setup For solo: Set up as if for a 2-player game. For 2-players: Set up as if for a 3-player game. For the AI: Give the AI a deck of Force

More information

Factors and Products. Jamie is 12 years old. Her cousin, 6 Prime Time

Factors and Products. Jamie is 12 years old. Her cousin, 6 Prime Time Factors and Products Jamie is years old. Her cousin, Emilio, is years old. Her brother, Cam, is. Her neighbor, Esther, is. The following number sentences say that Jamie is times as old as Emilio, times

More information

Cross Out Singles. 3. Players then find the sums of the rows, columns, and diagonal, and record them in the respective circles.

Cross Out Singles. 3. Players then find the sums of the rows, columns, and diagonal, and record them in the respective circles. Materials: Cross Out Singles recording sheet, and 1 die. Cross Out Singles How To Play: 1. The die is rolled. Both players put this number in whichever one of the squares on their Round 1 chart they choose.

More information

Programming Problems 14 th Annual Computer Science Programming Contest

Programming Problems 14 th Annual Computer Science Programming Contest Programming Problems 14 th Annual Computer Science Programming Contest Department of Mathematics and Computer Science Western Carolina University April 8, 2003 Criteria for Determining Team Scores Each

More information

Over ===* Three games of strategy and chance Unique solitaire puzzles. For I to 4 players Ages 12 to adult. PassTM

Over ===* Three games of strategy and chance Unique solitaire puzzles. For I to 4 players Ages 12 to adult. PassTM Over ===* For I to 4 players Ages 12 to adult PassTM Three games of strategy and chance Unique solitaire puzzles A product of Kadon Enterprises, Inc. Over-Pass is a trademark of Arthur Blumberg, used by

More information

CS61B, Fall 2014 Project #2: Jumping Cubes(version 3) P. N. Hilfinger

CS61B, Fall 2014 Project #2: Jumping Cubes(version 3) P. N. Hilfinger CSB, Fall 0 Project #: Jumping Cubes(version ) P. N. Hilfinger Due: Tuesday, 8 November 0 Background The KJumpingCube game is a simple two-person board game. It is a pure strategy game, involving no element

More information

Contents. MA 327/ECO 327 Introduction to Game Theory Fall 2017 Notes. 1 Wednesday, August Friday, August Monday, August 28 6

Contents. MA 327/ECO 327 Introduction to Game Theory Fall 2017 Notes. 1 Wednesday, August Friday, August Monday, August 28 6 MA 327/ECO 327 Introduction to Game Theory Fall 2017 Notes Contents 1 Wednesday, August 23 4 2 Friday, August 25 5 3 Monday, August 28 6 4 Wednesday, August 30 8 5 Friday, September 1 9 6 Wednesday, September

More information

HW4: The Game of Pig Due date: Thursday, Oct. 29 th at 9pm. Late turn-in deadline is Tuesday, Nov. 3 rd at 9pm.

HW4: The Game of Pig Due date: Thursday, Oct. 29 th at 9pm. Late turn-in deadline is Tuesday, Nov. 3 rd at 9pm. HW4: The Game of Pig Due date: Thursday, Oct. 29 th at 9pm. Late turn-in deadline is Tuesday, Nov. 3 rd at 9pm. 1. Background: Pig is a folk jeopardy dice game described by John Scarne in 1945, and was

More information

Chickenfoot Dominoes Game Rules

Chickenfoot Dominoes Game Rules Chickenfoot Dominoes Game Rules Overview Chickenfoot is a domino game where the basic object of each hand is to get rid of all of your dominoes before your opponents can do the same. Although it is a game

More information

Sample pages. Skip Counting. Until we know the pattern of numbers, we can count on from the last answer. Skip count and write the numbers as you go.

Sample pages. Skip Counting. Until we know the pattern of numbers, we can count on from the last answer. Skip count and write the numbers as you go. 1:01 Skip Counting Until we know the pattern of numbers, we can from the last answer. When I count on, I my fingers. Skip count and write the numbers as you go. a Each time, three more. 3 6 b Each time,

More information

Exceptional & Free Online Resources for Teaching Probability

Exceptional & Free Online Resources for Teaching Probability Exceptional & Free Online Resources for Teaching Probability 2013 NCTM Regional Conference Louisville Sarah DeLeeuw & Ann Kong November 8, 2013 Who are we? Who are YOU? We are Welcome 50 60 43 45 36 46

More information

1.5 How Often Do Head and Tail Occur Equally Often?

1.5 How Often Do Head and Tail Occur Equally Often? 4 Problems.3 Mean Waiting Time for vs. 2 Peter and Paula play a simple game of dice, as follows. Peter keeps throwing the (unbiased) die until he obtains the sequence in two successive throws. For Paula,

More information

Sudoku Touch. 1-4 players, adult recommended. Sudoku Touch by. Bring your family back together!

Sudoku Touch. 1-4 players, adult recommended. Sudoku Touch by. Bring your family back together! Sudoku Touch Sudoku Touch by Bring your family back together! 1-4 players, adult recommended Sudoku Touch is a logic game, allowing up to 4 users to play at once. The game can be played with individual

More information

Problem Set 2. Counting

Problem Set 2. Counting Problem Set 2. Counting 1. (Blitzstein: 1, Q3 Fred is planning to go out to dinner each night of a certain week, Monday through Friday, with each dinner being at one of his favorite ten restaurants. i

More information

CS 491 CAP Intro to Combinatorial Games. Jingbo Shang University of Illinois at Urbana-Champaign Nov 4, 2016

CS 491 CAP Intro to Combinatorial Games. Jingbo Shang University of Illinois at Urbana-Champaign Nov 4, 2016 CS 491 CAP Intro to Combinatorial Games Jingbo Shang University of Illinois at Urbana-Champaign Nov 4, 2016 Outline What is combinatorial game? Example 1: Simple Game Zero-Sum Game and Minimax Algorithms

More information

Some Unusual Applications of Math

Some Unusual Applications of Math Some Unusual Applications of Math Ron Gould Emory University Supported by Heilbrun Distinguished Emeritus Fellowship October 7, 2017 Game 1 - Three Card Game The Tools: A man has three cards, one red on

More information

4.2.4 What if both events happen?

4.2.4 What if both events happen? 4.2.4 What if both events happen? Unions, Intersections, and Complements In the mid 1600 s, a French nobleman, the Chevalier de Mere, was wondering why he was losing money on a bet that he thought was

More information

NEVADA GOOD SAMS GAME RULES Revised September 2015

NEVADA GOOD SAMS GAME RULES Revised September 2015 NEVADA GOOD SAMS GAME RULES Revised September 2015 GENERAL GAME RULES FOR TOURNAMENTS: All games will be played in accordance with Nevada Good Sam Official Game rules. In order to participate for the Nevada

More information

Grades 4-6 Teacher Math Workshop SAGE Conference Session for MAME Winnipeg MB Canada October 19

Grades 4-6 Teacher Math Workshop SAGE Conference Session for MAME Winnipeg MB Canada October 19 Grades 4-6 Teacher Math Workshop SAGE Conference Session for MAME Winnipeg MB Canada October 19 Contents of this handout copyright protected by Box Cars And One-Eyed Jacks Inc, No Sweat Education Inc.,

More information

Roll & Make. Represent It a Different Way. Show Your Number as a Number Bond. Show Your Number on a Number Line. Show Your Number as a Strip Diagram

Roll & Make. Represent It a Different Way. Show Your Number as a Number Bond. Show Your Number on a Number Line. Show Your Number as a Strip Diagram Roll & Make My In Picture Form In Word Form In Expanded Form With Money Represent It a Different Way Make a Comparison Statement with a Greater than Your Make a Comparison Statement with a Less than Your

More information

Activity: Even + Even + Odd =?

Activity: Even + Even + Odd =? Activity: Even + Even + Odd =? USE THEORETICAL PROBABILITIES AND EXPERIMENTAL RESULTS TO MAKE PREDICTION & DECISIONS FIND THE PROBABILITIES OF DEPENDENT AND INDEPENDENT EVENTS VALIDATE CONCLUSIONS USING

More information

Tarot Combat. Table of Contents. James W. Gray Introduction

Tarot Combat. Table of Contents. James W. Gray Introduction Tarot Combat James W. Gray 2013 Table of Contents 1. Introduction...1 2. Basic Rules...2 Starting a game...2 Win condition...2 Game zones...3 3. Taking turns...3 Turn order...3 Attacking...3 4. Card types...4

More information

Waiting Times. Lesson1. Unit UNIT 7 PATTERNS IN CHANCE

Waiting Times. Lesson1. Unit UNIT 7 PATTERNS IN CHANCE Lesson1 Waiting Times Monopoly is a board game that can be played by several players. Movement around the board is determined by rolling a pair of dice. Winning is based on a combination of chance and

More information

Experiments in Probability ----a game of dice ---

Experiments in Probability ----a game of dice --- Name: Experiments in Probability ----a game of dice --- Part 1 The Duel. A. Friends, Mustangs, Countrymen. Look carefully at your dice and answer the following questions. 1) What color is your dice? 2)

More information

Pair counting. Maths focus: Counting on in ones, tens or hundreds from any number. What you need: Instructions

Pair counting. Maths focus: Counting on in ones, tens or hundreds from any number. What you need: Instructions Cambridge University Press 978-1-107-69401-9 Cambridge Primary Mathematics Stage 3 Cherri Moseley and Janet Rees Excerpt More information Place value games Largest and smallest Maths focus: To understand

More information

Episode 3 16 th 19 th March Made In India and Regions by Prasanna Seshadri

Episode 3 16 th 19 th March Made In India and Regions by Prasanna Seshadri and Episode 3 16 th 19 th March 2018 by Prasanna Seshadri Puzzle Ramayan rounds will also serve as qualifiers for Indian Puzzle Championship for year 2018. Please check http://logicmastersindia.com/pr/2018pr.asp

More information

Selected Game Examples

Selected Game Examples Games in the Classroom ~Examples~ Genevieve Orr Willamette University Salem, Oregon gorr@willamette.edu Sciences in Colleges Northwestern Region Selected Game Examples Craps - dice War - cards Mancala

More information

CMPT 125/128 with Dr. Fraser. Assignment 3

CMPT 125/128 with Dr. Fraser. Assignment 3 Assignment 3 Due Wednesday June 22, 2011 by 11:59pm Submit all the deliverables to the Course Management System: https://courses.cs.sfu.ca/ There is no possibility of turning the assignment in late. The

More information

Would You Like To Earn $1000 s With The Click Of A Button?

Would You Like To Earn $1000 s With The Click Of A Button? Would You Like To Earn $1000 s With The Click Of A Button? (Follow these easy step by step instructions and you will) This e-book is for the USA and AU (it works in many other countries as well) To get

More information

Game 1 Count em Skill to be learnt What you will need: How to play: Talk points: Extension of this game:

Game 1 Count em Skill to be learnt What you will need: How to play: Talk points: Extension of this game: A set of maths games provided by the Wiltshire Primary Maths Team. These can be used at home as a fun way of practising the bare necessities in maths skills that children will need to be confident with

More information

Games for Drill and Practice

Games for Drill and Practice Frequent practice is necessary to attain strong mental arithmetic skills and reflexes. Although drill focused narrowly on rote practice with operations has its place, Everyday Mathematics also encourages

More information

PHASE 10 CARD GAME Copyright 1982 by Kenneth R. Johnson

PHASE 10 CARD GAME Copyright 1982 by Kenneth R. Johnson PHASE 10 CARD GAME Copyright 1982 by Kenneth R. Johnson For Two to Six Players Object: To be the first player to complete all 10 Phases. In case of a tie, the player with the lowest score is the winner.

More information

Before displaying an image, the game should wait for a random amount of time.

Before displaying an image, the game should wait for a random amount of time. Reaction Introduction You are going to create a 2-player game to see who has the fastest reactions. The game will work by showing an image after a random amount of time - whoever presses their button first

More information

Programming Languages and Techniques Homework 3

Programming Languages and Techniques Homework 3 Programming Languages and Techniques Homework 3 Due as per deadline on canvas This homework deals with the following topics * lists * being creative in creating a game strategy (aka having fun) General

More information

Subtraction Step Down

Subtraction Step Down Face Off - or Subtraction War Materials Needed: 1 set of Dominoes per player (remove any domino with a blank end), 1 pair of dice per player, one game board Skills: subtracting, outcomes chart and probability

More information

Tangent: Boromean Rings. The Beer Can Game. Plan. A Take-Away Game. Mathematical Games I. Introduction to Impartial Combinatorial Games

Tangent: Boromean Rings. The Beer Can Game. Plan. A Take-Away Game. Mathematical Games I. Introduction to Impartial Combinatorial Games K. Sutner D. Sleator* Great Theoretical Ideas In Computer Science CS 15-251 Spring 2014 Lecture 110 Feb 4, 2014 Carnegie Mellon University Tangent: Boromean Rings Mathematical Games I Challenge for next

More information

2. Review of Pawns p

2. Review of Pawns p Critical Thinking, version 2.2 page 2-1 2. Review of Pawns p Objectives: 1. State and apply rules of movement for pawns 2. Solve problems using pawns The main objective of this lesson is to reinforce the

More information

A C E. Answers Investigation 3. Applications. 12, or or 1 4 c. Choose Spinner B, because the probability for hot dogs on Spinner A is

A C E. Answers Investigation 3. Applications. 12, or or 1 4 c. Choose Spinner B, because the probability for hot dogs on Spinner A is Answers Investigation Applications. a. Answers will vary, but should be about for red, for blue, and for yellow. b. Possible answer: I divided the large red section in half, and then I could see that the

More information