BIEB 143 Spring 2018 Weeks 8-10 Game Theory Lab

Size: px
Start display at page:

Download "BIEB 143 Spring 2018 Weeks 8-10 Game Theory Lab"

Transcription

1 BIEB 143 Spring 2018 Weeks 8-10 Game Theory Lab Please read and follow this handout. Read a section or paragraph completely before proceeding to writing code. It is important that you understand exactly what to do in order to successfully write the code. R Concepts Lists A new data type could be useful for this assignment. We have used vectors to store items of the same type (characters or logicals or numbers) and have used arrays as multi-dimensional extensions of vectors. In this assignment, we will be working with collections of vectors of different lengths. These can be tricky to store in an array: how would you make an array out of two vectors, one of length 5 and one of length 10? As an alternative you can use a list. A list is like a vector except that the value of the entry at each position can be anything. So you could have a list that is: L1=list('a',4,TRUE,3,'hi','I am list entry #6',c(3,4,5,1,5)) For our purposes, it is more useful that an entry of a list can be a vector. So you could have this list: L2=list(runif(40),c(4,6,1,6),c(4:50)) This is a list of length 3 and each entry is a vector. To access positions in a list, you use double brackets. So if you typed: L2[[2]] you would get the vector c(4,6,1,6). If you typed: L2[[2]][3] you would get the value 1 because it is the value in the 3 rd position of the vector in the 2 nd position in the list L2. To make an empty list, you can type: alist = list() To assign the vector 1:40 to the Nth position of alist you can type: alist[[n]]= 1:40

2 The next two R commands - NA and rep() - could be useful later on in this assignment if you want to vectorize your code. They won't really be useful before that. NA While a list can contain different types of values, a vector can only contain one type of value. What if you want a vector of length 10 but you only have 7 values to put in it? What do you do with the remaining 3 positions? You can use NA (which stands for 'Not Available') for the missing values. You can use NA no matter if your vector is a character vector, a logical vector, or a numerical vector. All of the following are valid vectors: c(2,4,1,5,6,7,4,na,na,na) c('t',na,'ts',na,'tsp','w',na) c(na,na,na,true) To test to see if an value is NA, you can use the function is.na(): v=c(na,na,na,true) is.na(v[1]) would be TRUE is.na(v[4]) would be FALSE rep Sometimes it is useful to make a new vector that consists of a smaller vector repeated multiple times. rep() does this, and it has some flexibility in exactly how it does it. Let's say you have the vector: x=c(1,2,3) Below are some examples of how to use rep() and the output it would give you > rep(x, times=4) [1] > rep(x, length.out = 8) [1] notice how it dropped the last 3 because it reached length 8 > rep(x, each = 3) [1]

3 times and length.out are alternatives and each can be combined with either. If you want to combine them you should try it out with a small example to see how it works. The Game We will play a game in which a pair of contestants compete for a pool of resources worth k calories. A single encounter in this game is called a bout and is between two players. To play a bout, the two contestants have to decide how many calories they wish to invest into getting the resource. Whichever player invests more wins. For example, if player 1 invests 98 calories (P1=98) and player 2 invests more calories (P2=99), then player 2 wins. Both players pay the minimum of the two plays, and the winner gets the pool of k calories. In this example, let s say k=180. Both players pay 98 calories, and player 2 wins the pool of 180 calories. Here s the calculation for their final payoffs: Payoff to player 1 = = 82 calories Payoff to player 2 = -98 calories Note that players can invest any amount in a bout and payoffs can be negative for both players. For example, if P1=185 and P2=181, then: Payoff to player 1 = = -1 calorie Payoff to player 2 = -181 calories If player 1 and player 2 make the same play, then a tie ensues, and the pool k is split. For example, if P1=200, P2=200, and k=180: Assignment Payoff to player 1 = /2 = -110 calories Payoff to player 2 = /2 = -110 calories Your assignment for this lab is to write a program that will evolve a player that is able to play and win this game. You will then compete your evolved player in a classroom Olympics with fellow lab students. To facilitate and guide you through the evolution, you will be asked to complete the assignment in three defined steps. Taking a stepwise approach will be important because we will face increasingly complex game situations where the optimal solutions are not necessarily known, and where they may depend on what your fellow students do. Thus, unlike previous lab exercises in which we anticipated a particular outcome, you will only find out whether your evolution program worked well when you test your evolved organism against those of others or against variants you create yourself. Program Steps and Strategies We will ask you to use particular parameter values. You will have to use these values, and submit lab reports (programs and results) with these values to receive credit.

4 Here are parameter values to use to start off. The meanings will be clear when you read below. Population size: 1000 # of bouts: 100 chromosome sizes: 50, 100, 150, 200, 250, or 300 # of individuals with point mutations each generation: 500 # of individuals with size mutations each generation: 100 point mutation range: [0 1400] (real numbers, not only integers) calorie payoff: 120 # generations in Project To facilitate debugging and grading, we ask that you only make functions for tasks where it is explicitly allowed below. Project 1: Standing Variation 1) Create a vector of length 100 to represent the chromosome of one player. Each of the 100 elements in the vector corresponds to a possible investment that the player could play. The element values can be real numbers from 0 to This range of possible plays from 0 to 1400 can never be changed, it is part of the rules or the biology of the organisms. When the player is asked to make a play, a random element is drawn from the chromosome. 2) Create a population of 1,000 players (vectors of chromosomes). The chromosome sizes for the players will vary. When creating the population, choose the chromosome size for each player randomly from the values 50, 100, 150, 200, 250, and 300. We encourage you to use a list to store this population. Unfortunately, vectorization on lists is more complicated than vectorization on vectors and arrays. Later on, if you want to try to vectorize your program, you can think about how you could use an array to store your population. NA and/or rep() might come in handy for that. 3) Later on, you will evolve your population until it reaches fixation. To do so, you will need to figure out when your population reaches fixation. Write a function that will tell you when your population has reached fixation. To test this function, it may be helpful to create a temporary population of 1,000 identical chromosomes and compare your function's output on this population compared to the population from #2. 4) Calculate the performance scores of your 1,000 players by competing each one against a competitor pool of 100 players. This competitor pool should be duplicates of 100 players

5 chosen from your population once per generation and used for all 1,000 players. When you compete a player from your population against a player from the competitor pool you only need to record the payoff to the player from the population. The competitor pool is just there to provide opponents. a. Determine the score of all 1,000 players. The score of the player is the average payoff the player receives from the 100 bouts. Use a value of calorie payoff k=120 calories. If you'd like, you can make functions for: i. taking a chromosome of any size as input and generating a vector of n plays OR generating plays in a vectorized way, and ii. taking two plays and the payoff as input and determining the payoff to each player in a bout OR determining the payoffs in a vectorized way. 5) Once you have determined the scores of your population, use these scores as fitness values for selection. Select for the players with the higher fitness to evolve your best player. Generate an offspring population of the same size as the parent population. To impose one generation of selection, use the sample command and pass in your scores using the prob= argument to the function. Note that the sample command expects anything passed in via prob= to be nonnegative. If some of your scores are negative, you will need to figure out a good way to make these positive while still preserving the relative ranking of different individuals. There are different perfectly acceptable ways to do this. Think carefully about it and decide on one. Before contacting an instructor about how to change scores from negative to positive, you must have thought about it and be able to present a plan. You can make a function for selection and reproduction. 6) Once a new population is created by biased sampling (i.e. selection), this is a new generation. Repeat the process and track the composition of your 1,000 players until you get fixation (see #3). If your populations are not going to fixation after many hundreds of generations, there may be an error in your code. You should examine your program for errors or other possible explanations. Feel free to consult your instructors in this case. Use your program to create an evolved player. Give this player a distinctive name (e.g. superdupergnarlybesteverplayer1) and save its vector for future use. In addition, go to the website and upload your player into the form there using the instructions there. 7) Once you have evolved your player, compete your evolved player against someone else's. You can get other students' players using code on the website. We will complete a round robin and note the outcomes on the board. To compete two evolved players, introduce both players at equal frequencies (500:500 of each) and follow the population for 100 generations. If ties appear, try to think of rules to break a tie. Discuss rules for breaking ties as a class so that we have a uniform criterion. Save the code used for competition and call it the Competition Arena.

6 8) Hand in a lab report describing your program, the outcomes, and how your evolved player fared. Include a copy of your R code use to evolve your player. 9) Optional (but useful for later): Keep track of the composition of your 1,000 players (e.g. how does starting player #3 do over time? how about starting player #565?). How did the eventual winner rank after the first generation? Project 2: New Mutations 1) By completing Project 1, you have imposed selection on a population of players that were generated randomly at the beginning of your program. Their frequencies changed throughout the course of evolution, but the chromosomes themselves did not (i.e. there was no mutation). Copy all your code and functions so that you have the original ones from Project 1 and a new set for Project 2 and clear your environment. In Project 2, you will mutate and change the contents (genotype) of the 1,000 player vectors every generation. 2) Two kinds of mutations are allowed in this simulation: a. A point mutation changes the value of a position in a chromosome. If a position is mutated it is replaced by a random value from 0 to 1,400. Exactly half of your chromosomes will get a point mutation and this consists of one randomly chosen position in the vector being mutated. b. A duplication or deletion changes the size of the chromosome. These work in increments of 50 and the chromosome size is bounded between 50 and 300. So the only valid chromosome sizes are 50, 100, 150, 200, 250, and 300. Choose 100 players in your population to change size each generation and flip a coin (computationally) to determine whether it is a duplication or a deletion. If a chromosome is to change size, you will need to select a contiguous stretch of 50 values at random and either duplicate it by adding it onto the end of your vector or delete it. Write code to mutate the population. You can make functions to: i. take a chromosome of any size as input and mutate a chosen number of positions, and ii. take a chromosome as input and mutate its size. 3) Run the population of 1,000 players through 250 generations of selection and mutagenesis. Mutagenize every generation. 4) Take your best evolved player, give it a name subscripted 2, like superdupergnarlybesteverplayer2 and save its vector. Compete superdupergnarlybesteverplayer1 and superdupergnarlybesteverplayer2 and see which does

7 better. You should use the Competition Arena code you developed in Project 1 because you don't want your organisms mutating while you are a competing them. Project 3: Improve Your Player by Varying the Evolutionary Process 1) If your organisms from Project 2 are better, your program must be doing something correctly. Congratulations! Now tune your program to evolve an even better player. Note that it may not be obvious what is best. A larger population or more generations of selection are always better, but you will need more computation time. Try to balance evolutionary theory and computation time. Some possibilities are: a) Changing population size (greater or less than 1,000)? Natural selection is more efficient with large population sizes. b) Right now, new point mutations are random values between 0 and Perhaps new mutations should depend on what the previous value was. So if you have a play of 400, perhaps your possible new mutated values are +/- 5% (380 to 420). But remember to make sure that the new values are plausible (can't be negative, can't be greater than 1,400). c) Mutagenize more or fewer than 500 players with point mutations or a different number of chromosome size changes? High mutation rates can also do harm. d) Have a mutation rate per value rather than per chromosome. e) Evolve for more than 250 generations? This is always good. f) Add sexual reproduction and recombination between chromosomes. Note that you cannot change k=120 calories, the range of 0 to 1400 for the elements in the chromosome vector, or the allowed chromosome vector length of 50, 100, 150, 200, 250, or 300. k is imposed by the environment, and the chromosome vector sizes are constrained by the biology of the organisms. 2) After you have evolved your improved players in this third project, name them subscripted 3 (superdupergnarlybesteverplayer3) and bring them to the BIEB 143 Olympics. All evolved player3s will be combined into a large population and competed to see who is the final. Note that no mutations are allowed during competition. 3) Hand in a lab report describing your program, the outcomes, and how your evolved player2s and player3s fared. Include a copy of your R code use to evolve your players.

Achieving Desirable Gameplay Objectives by Niched Evolution of Game Parameters

Achieving Desirable Gameplay Objectives by Niched Evolution of Game Parameters Achieving Desirable Gameplay Objectives by Niched Evolution of Game Parameters Scott Watson, Andrew Vardy, Wolfgang Banzhaf Department of Computer Science Memorial University of Newfoundland St John s.

More information

Project 1: A Game of Greed

Project 1: A Game of Greed Project 1: A Game of Greed In this project you will make a program that plays a dice game called Greed. You start only with a program that allows two players to play it against each other. You will build

More information

Exercise 4 Exploring Population Change without Selection

Exercise 4 Exploring Population Change without Selection Exercise 4 Exploring Population Change without Selection This experiment began with nine Avidian ancestors of identical fitness; the mutation rate is zero percent. Since descendants can never differ in

More information

CPS331 Lecture: Genetic Algorithms last revised October 28, 2016

CPS331 Lecture: Genetic Algorithms last revised October 28, 2016 CPS331 Lecture: Genetic Algorithms last revised October 28, 2016 Objectives: 1. To explain the basic ideas of GA/GP: evolution of a population; fitness, crossover, mutation Materials: 1. Genetic NIM learner

More information

PROBLEM SET 2 Due: Friday, September 28. Reading: CLRS Chapter 5 & Appendix C; CLR Sections 6.1, 6.2, 6.3, & 6.6;

PROBLEM SET 2 Due: Friday, September 28. Reading: CLRS Chapter 5 & Appendix C; CLR Sections 6.1, 6.2, 6.3, & 6.6; CS231 Algorithms Handout #8 Prof Lyn Turbak September 21, 2001 Wellesley College PROBLEM SET 2 Due: Friday, September 28 Reading: CLRS Chapter 5 & Appendix C; CLR Sections 6.1, 6.2, 6.3, & 6.6; Suggested

More information

For slightly more detailed instructions on how to play, visit:

For slightly more detailed instructions on how to play, visit: Introduction to Artificial Intelligence CS 151 Programming Assignment 2 Mancala!! The purpose of this assignment is to program some of the search algorithms and game playing strategies that we have learned

More information

CS 441/541 Artificial Intelligence Fall, Homework 6: Genetic Algorithms. Due Monday Nov. 24.

CS 441/541 Artificial Intelligence Fall, Homework 6: Genetic Algorithms. Due Monday Nov. 24. CS 441/541 Artificial Intelligence Fall, 2008 Homework 6: Genetic Algorithms Due Monday Nov. 24. In this assignment you will code and experiment with a genetic algorithm as a method for evolving control

More information

Creating a Dominion AI Using Genetic Algorithms

Creating a Dominion AI Using Genetic Algorithms Creating a Dominion AI Using Genetic Algorithms Abstract Mok Ming Foong Dominion is a deck-building card game. It allows for complex strategies, has an aspect of randomness in card drawing, and no obvious

More information

Tac Due: Sep. 26, 2012

Tac Due: Sep. 26, 2012 CS 195N 2D Game Engines Andy van Dam Tac Due: Sep. 26, 2012 Introduction This assignment involves a much more complex game than Tic-Tac-Toe, and in order to create it you ll need to add several features

More information

(a) Left Right (b) Left Right. Up Up 5-4. Row Down 0-5 Row Down 1 2. (c) B1 B2 (d) B1 B2 A1 4, 2-5, 6 A1 3, 2 0, 1

(a) Left Right (b) Left Right. Up Up 5-4. Row Down 0-5 Row Down 1 2. (c) B1 B2 (d) B1 B2 A1 4, 2-5, 6 A1 3, 2 0, 1 Economics 109 Practice Problems 2, Vincent Crawford, Spring 2002 In addition to these problems and those in Practice Problems 1 and the midterm, you may find the problems in Dixit and Skeath, Games of

More information

Rummikub Competition Start-up Kit

Rummikub Competition Start-up Kit Rummikub Competition Startup Kit Rummikub Competition / Event Set Up Wellorganized Rummikub events can attract many people. Keep in mind that competitors may not always be from a homogenous group (i.e.

More information

Round-robin Tournament with Three Groups of Five Entries. Round-robin Tournament with Five Groups of Three Entries

Round-robin Tournament with Three Groups of Five Entries. Round-robin Tournament with Five Groups of Three Entries Alternative Tournament Formats Three alternative tournament formats are described below. The selection of these formats is limited to those using the pairwise scoring, which was previously reported. Specifically,

More information

1 Modified Othello. Assignment 2. Total marks: 100. Out: February 10 Due: March 5 at 14:30

1 Modified Othello. Assignment 2. Total marks: 100. Out: February 10 Due: March 5 at 14:30 CSE 3402 3.0 Intro. to Concepts of AI Winter 2012 Dept. of Computer Science & Engineering York University Assignment 2 Total marks: 100. Out: February 10 Due: March 5 at 14:30 Note 1: To hand in your report

More information

Pareto Evolution and Co-Evolution in Cognitive Neural Agents Synthesis for Tic-Tac-Toe

Pareto Evolution and Co-Evolution in Cognitive Neural Agents Synthesis for Tic-Tac-Toe Proceedings of the 27 IEEE Symposium on Computational Intelligence and Games (CIG 27) Pareto Evolution and Co-Evolution in Cognitive Neural Agents Synthesis for Tic-Tac-Toe Yi Jack Yau, Jason Teo and Patricia

More information

Introduction to Artificial Intelligence CS 151 Programming Assignment 2 Mancala!! Due (in dropbox) Tuesday, September 23, 9:34am

Introduction to Artificial Intelligence CS 151 Programming Assignment 2 Mancala!! Due (in dropbox) Tuesday, September 23, 9:34am Introduction to Artificial Intelligence CS 151 Programming Assignment 2 Mancala!! Due (in dropbox) Tuesday, September 23, 9:34am The purpose of this assignment is to program some of the search algorithms

More information

CS151 - Assignment 2 Mancala Due: Tuesday March 5 at the beginning of class

CS151 - Assignment 2 Mancala Due: Tuesday March 5 at the beginning of class CS151 - Assignment 2 Mancala Due: Tuesday March 5 at the beginning of class http://www.clubpenguinsaraapril.com/2009/07/mancala-game-in-club-penguin.html The purpose of this assignment is to program some

More information

Setup. These rules are for three, four, or five players. A two-player variant is described at the end of this rulebook.

Setup. These rules are for three, four, or five players. A two-player variant is described at the end of this rulebook. Imagine you are the head of a company of thieves oh, not a filthy band of cutpurses and pickpockets, but rather an elite cadre of elegant ladies and gentlemen skilled in the art of illegal acquisition.

More information

CSE 312 Midterm Exam May 7, 2014

CSE 312 Midterm Exam May 7, 2014 Name: CSE 312 Midterm Exam May 7, 2014 Instructions: You have 50 minutes to complete the exam. Feel free to ask for clarification if something is unclear. Please do not turn the page until you are instructed

More information

CPSC 217 Assignment 3 Due Date: Friday March 30, 2018 at 11:59pm

CPSC 217 Assignment 3 Due Date: Friday March 30, 2018 at 11:59pm CPSC 217 Assignment 3 Due Date: Friday March 30, 2018 at 11:59pm Weight: 8% Individual Work: All assignments in this course are to be completed individually. Students are advised to read the guidelines

More information

Optimization of Tile Sets for DNA Self- Assembly

Optimization of Tile Sets for DNA Self- Assembly Optimization of Tile Sets for DNA Self- Assembly Joel Gawarecki Department of Computer Science Simpson College Indianola, IA 50125 joel.gawarecki@my.simpson.edu Adam Smith Department of Computer Science

More information

Lab Exercise #10. Assignment Overview

Lab Exercise #10. Assignment Overview Lab Exercise #10 Assignment Overview You will work with a partner on this exercise during your lab session. Two people should work at one computer. Occasionally switch the person who is typing. Talk to

More information

One Zero One. The binary card game. Players: 2 Ages: 8+ Play Time: 10 minutes

One Zero One. The binary card game. Players: 2 Ages: 8+ Play Time: 10 minutes One Zero One The binary card game Players: 2 Ages: 8+ Play Time: 10 minutes In the world of computer programming, there can only be one winner - either zeros or ones! One Zero One is a small, tactical

More information

CS107L Handout 06 Autumn 2007 November 2, 2007 CS107L Assignment: Blackjack

CS107L Handout 06 Autumn 2007 November 2, 2007 CS107L Assignment: Blackjack CS107L Handout 06 Autumn 2007 November 2, 2007 CS107L Assignment: Blackjack Much of this assignment was designed and written by Julie Zelenski and Nick Parlante. You're tired of hanging out in Terman and

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

For this assignment, your job is to create a program that plays (a simplified version of) blackjack. Name your program blackjack.py.

For this assignment, your job is to create a program that plays (a simplified version of) blackjack. Name your program blackjack.py. CMPT120: Introduction to Computing Science and Programming I Instructor: Hassan Khosravi Summer 2012 Assignment 3 Due: July 30 th This assignment is to be done individually. ------------------------------------------------------------------------------------------------------------

More information

Competition Manual. 11 th Annual Oregon Game Project Challenge

Competition Manual. 11 th Annual Oregon Game Project Challenge 2017-2018 Competition Manual 11 th Annual Oregon Game Project Challenge www.ogpc.info 2 We live in a very connected world. We can collaborate and communicate with people all across the planet in seconds

More information

Learning to Play like an Othello Master CS 229 Project Report. Shir Aharon, Amanda Chang, Kent Koyanagi

Learning to Play like an Othello Master CS 229 Project Report. Shir Aharon, Amanda Chang, Kent Koyanagi Learning to Play like an Othello Master CS 229 Project Report December 13, 213 1 Abstract This project aims to train a machine to strategically play the game of Othello using machine learning. Prior to

More information

Further Evolution of a Self-Learning Chess Program

Further Evolution of a Self-Learning Chess Program Further Evolution of a Self-Learning Chess Program David B. Fogel Timothy J. Hays Sarah L. Hahn James Quon Natural Selection, Inc. 3333 N. Torrey Pines Ct., Suite 200 La Jolla, CA 92037 USA dfogel@natural-selection.com

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

Improved Draws for Highland Dance

Improved Draws for Highland Dance Improved Draws for Highland Dance Tim B. Swartz Abstract In the sport of Highland Dance, Championships are often contested where the order of dance is randomized in each of the four dances. As it is a

More information

An Idea for a Project A Universe for the Evolution of Consciousness

An Idea for a Project A Universe for the Evolution of Consciousness An Idea for a Project A Universe for the Evolution of Consciousness J. D. Horton May 28, 2010 To the reader. This document is mainly for myself. It is for the most part a record of some of my musings over

More information

Mint Tin Mini Skulduggery

Mint Tin Mini Skulduggery Mint Tin Mini Skulduggery 1-4 player, 10- to 25-minute dice game How much is your spirit worth? Invoke the ethereal realm to roll spirit points, shatter others, and push the limits without unleashing skulduggery!

More information

This exam is closed book and closed notes. (You will have access to a copy of the Table of Common Distributions given in the back of the text.

This exam is closed book and closed notes. (You will have access to a copy of the Table of Common Distributions given in the back of the text. TEST #1 STA 5326 September 25, 2008 Name: Please read the following directions. DO NOT TURN THE PAGE UNTIL INSTRUCTED TO DO SO Directions This exam is closed book and closed notes. (You will have access

More information

Bidding Over Opponent s 1NT Opening

Bidding Over Opponent s 1NT Opening Bidding Over Opponent s 1NT Opening A safe way to try to steal a hand. Printer friendly version Before You Start The ideas in this article require partnership agreement. If you like what you read, discuss

More information

Programming Assignment 4

Programming Assignment 4 Programming Assignment 4 Due: 11:59pm, Saturday, January 30 Overview The goals of this section are to: 1. Use methods 2. Break down a problem into small tasks to implement Setup This assignment requires

More information

Red Dragon Inn Tournament Rules

Red Dragon Inn Tournament Rules Red Dragon Inn Tournament Rules last updated Aug 11, 2016 The Organized Play program for The Red Dragon Inn ( RDI ), sponsored by SlugFest Games ( SFG ), follows the rules and formats provided herein.

More information

ECO 463. SimultaneousGames

ECO 463. SimultaneousGames ECO 463 SimultaneousGames Provide brief explanations as well as your answers. 1. Two people could benefit by cooperating on a joint project. Each person can either cooperate at a cost of 2 dollars or fink

More information

CSci 1113: Introduction to C/C++ Programming for Scientists and Engineers Homework 2 Spring 2018

CSci 1113: Introduction to C/C++ Programming for Scientists and Engineers Homework 2 Spring 2018 CSci 1113: Introduction to C/C++ Programming for Scientists and Engineers Homework 2 Spring 2018 Due Date: Thursday, Feb. 15, 2018 before 11:55pm. Instructions: This is an individual homework assignment.

More information

1 Introduction. 1.1 Game play. CSC 261 Lab 4: Adversarial Search Fall Assigned: Tuesday 24 September 2013

1 Introduction. 1.1 Game play. CSC 261 Lab 4: Adversarial Search Fall Assigned: Tuesday 24 September 2013 CSC 261 Lab 4: Adversarial Search Fall 2013 Assigned: Tuesday 24 September 2013 Due: Monday 30 September 2011, 11:59 p.m. Objectives: Understand adversarial search implementations Explore performance implications

More information

Programming an Othello AI Michael An (man4), Evan Liang (liange)

Programming an Othello AI Michael An (man4), Evan Liang (liange) Programming an Othello AI Michael An (man4), Evan Liang (liange) 1 Introduction Othello is a two player board game played on an 8 8 grid. Players take turns placing stones with their assigned color (black

More information

CMPT 310 Assignment 1

CMPT 310 Assignment 1 CMPT 310 Assignment 1 October 4, 2017 100 points total, worth 10% of the course grade. Turn in on CourSys. Submit a compressed directory (.zip or.tar.gz) with your solutions. Code should be submitted as

More information

1 of 5 7/16/2009 6:57 AM Virtual Laboratories > 13. Games of Chance > 1 2 3 4 5 6 7 8 9 10 11 3. Simple Dice Games In this section, we will analyze several simple games played with dice--poker dice, chuck-a-luck,

More information

Contents. Goal. Jump Point

Contents. Goal. Jump Point Game Rules W elcome to the height of technology and comfort, the Space Station Atlantis! All the comfort of a five star hotel, mixed with the adventure of space travel. The station is filled with staff,

More information

Taffy Tangle. cpsc 231 assignment #5. Due Dates

Taffy Tangle. cpsc 231 assignment #5. Due Dates cpsc 231 assignment #5 Taffy Tangle If you ve ever played casual games on your mobile device, or even on the internet through your browser, chances are that you ve spent some time with a match three game.

More information

Overview. The Game Idea

Overview. The Game Idea Page 1 of 19 Overview Even though GameMaker:Studio is easy to use, getting the hang of it can be a bit difficult at first, especially if you have had no prior experience of programming. This tutorial is

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

Lesson 1: Chance Experiments

Lesson 1: Chance Experiments Student Outcomes Students understand that a probability is a number between and that represents the likelihood that an event will occur. Students interpret a probability as the proportion of the time that

More information

CMPT 310 Assignment 1

CMPT 310 Assignment 1 CMPT 310 Assignment 1 October 16, 2017 100 points total, worth 10% of the course grade. Turn in on CourSys. Submit a compressed directory (.zip or.tar.gz) with your solutions. Code should be submitted

More information

37 Game Theory. Bebe b1 b2 b3. a Abe a a A Two-Person Zero-Sum Game

37 Game Theory. Bebe b1 b2 b3. a Abe a a A Two-Person Zero-Sum Game 37 Game Theory Game theory is one of the most interesting topics of discrete mathematics. The principal theorem of game theory is sublime and wonderful. We will merely assume this theorem and use it to

More information

Crapaud/Crapette. A competitive patience game for two players

Crapaud/Crapette. A competitive patience game for two players Version of 10.10.1 Crapaud/Crapette A competitive patience game for two players I describe a variant of the game in https://www.pagat.com/patience/crapette.html. It is a charming game which requires skill

More information

arxiv: v1 [cs.gt] 23 May 2018

arxiv: v1 [cs.gt] 23 May 2018 On self-play computation of equilibrium in poker Mikhail Goykhman Racah Institute of Physics, Hebrew University of Jerusalem, Jerusalem, 91904, Israel E-mail: michael.goykhman@mail.huji.ac.il arxiv:1805.09282v1

More information

Balloons Touch. 1-4 players, all ages. Balloons Touch by. Bring your family back together!

Balloons Touch. 1-4 players, all ages. Balloons Touch by. Bring your family back together! Balloons Touch 1-4 players, all ages Balloons Touch by Bring your family back together! Balloons Touch is a fast paced game to test hand-eye coordination. Up to four players compete against each other

More information

IEEE PSU Student Chapter Robotics Competition 2014/2015

IEEE PSU Student Chapter Robotics Competition 2014/2015 IEEE PSU Student Chapter Robotics Competition 2014/2015 Official Contest Rules Last revised: December 4, 2014 The IEEE Penn State Chapter is pleased to announce the third annual PSU IEEE Robotics Competition

More information

1. Click the Create a Tournament Button (see Challonge Screen 01)

1. Click the Create a Tournament Button (see Challonge Screen 01) INTRODUCTION TO CHALLONGE First, register for a free account on the Challonge website at https://challonge.com/. These step-by-step directions will guide you through the process of setting up the qualifying

More information

Probability (Devore Chapter Two)

Probability (Devore Chapter Two) Probability (Devore Chapter Two) 1016-351-01 Probability Winter 2011-2012 Contents 1 Axiomatic Probability 2 1.1 Outcomes and Events............................... 2 1.2 Rules of Probability................................

More information

Assignment 2 (Part 1 of 2), University of Toronto, CSC384 - Intro to AI, Winter

Assignment 2 (Part 1 of 2), University of Toronto, CSC384 - Intro to AI, Winter Assignment 2 (Part 1 of 2), University of Toronto, CSC384 - Intro to AI, Winter 2011 1 Computer Science 384 February 20, 2011 St. George Campus University of Toronto Homework Assignment #2 (Part 1 of 2)

More information

Game Background. Components

Game Background. Components Game Background America in the 19th Century. By passing the Pacific Railroad Acts through Congress, the US government opened up the interior of the continent to a number of railroad companies. The race

More information

MITOCW R3. Document Distance, Insertion and Merge Sort

MITOCW R3. Document Distance, Insertion and Merge Sort MITOCW R3. Document Distance, Insertion and Merge Sort The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational

More information

Content Page. Odds about Card Distribution P Strategies in defending

Content Page. Odds about Card Distribution P Strategies in defending Content Page Introduction and Rules of Contract Bridge --------- P. 1-6 Odds about Card Distribution ------------------------- P. 7-10 Strategies in bidding ------------------------------------- P. 11-18

More information

Lesson 3. Takeout Doubles and Advances

Lesson 3. Takeout Doubles and Advances Lesson 3 Takeout Doubles and Advances Lesson Three: Takeout Doubles and Advances Preparation On Each Table: At Registration Desk: Class Organization: Teacher Tools: BETTER BRIDGE GUIDE CARD (see Appendix);

More information

Vesselin K. Vassilev South Bank University London Dominic Job Napier University Edinburgh Julian F. Miller The University of Birmingham Birmingham

Vesselin K. Vassilev South Bank University London Dominic Job Napier University Edinburgh Julian F. Miller The University of Birmingham Birmingham Towards the Automatic Design of More Efficient Digital Circuits Vesselin K. Vassilev South Bank University London Dominic Job Napier University Edinburgh Julian F. Miller The University of Birmingham Birmingham

More information

Game Background 1640 A.D. A

Game Background 1640 A.D. A Game Background 1640 A.D. A ghastly curse befell a beautiful island in the Indian Ocean... just because it could. Soon, it was known that its dark magic would not only afflict whoever tried to take away

More information

OFFICIAL RULEBOOK Version 8.0

OFFICIAL RULEBOOK Version 8.0 OFFICIAL RULEBOOK Version 8.0 Table of Contents Table of Contents About the Game 1 1 2 Getting Started Things you need to Duel 2 The Game Mat 4 Monster Cards 6 Effect Monsters 9 Xyz Monsters 12 Synchro

More information

2D Platform. Table of Contents

2D Platform. Table of Contents 2D Platform Table of Contents 1. Making the Main Character 2. Making the Main Character Move 3. Making a Platform 4. Making a Room 5. Making the Main Character Jump 6. Making a Chaser 7. Setting Lives

More information

Spring 06 Assignment 2: Constraint Satisfaction Problems

Spring 06 Assignment 2: Constraint Satisfaction Problems 15-381 Spring 06 Assignment 2: Constraint Satisfaction Problems Questions to Vaibhav Mehta(vaibhav@cs.cmu.edu) Out: 2/07/06 Due: 2/21/06 Name: Andrew ID: Please turn in your answers on this assignment

More information

Discrete Structures Lecture Permutations and Combinations

Discrete Structures Lecture Permutations and Combinations Introduction Good morning. Many counting problems can be solved by finding the number of ways to arrange a specified number of distinct elements of a set of a particular size, where the order of these

More information

JINX - 2 Players / 15 Minutes

JINX - 2 Players / 15 Minutes JINX - 2 Players / 15 Minutes Players are witches who combine secret ingredients to make big and powerful potions. Each witch will contribute one of the ingredients needed to make a potion. If they can

More information

Probability Paradoxes

Probability Paradoxes Probability Paradoxes Washington University Math Circle February 20, 2011 1 Introduction We re all familiar with the idea of probability, even if we haven t studied it. That is what makes probability so

More information

What Do You Expect? Concepts

What Do You Expect? Concepts Important Concepts What Do You Expect? Concepts Examples Probability A number from 0 to 1 that describes the likelihood that an event will occur. Theoretical Probability A probability obtained by analyzing

More information

2006 Canadian Computing Competition: Junior Division. Sponsor:

2006 Canadian Computing Competition: Junior Division. Sponsor: 2006 Canadian Computing Competition: Junior Division Sponsor: Canadian Computing Competition Student Instructions for the Junior Problems 1. You may only compete in one competition. If you wish to write

More information

CS 210 Fundamentals of Programming I Fall 2015 Programming Project 8

CS 210 Fundamentals of Programming I Fall 2015 Programming Project 8 CS 210 Fundamentals of Programming I Fall 2015 Programming Project 8 40 points Out: November 17, 2015 Due: December 3, 2015 (Thursday after Thanksgiving break) Problem Statement Many people like to visit

More information

Things I DON'T Like. Things I DO Like. Skill Quizzes. The Agenda

Things I DON'T Like. Things I DO Like. Skill Quizzes. The Agenda The Agenda 1) Mr Schneider explains his philosophy of testing & grading 2) You reflect on what you need to work on and make a plan for it 3) Mr Schneider conferences with students while you get help with

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

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

ON THE EVOLUTION OF TRUTH. 1. Introduction

ON THE EVOLUTION OF TRUTH. 1. Introduction ON THE EVOLUTION OF TRUTH JEFFREY A. BARRETT Abstract. This paper is concerned with how a simple metalanguage might coevolve with a simple descriptive base language in the context of interacting Skyrms-Lewis

More information

Creating a New Angry Birds Competition Track

Creating a New Angry Birds Competition Track Proceedings of the Twenty-Ninth International Florida Artificial Intelligence Research Society Conference Creating a New Angry Birds Competition Track Rohan Verma, Xiaoyu Ge, Jochen Renz Research School

More information

CIS 2033 Lecture 6, Spring 2017

CIS 2033 Lecture 6, Spring 2017 CIS 2033 Lecture 6, Spring 2017 Instructor: David Dobor February 2, 2017 In this lecture, we introduce the basic principle of counting, use it to count subsets, permutations, combinations, and partitions,

More information

Documentation and Discussion

Documentation and Discussion 1 of 9 11/7/2007 1:21 AM ASSIGNMENT 2 SUBJECT CODE: CS 6300 SUBJECT: ARTIFICIAL INTELLIGENCE LEENA KORA EMAIL:leenak@cs.utah.edu Unid: u0527667 TEEKO GAME IMPLEMENTATION Documentation and Discussion 1.

More information

Lesson 2. Overcalls and Advances

Lesson 2. Overcalls and Advances Lesson 2 Overcalls and Advances Lesson Two: Overcalls and Advances Preparation On Each Table: At Registration Desk: Class Organization: Teacher Tools: BETTER BRIDGE GUIDE CARD (see Appendix); Bidding Boxes;

More information

1 The Pieces. 1.1 The Body + Bounding Box. CS 314H Data Structures Fall 2018 Programming Assignment #4 Tetris Due October 8/October 12, 2018

1 The Pieces. 1.1 The Body + Bounding Box. CS 314H Data Structures Fall 2018 Programming Assignment #4 Tetris Due October 8/October 12, 2018 CS 314H Data Structures Fall 2018 Programming Assignment #4 Tetris Due October 8/October 12, 2018 In this assignment you will work in pairs to implement a variant of Tetris, a game invented by Alexey Pazhitnov

More information

Printing: You may print to the printer at any time during the test.

Printing: You may print to the printer at any time during the test. UW Madison's 2006 ACM-ICPC Individual Placement Test October 1, 12:00-5:00pm, 1350 CS Overview: This test consists of seven problems, which will be referred to by the following names (respective of order):

More information

Foundations of Computing Discrete Mathematics Solutions to exercises for week 12

Foundations of Computing Discrete Mathematics Solutions to exercises for week 12 Foundations of Computing Discrete Mathematics Solutions to exercises for week 12 Agata Murawska (agmu@itu.dk) November 13, 2013 Exercise (6.1.2). A multiple-choice test contains 10 questions. There are

More information

Introduction to (Networked) Game Theory. Networked Life NETS 112 Fall 2016 Prof. Michael Kearns

Introduction to (Networked) Game Theory. Networked Life NETS 112 Fall 2016 Prof. Michael Kearns Introduction to (Networked) Game Theory Networked Life NETS 112 Fall 2016 Prof. Michael Kearns Game Theory for Fun and Profit The Beauty Contest Game Write your name and an integer between 0 and 100 Let

More information

Smyth County Public Schools 2017 Computer Science Competition Coding Problems

Smyth County Public Schools 2017 Computer Science Competition Coding Problems Smyth County Public Schools 2017 Computer Science Competition Coding Problems The Rules There are ten problems with point values ranging from 10 to 35 points. There are 200 total points. You can earn partial

More information

OFFICIAL RULEBOOK Version 7.2

OFFICIAL RULEBOOK Version 7.2 ENGLISH EDITION OFFICIAL RULEBOOK Version 7.2 Table of Contents About the Game...1 1 2 3 Getting Started Things you need to Duel...2 The Game Mat...4 Game Cards Monster Cards...6 Effect Monsters....9 Synchro

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

Machine Learning in Iterated Prisoner s Dilemma using Evolutionary Algorithms

Machine Learning in Iterated Prisoner s Dilemma using Evolutionary Algorithms ITERATED PRISONER S DILEMMA 1 Machine Learning in Iterated Prisoner s Dilemma using Evolutionary Algorithms Department of Computer Science and Engineering. ITERATED PRISONER S DILEMMA 2 OUTLINE: 1. Description

More information

U strictly dominates D for player A, and L strictly dominates R for player B. This leaves (U, L) as a Strict Dominant Strategy Equilibrium.

U strictly dominates D for player A, and L strictly dominates R for player B. This leaves (U, L) as a Strict Dominant Strategy Equilibrium. Problem Set 3 (Game Theory) Do five of nine. 1. Games in Strategic Form Underline all best responses, then perform iterated deletion of strictly dominated strategies. In each case, do you get a unique

More information

Simulations. 1 The Concept

Simulations. 1 The Concept Simulations In this lab you ll learn how to create simulations to provide approximate answers to probability questions. We ll make use of a particular kind of structure, called a box model, that can be

More information

Practice Session 2. HW 1 Review

Practice Session 2. HW 1 Review Practice Session 2 HW 1 Review Chapter 1 1.4 Suppose we extend Evans s Analogy program so that it can score 200 on a standard IQ test. Would we then have a program more intelligent than a human? Explain.

More information

CMS.608 / CMS.864 Game Design Spring 2008

CMS.608 / CMS.864 Game Design Spring 2008 MIT OpenCourseWare http://ocw.mit.edu CMS.608 / CMS.864 Game Design Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. Sarah Sperry CMS.608 16

More information

Ok, we need the computer to generate random numbers. Just add this code inside your main method so you have this:

Ok, we need the computer to generate random numbers. Just add this code inside your main method so you have this: Java Guessing Game In this guessing game, you will create a program in which the computer will come up with a random number between 1 and 1000. The player must then continue to guess numbers until the

More information

1 - Some basic definitions 2 - What is Duplicate Texas Holdem? 3 - How it works

1 - Some basic definitions 2 - What is Duplicate Texas Holdem? 3 - How it works 1 1 - Some basic definitions 2 - What is Duplicate Texas Holdem? 3 - How it works 2 Basic definitions Carry-over: The amount, if any, added to a player s chip count at the start of a Session based on the

More information

Elite War League. Rules and Regulations Season 6

Elite War League. Rules and Regulations Season 6 Elite War League Rules and Regulations Season 6 1 Contents Content s 2 Introduction 3 Important Dates 4 1 Participation Requirements 4 2 League Structure 5 Legendary Division 5 Elite Division 5 Veteran

More information

Wright-Fisher Process. (as applied to costly signaling)

Wright-Fisher Process. (as applied to costly signaling) Wright-Fisher Process (as applied to costly signaling) 1 Today: 1) new model of evolution/learning (Wright-Fisher) 2) evolution/learning costly signaling (We will come back to evidence for costly signaling

More information

CS 210 Fundamentals of Programming I Spring 2015 Programming Assignment 8

CS 210 Fundamentals of Programming I Spring 2015 Programming Assignment 8 CS 210 Fundamentals of Programming I Spring 2015 Programming Assignment 8 40 points Out: April 15/16, 2015 Due: April 27/28, 2015 (Monday/Tuesday, last day of class) Problem Statement Many people like

More information

Harvard Guide to Using Sources: How to Avoid Plagiarism

Harvard Guide to Using Sources: How to Avoid Plagiarism Copied from: http://isites.harvard.edu/icb/icb.do?keyword=k70847&pageid=icb.page342057 Harvard Guide to Using Sources: How to Avoid Plagiarism It's not enough to know why plagiarism is taken so seriously

More information

Dominant Strategies (From Last Time)

Dominant Strategies (From Last Time) Dominant Strategies (From Last Time) Continue eliminating dominated strategies for B and A until you narrow down how the game is actually played. What strategies should A and B choose? How are these the

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

CSE231 Spring Updated 04/09/2019 Project 10: Basra - A Fishing Card Game

CSE231 Spring Updated 04/09/2019 Project 10: Basra - A Fishing Card Game CSE231 Spring 2019 Updated 04/09/2019 Project 10: Basra - A Fishing Card Game This assignment is worth 55 points (5.5% of the course grade) and must be completed and turned in before 11:59pm on April 15,

More information