Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In python pls! Part 4: Odds of winning with Monte Carlo Let's put everything together! Given a starting_hand, use Monte Carlo simulation to determine the

In python pls!

image text in transcribed

Part 4: Odds of winning with Monte Carlo Let's put everything together! Given a starting_hand, use Monte Carlo simulation to determine the probability that your hand will win, lose or tie! Our numerical experiment consists of running N games for the same starting hand and assume that you are playing against n_players players. That is, you should deal player cards to all of these players. The setup code provides the initial variables and some of the functions that you defined in previous parts: Note that we are not providing the function WhoWin from the previous page. Make sure you first pass the tests on the previous page, copy the function here, and use it to complete the required code for your numerical experiment. Write a code snippet that runs N games and defines the variables: Hint: you will need to generate the initial complete deck of cards in ascending order (initialCardDeck = np. arange (0,52)), and remove the starting_hand before you deal cards to other players and the community cards. Hint: there is a reason you are required to return numpy arrays in the WhoWin function. We know that output [1,0,0] from a game means a win and [0,1,0] means a loss. How can you interpret [1,2,1], given that it is the combined result from 4 games? With that information, how to use simple numpy array arithmetics to combine all the game results

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

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions

Question

Know the principles of effective service recovery systems.

Answered: 1 week ago

Question

Explain the service recovery paradox.

Answered: 1 week ago