CPSC 531: Systems Modeling and Simulation

Professor Carey Williamson

Fall 2017

Assignment 1: Vegas Baby! (40 marks)

Due: Friday, September 29, 2017 (4:00pm)

Learning Objectives

The purpose of this assignment is to learn about random numbers, probability, and Monte Carlo simulation. Along the way, you will also have a bit of fun by designing one of your own new Vegas card games.

Background

The number of tourists visiting Donald Trump's casino in Las Vegas has been waning of late (much like his political popularity). The Donald has enlisted you to help evaluate some new candidate card games that might help boost tourist traffic to his Vegas gaming tables. Since most of his tourists are Americans, he is considering some very simple card games, with few cards, simple rules, and well-defined payouts. Each is a one-player card game that costs $1 to play each time. Your task is to determine which of these card games are the most attractive (i.e., best probability of winning) or the least attractive (i.e., lowest probability of winning) for players, so that The Donald knows which new card game(s) to deploy.

Here are the new card games that are being considered:

Technical Requirements

In this assignment, you will implement a Monte Carlo simulation (in either C, C++, or Java) to evaluate and compare six different Vegas card games. For each game, you will simulate 1,000,000 plays of the game in order to estimate the probability of winning.

You will also need to design and implement the code to model a card dealer who is working with a well-shuffled single deck of cards. Attached is some example code for an infinite-deck card dealer, for which the probability of receiving any given card (e.g., the 5 of Diamonds) is always constant, regardless of which (or how many) cards have been drawn previously. Feel free to use this infinite-deck model to get started, but you will need a much more realistic dealer model in order to complete your Monte Carlo experiments.

When you are finished, please submit your solution in electronic form to your TA. Your submission should include the source code for your simulation program, a brief user manual describing how to compile and use your simulator, and a description of the results generated using your program. Please remember that assignments are to be done individually, and submitted to your TA on or before the stated deadline. The penalty for late submissions is 4 marks per day (or portion thereof) beyond the deadline.

Grading Rubric

The grading scheme for the assignment is as follows:

Up to 4 bonus marks will be awarded for a concise mathematical analysis of the probability of winning each of the aforementioned Vegas card games, as validation for your simulation results.

Tips