![]() |
|
![]() |
|
|
|
ReliaSoft > Software > RENO > Examples > Example C-2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Problem Statement: The house edges on all possible bets for American roulette are described in the following table. It details expected gains and losses per 38 games for $1 bet. Each number has a probability of 1/38 of being a winner.
You can use RENO to simulate different bets, including:
RENO Solution: The analysis for a straight up bet is described here. Define Random Variables to describe the probabilities for your pick and the roulette wheel outcome, as shown next for your pick.
Define two Constants to set the number of bets that you will place and the value of each bet.
A Storage Variable will also be required to store the amount of money in your “Bank” during the simulation.
Construct the flowchart as follows:
The Flag Marker, Counter Block, Reset Block and Go To Flag constructs in the main flowchart are used to define a loop, which causes the simulation to continue placing bets up to the specified number of bets. The Conditional Block in the main flowchart passes the roulette wheel outcome to the subchart.
The subchart is constructed as follows.
In the subchart, another Conditional Block is used to determine whether the roulette wheel outcome matches your pick.
Two Blocks and a Summing Gate are then used to calculate and summarize your winnings or losses. The calculation for your winnings is shown next.
The amount of your win or loss is then passed to the Result Storage construct in the main flowchart and the Go To Flag starts another loop to represent your next bet. After performing 1,000 simulations, the results are displayed in the Simulation Results Explorer and in the flowchart, as shown next.
A RENO project with the solution for this example (called "Roulette.rnp") is shipped with the software and stored in the Examples\Casino folder in the application directory (e.g. C:\Program Files\ReliaSoft\RENO\Examples\Casino\Roulette.rnp).
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[Home] [Software] [Training] [Consulting] [Resources] [Corporate] [Search] [Site Map] [weibull.com] |
|
|
ReliaSoft is a registered trademark of ReliaSoft Corporation in the United States and other countries. |
LEGAL [Terms of Use] [Linking Guidelines] |
| Copyright ©1992-2008 ReliaSoft Corporation, All Rights Reserved |
Contact Webmaster |