Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This project simulates the behavior of a blackjack dealer in a casino. A dealer initially draws two cards. Each number card is given a value

image text in transcribed
This project simulates the behavior of a blackjack dealer in a casino. A dealer initially draws two cards. Each number card is given a value of its number, each face card is given a value of ten, and each Ace is given a value of 11. If the total of his cards is 16 or less, he must draw another card from the deck. Else if the total of his cards is 22 or greater and he has an Ace, he must convert the value of that Ace from 11 to 1 and update the total of his cards. If the total of his cards is 17 or greater, he stops. Define a matrix A(first_card, final_total). For each hand, increment the cell that corresponds to the first card and final total of the dealer's hand. Use the totals in matrix A to find probabilities and conditional probabilities. Write a program that simulates a blackjack dealer. The program will simulate 20,000 hands and track the results in a matrix. This simulation will draw cards "with replacement". A. Make a mesh()" plot of matrix A B. Find the probability for every possible total of dealer's cards C. Find the probability that the dealer busts, i.e. that dealer's total is 22 or greater D. Given that the dealer does not bust, find the expected value of the dealer's cards E. For each possible first card that the dealer draws, find the conditional probability that the dealer busts

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Create websites and blogs

Answered: 1 week ago

Question

5. Discuss the role of the Web in career management.

Answered: 1 week ago

Question

4. Design a career management system.

Answered: 1 week ago

Question

4. Evaluation is ongoing and used to improve the system.

Answered: 1 week ago