IWannaBeAP
IWannaBeAP
  • Threads: 18
  • Posts: 78
Joined: Aug 22, 2022
September 20th, 2022 at 3:57:38 PM permalink
How do I become as cool as the wizard.

lol jk

The real question is how do I simulate games the way wizard does. I have decent programming background. Does he use a special program?

I'm not talking about CVBJ, that's for blackjack only.

Wizard seems to be able to simulate literally just about any game with just about any set of rules. And I want to be able to do the same. For the games he hasn't simulated, I would like to do so myself.

Anyone able to help?
BleedingChipsSlowly
BleedingChipsSlowly
  • Threads: 23
  • Posts: 1033
Joined: Jul 9, 2010
September 20th, 2022 at 4:19:28 PM permalink
iirc, The Wizard has provided some of his simulation work in the form of C coding. While the C language has a challenging learning curve, it is probably an ideal tool for the job of simulating game play. It is a general purpose tool that provides the incredible flexibility needed to handle whatever rules of play a game has. Also, it is one of the best languages available in terms of program execution performance, an important consideration when you want to generate many millions of results.

[Edit: C coding is best for game simulation. If you want to put a graphical interface up front there are dozens of tools available for that part of the work with different styles and suited to particular environments. ]
Last edited by: BleedingChipsSlowly on Sep 20, 2022
“You don’t bring a bone saw to a negotiation.” - Robert Jordan, former U.S. ambassador to Saudi Arabia
DRich
DRich
  • Threads: 86
  • Posts: 11719
Joined: Jul 6, 2012
Thanked by
MichaelBluejayMukkesmoothgrh
September 20th, 2022 at 4:53:21 PM permalink
Quote: IWannaBeAP

How do I become as cool as the wizard.

lol jk

The real question is how do I simulate games the way wizard does. I have decent programming background. Does he use a special program?

I'm not talking about CVBJ, that's for blackjack only.

Wizard seems to be able to simulate literally just about any game with just about any set of rules. And I want to be able to do the same. For the games he hasn't simulated, I would like to do so myself.

Anyone able to help?
link to original post



I would say start by writing a game, Write yourself a simple blackjack or roulette game. Once you can do that you probably have enough skills to write a simulation.

When I was learning to program and wanted to learn a new programming language I would write a game to learn it. I have developed more Asteroids, Pacman, and video poker than I can count.
At my age, a "Life In Prison" sentence is not much of a deterrent.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6271
Joined: Jun 22, 2011
September 20th, 2022 at 5:53:16 PM permalink
I do my share of simulations, and I use Visual C#, which is part of Microsoft Visual Studio, which you can download for free.
MichaelBluejay
MichaelBluejay
  • Threads: 81
  • Posts: 1618
Joined: Sep 17, 2010
September 20th, 2022 at 6:30:52 PM permalink
Quote: IWannaBeAP

The real question is how do I simulate games the way wizard does.... Does he use a special program?
link to original post

He codes the sims himself, from scratch. That's one reason he's been able to analyze games that few to no others have analyzed.

I wrote my blackjack sim years ago in Java because the interpreted languages like Javascript and LiveCode weren't fast enough, but I bet these days they're fast enough on modern computers for most purposes, and development time is much faster in interpreted languages. With Java, I spent more time debugging than coding.
Presidential Election polls and odds: https://2605.me/p
IWannaBeAP
IWannaBeAP
  • Threads: 18
  • Posts: 78
Joined: Aug 22, 2022
September 20th, 2022 at 9:11:23 PM permalink
Ah sh*t I do have some programming background but in java and python instead...

So Wizard writes everything from scratch from C for each game? No special program?
IWannaBeAP
IWannaBeAP
  • Threads: 18
  • Posts: 78
Joined: Aug 22, 2022
September 20th, 2022 at 9:13:10 PM permalink
Quote: ThatDonGuy

I do my share of simulations, and I use Visual C#, which is part of Microsoft Visual Studio, which you can download for free.
link to original post



can you share an example of a simulation you did?
Ace2
Ace2
  • Threads: 32
  • Posts: 2672
Joined: Oct 2, 2017
Thanked by
Talldude90
September 20th, 2022 at 9:34:03 PM permalink
You can do almost everything in excel. Very easy to use the random function and generate millions of trials.

Excel is all I have. Not a programmer
It’s all about making that GTA
MichaelBluejay
MichaelBluejay
  • Threads: 81
  • Posts: 1618
Joined: Sep 17, 2010
September 20th, 2022 at 10:23:02 PM permalink
Quote: IWannaBeAP

So Wizard writes everything from scratch from C for each game? No special program?
link to original post

That is literally what I just said, except I didn't identify what language he uses. I presume he still uses C, but I don't know for sure.

Quote: IWannaBeAP

can you share an example of a simulation you did?

Okay, I posted the link to the code for the Java-based blackjack sim at the bottom of the Blackjack page on Easy Vegas. I wrote it 12 years ago, haven't used it since, just tested it and it still runs. I will provide exactly zero support for the code, you're on your own.

Running it from the terminal, here's some sample output:

M rounds	EV	Bankroll	InitialBets
5M -0.3143% -31434.0 9,999,998
10M -0.2793% -55857.0 19,999,998
15M -0.2547% -76423.0 29,999,998
So, after 15M rounds, the house edge was 0.2547%, which is PDC (pretty damn close) to the 0.25532% from the Wizard's house edge calculator for a 2-deck, DAS game.

Quote: Ace2

You can do almost everything in excel. Very easy to use the random function and generate millions of trials.

I'm skeptical that blackjack could be worked up in Excel to do millions of trials, but I'm not an Excel expert. Are you able to provide an example? Even better would be Google Sheets, though I know it's not as powerful as Excel.
Presidential Election polls and odds: https://2605.me/p
BleedingChipsSlowly
BleedingChipsSlowly
  • Threads: 23
  • Posts: 1033
Joined: Jul 9, 2010
Thanked by
MichaelBluejay
September 20th, 2022 at 11:33:54 PM permalink
Quote: MichaelBluejay

… I bet these days [interpreted languages are] fast enough on modern computers for most purposes, and development time is much faster in interpreted languages. …
link to original post

It gets closer to that every year, but I think there’s still a huge difference. A comparison of execution time between Java, Python, and C is given here. In general, based on the study, what takes 10 hours to run for C will take 17 hours for Java and 56 hours for Python. If, like me, it takes you several iterations to get something right then the execution speed becomes more important than the ease of design. (btw, Excel’s speed comparison would wind up being something like that of a chihuahua’s in a greyhound race, imho.)

In summary, The Wizard chose his programming tool wisely based on the need to crank out millions of simulation runs.

[Edit: grammar correction]
Last edited by: BleedingChipsSlowly on Sep 21, 2022
“You don’t bring a bone saw to a negotiation.” - Robert Jordan, former U.S. ambassador to Saudi Arabia
Ace2
Ace2
  • Threads: 32
  • Posts: 2672
Joined: Oct 2, 2017
Thanked by
MichaelBluejayaceside
September 20th, 2022 at 11:46:18 PM permalink
Another very easy way to simulate blackjack:

You have a 43% chance of winning each hand with a payoff of 1.31 to 1.

Edge of 67 bps, SD of 1.14. Plenty accurate for my calculations, which are usually figuring how much bankroll I need for a certain level/length of play
It’s all about making that GTA
MichaelBluejay
MichaelBluejay
  • Threads: 81
  • Posts: 1618
Joined: Sep 17, 2010
Thanked by
aceside
September 20th, 2022 at 11:54:23 PM permalink
Quote: BleedingChipsSlowly

In general, based on the study, what takes 10 hours to run for C will take 17 hours for Java and 56 hours for Python.
link to original post

True, but my point was, six times slower could still be fast enough. Based on how fast my Java sim ran on my old computer and my new computer, and how fast my LiveCode sim ran on my old computer, I estimate that LiveCode could sim 1.5 million rounds per minute. That would be plenty for lots of applications. I suspect Javascript and Python would be even faster.

Quote: Ace2

Another very easy way to simulate blackjack:

You have a 43% chance of winning each hand with a payoff of 1.31 to 1.

Edge of 67 bps, SD of 1.14
link to original post

That's more like an estimation than a simulation. A true simulation lets you change parameters to test things. For example, my blackjack sim can be modified to do things like find the penalty for strategy deviations, or the efficacy of card-counting systems.
Presidential Election polls and odds: https://2605.me/p
aceside
aceside
  • Threads: 2
  • Posts: 464
Joined: May 14, 2021
September 21st, 2022 at 6:44:38 AM permalink
Quote: Ace2

Another very easy way to simulate blackjack:

You have a 43% chance of winning each hand with a payoff of 1.31 to 1.

Edge of 67 bps, SD of 1.14. Plenty accurate for my calculations, which are usually figuring how much bankroll I need for a certain level/length of play
link to original post


I’ve read this a few times but still don’t understand what you are talking about.
What is this 1.31 to 1 payoff? It looks like you are talking about an expected win amount of 1.31 for each 1-unit-bet winning hand, but this number doesn’t sound right.
Last edited by: aceside on Sep 21, 2022
BleedingChipsSlowly
BleedingChipsSlowly
  • Threads: 23
  • Posts: 1033
Joined: Jul 9, 2010
Thanked by
MichaelBluejay
September 21st, 2022 at 8:17:35 AM permalink
The expected win is 1.31 per 1 wagered for 43% of hands played. So (1.31 + 1) * 0.43 = 0.9933 expected value (EV) for a wager if one, a house edge of 0.67%.

A simulation of play would provide the information used in this calculation. As MichaelBluejay pointed out, the calculation is an application of the simulation information in the context of this thread.
“You don’t bring a bone saw to a negotiation.” - Robert Jordan, former U.S. ambassador to Saudi Arabia
aceside
aceside
  • Threads: 2
  • Posts: 464
Joined: May 14, 2021
Thanked by
MichaelBluejay
September 21st, 2022 at 8:46:47 AM permalink
Quote: BleedingChipsSlowly

The expected win is 1.31 per 1 wagered for 43% of hands played. So (1.31 + 1) * 0.43 = 0.9933 expected value (EV) for a wager if one, a house edge of 0.67%.

link to original post


I am confused here, but we need both the win rate and the loss rate to calculate the house edge. The win rate is 43%, the loss rate is 50%, and the tie rate is 7%. Let us set the expected win amount of each winning hand as x, then we have
50%*1 - 43%*x = 0.67%.

This gives x=1.15.
gordonm888
Administrator
gordonm888
  • Threads: 60
  • Posts: 5049
Joined: Feb 18, 2015
Thanked by
MichaelBluejayKatrinaO
September 21st, 2022 at 10:36:44 AM permalink
Many of the Wizard's calculations use a looping code, not a random-number- generator-based simulator.

He loops through every possible combination of cards (once), accumulating statistical outcome information.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
BleedingChipsSlowly
BleedingChipsSlowly
  • Threads: 23
  • Posts: 1033
Joined: Jul 9, 2010
September 21st, 2022 at 10:56:11 AM permalink
Quote: aceside

Quote: BleedingChipsSlowly

The expected win is 1.31 per 1 wagered for 43% of hands played. So (1.31 + 1) * 0.43 = 0.9933 expected value (EV) for a wager if one, a house edge of 0.67%.

link to original post


I am confused here, but we need both the win rate and the loss rate to calculate the house edge. The win rate is 43%, the loss rate is 50%, and the tie rate is 7%. Let us set the expected win amount of each winning hand as x, then we have
50%*1 - 43%*x = 0.67%.

This gives x=1.15.
link to original post

Absent a specific mention of pushes, I went with the theory that pushes are classified as a win. The resulting 0.67% house edge is in line with 6:5 red chip tables and stadium games. I could be wrong. Perhaps Ace2 will clarify.
“You don’t bring a bone saw to a negotiation.” - Robert Jordan, former U.S. ambassador to Saudi Arabia
Ace2
Ace2
  • Threads: 32
  • Posts: 2672
Joined: Oct 2, 2017
Thanked by
MichaelBluejayBleedingChipsSlowly
September 21st, 2022 at 11:47:04 AM permalink
There are no pushes for this bet. 43% chance you win 1.31 units, 57% chance you lose 1 unit

Such a bet is statistically congruent to blackjack. It will give you essentially the same results, variance and RoR as blackjack as long as your sample size is above about 100 hands. But it’s much easier to do calculations for this simple bet since there is no splitting, doubling, pushes, blackjacks or surrendering.

It’s pretty easy to manually calculate the effect of many strategy deviations and then modify the 0.43 and 1.31 as needed. But that combination, giving and edge/SD of 0.67% / 1.14, is pretty accurate for most 3:2 games.

For strategy deviations, I always assume infinite deck which makes the calculations much easier. I’ve found that as long as more than two decks are being used, the infinite deck answer is within a couple basis points of the exact answer
Last edited by: Ace2 on Sep 21, 2022
It’s all about making that GTA
ChumpChange
ChumpChange
  • Threads: 111
  • Posts: 4785
Joined: Jun 15, 2018
September 21st, 2022 at 11:58:51 AM permalink
So you just have to bet on the 43% of hands that actually win something. The other 57% can be skipped through mnemonic intrigue.
Ace2
Ace2
  • Threads: 32
  • Posts: 2672
Joined: Oct 2, 2017
September 21st, 2022 at 12:04:02 PM permalink
Quote: ChumpChange

So you just have to bet on the 43% of hands that actually win something. The other 57% can be skipped through mnemonic intrigue.
link to original post

Yep, just like craps. All you gotta do is turn off bets right before a 7 is rolled
It’s all about making that GTA
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
Thanked by
BleedingChipsSlowlyMukke
September 21st, 2022 at 5:49:54 PM permalink
Every game has a custom program written to analyze it. I write my code in C, C++, JAVA, VBA and I have used third-party software to assist my computations, including Cactus Kev's fast poker hand evaluator. There is absolutely nothing off the shelf that does this. You have to write it all yourself. I've personally analyzed well over 300 table games and side bets with custom programs I've written, easily thousands of hours of programming. Slot machines require a spread sheet analysis and verification by a simulation. Video Poker has a few tricks, but it is also a complete cycle.

Simulations are useful to verify combinatorial results, aka running a cycle, but sometimes they are the only option. For example, in collusion computations, I mostly use simulations.

A complete combinatorial analysis means that I look at every possible situation that can occur in the game and account for it. This is absolutely the preferred method, and I use it for most games, even for advantage play methods like hole-carding and edge sorting. For card counting, I use simulation. Certain promotions have closed formulas that approximate the result, but it's also useful to simulate them, especially promotions like loss rebates.

For lame ideas like betting progressions, stop loss, and those who claim they can beat negative edges by some type of voodoo, I just tell the person the Earth is not flat and please go away.

Mike is pretty much the same, I doubt anything I've said above contradicts his own methodologies.
Climate Casino: https://climatecasino.net/climate-casino/
MichaelBluejay
MichaelBluejay
  • Threads: 81
  • Posts: 1618
Joined: Sep 17, 2010
Thanked by
teliot
September 21st, 2022 at 5:54:49 PM permalink
Well, since teliot is commenting, I should mention that I hired him twelve years ago to consult with me on that Java blackjack simulator that I just posted. I couldn't get it to return the right result, but he zeroed in on the problem quickly.
Presidential Election polls and odds: https://2605.me/p
Talldude90
Talldude90
  • Threads: 15
  • Posts: 132
Joined: Aug 24, 2022
September 21st, 2022 at 9:40:48 PM permalink
In the small amount I have done so far I have used Excel. You can get about 1 million results in about 3 seconds (including the paste value of the results into a table which then causes the sheet to re-calculate for another 1M results). If you have a gaming mouse or a more elegant solution you can have the paste values portion automated and the "program" continue to run on it's on at the cost of not being able to use that computer for ANYTHING else till you get the number of sims you want.

If you want the absolute fastest though you would use FORTRAN. It is still what the nuclear industry uses for Monte Carlo simulations and is afaik still the gold standard. Problem is the last time I messed with FORTRAN code was 11 years ago and i would basically have to re-learn it. I have some worry that it may be harder to code, but if it is the most efficient to run random events in a nuclear reactor model, it should be the most efficient in running random generators for gambling.

The most complicated thing i have done so far is craps, but if you are able to convert all the rules into code I don't see why it shouldn't be easy to sim anything you want in excel or any normal programming language.

Excel for Easy, FORTRAN for Fast.
Ace2
Ace2
  • Threads: 32
  • Posts: 2672
Joined: Oct 2, 2017
September 21st, 2022 at 10:03:57 PM permalink
Quote: Talldude90


The most complicated thing i have done so far is craps, but if you are able to convert all the rules into code I don't see why it shouldn't be easy to sim anything you want in excel or any normal programming language.

Why would you need to program/simulate anything for craps? Those calculations are so easy you can do them in your head
It’s all about making that GTA
BleedingChipsSlowly
BleedingChipsSlowly
  • Threads: 23
  • Posts: 1033
Joined: Jul 9, 2010
September 22nd, 2022 at 2:05:08 AM permalink
Quote: Ace2

Why would you need to program/simulate anything for craps? Those calculations are so easy you can do them in your head
link to original post

Betting systems. I’ll get my coat…
“You don’t bring a bone saw to a negotiation.” - Robert Jordan, former U.S. ambassador to Saudi Arabia
Talldude90
Talldude90
  • Threads: 15
  • Posts: 132
Joined: Aug 24, 2022
September 22nd, 2022 at 4:54:09 AM permalink
True, I was having some issues with a calculation in roulette, and decided to code in craps to make sure I was doing things right in how I was using the random number generator. I don't know that I would want to do BJ though, seems like there are a lot of different cases that would be annoying to deal with.

Disclaimer, I totally believe no betting system can lower the HE. Doesn't mean I don't wanna play with sims ;) .

Edit (thanks aceside): The above disclaimer is only in relation to bets that don't have exploitable information (for example removal of cards to a discard pile or variable state games).
Last edited by: Talldude90 on Sep 22, 2022
aceside
aceside
  • Threads: 2
  • Posts: 464
Joined: May 14, 2021
September 22nd, 2022 at 5:11:27 AM permalink
Quote: Talldude90

Disclaimer, I totally believe no betting system can lower the HE. Doesn't mean I don't wanna play with sims ;) .
link to original post


This is over stretched. In blackjack shoe games, you definitely need a betting system to beat this game.
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
Thanked by
MichaelBluejay
September 22nd, 2022 at 5:13:57 AM permalink
Quote: Talldude90

In the small amount I have done so far I have used Excel. You can get about 1 million results in about 3 seconds (including the paste value of the results into a table which then causes the sheet to re-calculate for another 1M results). If you have a gaming mouse or a more elegant solution you can have the paste values portion automated and the "program" continue to run on it's on at the cost of not being able to use that computer for ANYTHING else till you get the number of sims you want.

If you want the absolute fastest though you would use FORTRAN. It is still what the nuclear industry uses for Monte Carlo simulations and is afaik still the gold standard. Problem is the last time I messed with FORTRAN code was 11 years ago and i would basically have to re-learn it. I have some worry that it may be harder to code, but if it is the most efficient to run random events in a nuclear reactor model, it should be the most efficient in running random generators for gambling.

The most complicated thing i have done so far is craps, but if you are able to convert all the rules into code I don't see why it shouldn't be easy to sim anything you want in excel or any normal programming language.

Excel for Easy, FORTRAN for Fast.
link to original post

The random number generator that comes with Excel (and is used in VBA) has a cycle of length 2^24 = 16,777,216, (as I recall), which makes VBA and Excel unusable for any large simulation of pretty much anything without programing your own RNG. Fortunately, strong long cycle RNGs are fairly easy to code.

Good on you for programming in Fortran, I used that up until about 1984 on punch cards. Sometime later I upleveled from punch cards to an ADM-5. That 300 BAUD modem was lightning fast.
Last edited by: teliot on Sep 22, 2022
Climate Casino: https://climatecasino.net/climate-casino/
MichaelBluejay
MichaelBluejay
  • Threads: 81
  • Posts: 1618
Joined: Sep 17, 2010
September 22nd, 2022 at 9:18:05 AM permalink
Quote: Ace2

Why would you need to program/simulate anything for craps? Those calculations are so easy you can do them in your head
link to original post

(1) Not all of us can do the calcs in our head, or even on paper. Some of us can code but aren't skilled in math.

(2) Disproving betting systems. Sure, the math-literate know the EV is total bets x the house edge of the bet, but that's not convincing to someone who thinks that varying bets can affect the EV. For them, a sim is required to actually *play* the game to show that the system fails. (Sure, some betting system believers won't accept even the results of a sim, because they think that computer-simmed results aren't the same as real-world results, but there's only so much you can do.) Here's one such sim I made to disprove a betting system suggested by a forum member here.

(3) For a given betting strategy (e.g. various bet sizes on various bets), you might want to find out things like the 10th, 25th, 50th, 75th, and 90th percentile results. Maybe that could be calculated, but it seems easier to code a sim.
Presidential Election polls and odds: https://2605.me/p
DRich
DRich
  • Threads: 86
  • Posts: 11719
Joined: Jul 6, 2012
Thanked by
teliot
September 22nd, 2022 at 10:43:56 AM permalink
Quote: teliot



Good on you for programming in Fortran, I used that up until about 1984 on punch cards. Sometime later I upleveled from punch cards to an ADM-5. That 300 BAUD modem was lightning fast.



I learned to program in FORTRAN using punch cards on an old IBM 360 in the early 1980's. I also used it for a year or two doing medical image analysis on CAT scans and PET scans.
At my age, a "Life In Prison" sentence is not much of a deterrent.
Ace2
Ace2
  • Threads: 32
  • Posts: 2672
Joined: Oct 2, 2017
Thanked by
camapl
September 22nd, 2022 at 12:12:44 PM permalink
Quote: MichaelBluejay

Some of us can code but aren't skilled in math.

That sounds like a very bad combination for coding probability simulations
It’s all about making that GTA
TumblingBones
TumblingBones
  • Threads: 29
  • Posts: 528
Joined: Dec 25, 2016
September 22nd, 2022 at 12:29:00 PM permalink
For simulations I've pretty much stuck with Java. One reason is that it's easy to whip up a GUI to let me control settings. Another plus with Java is that there are some good Apache libraries for statistical analysis. If you really want to get fancy you can also access Python from Java and do all sorts of plotting and analysis. When dealing with the need to do some sort of exhaustive analysis of all possible outcomes I've used C since I can optimize memory usage. Last time I did one I had 2^^18 paths to consider. It took ~20 minutes running on my desktop PC which was pretty state-of-the art at the time (2005).

As to programing back in the days of yore, FORTRAN was the 1st language I learned and used (1969 thru 1970) but then I switched to ALGOL (1971 to ~ 1976), then Assembler for various architectures, followed by C starting in 1982. There's probably about another dozen or so I've used since then but I take great satisfaction in never having learned COBOL.
My goal of being well informed conflicts with my goal of remaining sane.
TumblingBones
TumblingBones
  • Threads: 29
  • Posts: 528
Joined: Dec 25, 2016
September 22nd, 2022 at 12:34:17 PM permalink
Quote: Ace2

Quote: Talldude90


The most complicated thing i have done so far is craps, but if you are able to convert all the rules into code I don't see why it shouldn't be easy to sim anything you want in excel or any normal programming language.

Why would you need to program/simulate anything for craps? Those calculations are so easy you can do them in your head
link to original post


I wrote one to use in training an AI. I wanted to evaluate some ML optimization techniques and craps seemed like a good test case.
My goal of being well informed conflicts with my goal of remaining sane.
DRich
DRich
  • Threads: 86
  • Posts: 11719
Joined: Jul 6, 2012
September 22nd, 2022 at 2:59:28 PM permalink
Quote: TumblingBones


As to programing back in the days of yore, FORTRAN was the 1st language I learned and used (1969 thru 1970) but then I switched to ALGOL (1971 to ~ 1976), then Assembler for various architectures, followed by C starting in 1982. There's probably about another dozen or so I've used since then but I take great satisfaction in never having learned COBOL.



I was sure you were going to say you programmed in 'B'. 1982 is much earlier than I started using 'C'. Probably 1987 for me. Yes, COBOL was my second language.
At my age, a "Life In Prison" sentence is not much of a deterrent.
Talldude90
Talldude90
  • Threads: 15
  • Posts: 132
Joined: Aug 24, 2022
September 22nd, 2022 at 3:59:42 PM permalink
I get people saying FORTRAN is old and making fun of it, but to be clear, it is still the Industry Standard for MCNP (Monte Carlo N-Particle). It is that way because it is the fastest option. It IS still used today, and I graduated college in 2012 and it was a required part of my degree.
camapl
camapl
  • Threads: 8
  • Posts: 420
Joined: Jun 22, 2010
Thanked by
Mukke
September 22nd, 2022 at 4:13:29 PM permalink
Am I the only one who learned PASCAL?
Expectation is the root of all heartache.
Talldude90
Talldude90
  • Threads: 15
  • Posts: 132
Joined: Aug 24, 2022
September 22nd, 2022 at 4:22:03 PM permalink
Quote: teliot

The random number generator that comes with Excel (and is used in VBA) has a cycle of length 2^24 = 16,777,216, (as I recall), which makes VBA and Excel unusable for any large simulation of pretty much anything without programing your own RNG. Fortunately, strong long cycle RNGs are fairly easy to code.

Good on you for programming in Fortran, I used that up until about 1984 on punch cards. Sometime later I upleveled from punch cards to an ADM-5. That 300 BAUD modem was lightning fast.
link to original post



So, does this mean that it repeats itself after 1.68E7 uses? The methodology I was using had randbetween(x,x) in column A for 100k rows. I took the end results and paste-valued them which caused a re-calc each time I pasted the final result. On a couple of the sheets I did 1E6 at a time, but I preferred doing 100k at the time so I didn't have to wait on the calculating. One weird thing, the bottom of the screen said it was using 12 cores, and I couldn't do anything in Excel till it finished (a few seconds) but task manager only showed the % going up on CPU utilization to about 50%.
ChesterDog
ChesterDog
  • Threads: 8
  • Posts: 1504
Joined: Jul 26, 2010
Thanked by
MichaelBluejay
September 22nd, 2022 at 4:55:01 PM permalink
Quote: Talldude90

Quote: teliot

The random number generator that comes with Excel (and is used in VBA) has a cycle of length 2^24 = 16,777,216, (as I recall), which makes VBA and Excel unusable for any large simulation of pretty much anything without programing your own RNG. Fortunately, strong long cycle RNGs are fairly easy to code.

Good on you for programming in Fortran, I used that up until about 1984 on punch cards. Sometime later I upleveled from punch cards to an ADM-5. That 300 BAUD modem was lightning fast.
link to original post



So, does this mean that it repeats itself after 1.68E7 uses? The methodology I was using had randbetween(x,x) in column A for 100k rows. I took the end results and paste-valued them which caused a re-calc each time I pasted the final result. On a couple of the sheets I did 1E6 at a time, but I preferred doing 100k at the time so I didn't have to wait on the calculating. One weird thing, the bottom of the screen said it was using 12 cores, and I couldn't do anything in Excel till it finished (a few seconds) but task manager only showed the % going up on CPU utilization to about 50%.
link to original post



Did Microsoft improve their Excel rand() function in 2010?

See https://support.microsoft.com/en-us/office/rand-function-4cbfa695-8869-4788-8d90-021ea9f5be73
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
September 22nd, 2022 at 5:04:01 PM permalink
Quote: Talldude90

So, does this mean that it repeats itself after 1.68E7 uses? The methodology I was using had randbetween(x,x) in column A for 100k rows. I took the end results and paste-valued them which caused a re-calc each time I pasted the final result. On a couple of the sheets I did 1E6 at a time, but I preferred doing 100k at the time so I didn't have to wait on the calculating. One weird thing, the bottom of the screen said it was using 12 cores, and I couldn't do anything in Excel till it finished (a few seconds) but task manager only showed the % going up on CPU utilization to about 50%.

It looks like my information is old, I used Excel 2007 until about 2015. Now Excel uses the Mersenne Twister for its RNG which is as good as you'll ever need. That said, if you are simulating any betting systems or progressions, please just stop and use your considerable intelligence in a more worthwhile fashion.

https://support.microsoft.com/en-us/office/rand-function-4cbfa695-8869-4788-8d90-021ea9f5be73
Climate Casino: https://climatecasino.net/climate-casino/
DRich
DRich
  • Threads: 86
  • Posts: 11719
Joined: Jul 6, 2012
Thanked by
camapl
September 22nd, 2022 at 5:10:11 PM permalink
Quote: camapl

Am I the only one who learned PASCAL?
link to original post



I wrote some PASCAL today.
At my age, a "Life In Prison" sentence is not much of a deterrent.
MichaelBluejay
MichaelBluejay
  • Threads: 81
  • Posts: 1618
Joined: Sep 17, 2010
Thanked by
teliotIWannaBeAP
September 22nd, 2022 at 6:24:43 PM permalink
Quote: teliot

Now Excel uses the Mersenne Twister for its RNG which is as good as you'll ever need.
link to original post

Dr. O'Neill, who developed the PCG algorithm, says that Mersenne Twister fails some statistical tests for quality (as does Wikipedia, but I didn't dig into the references). Unfortunately Dr. O'Neil's page where she compares various PRNG algos is a bit dated and doesn't include newer algos like Xorshiro128+, which I think is what most Javascript implementations use these days.

Quote: teliot

That said, if you are simulating any betting systems or progressions, please just stop and use your considerable intelligence in a more worthwhile fashion.

Ahem. I just wrote a sim to show one of my readers that his conclusion about one of my articles was wrong. And as I said in an earlier post, I wrote a sim to show a member of this forum how his betting system didn't dent the house edge. Maybe you think we should ignore people with such delusions, and that's a valid argument, but sometimes I try to explain to people who seem like they have a capacity to learn. After all, a long time ago I used to believe the Gambler's Fallacy.

Also, as I mentioned in another post, it could be useful to find the various Xth percentile results for various betting systems (especially comparing them to flat betting). And then there's evaluating card-counting systems. (You helped me with mine, twelve years ago.) There are various useful reasons to write betting-system sims.
Presidential Election polls and odds: https://2605.me/p
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
Thanked by
MichaelBluejay
September 22nd, 2022 at 9:12:31 PM permalink
I've programmed many betting system simulations myself, you can find them all over my YouTube channel, but I never wrote a single one thinking the outcome might prove the system worked. There can be other reasons to write the code. But rarely does one of these posters have a deeper motive.
Climate Casino: https://climatecasino.net/climate-casino/
MichaelBluejay
MichaelBluejay
  • Threads: 81
  • Posts: 1618
Joined: Sep 17, 2010
Thanked by
teliot
September 22nd, 2022 at 9:30:28 PM permalink
That reminds me of the very first sim I coded, probably 1984. In high school I read or heard something about how after flipping two heads in a row, tails was no more likely. My junior high school and high school didn't teach probability so I didn't have a starting point. On the one hand it seemed like any flip should be 50/50, but on the other, without any education, it also seemed plausible that tails had to be more likely for things to "even out". So I wrote a sim in BASIC to flip coins and I discovered, of course, that the coin has no memory, it doesn't matter what was flipped before. That convinced me about that particular case, but I continued to have misunderstandings about the gambler's fallacy in other cases for a couple more decades.

On my page about me betting system challenge, I encourage would-be challengers in the strongest possible terms to have their idea SIM'd before doing the challenge and risking their money. I did get an inquiry a while back by someone who claimed that he *did* have his system coded and it beat the house, so I told him to send the code to me, but he said his partner coded it, and the partner died, and he no longer had access to it.

System believers have so many characteristics in common I made a post about them, Characteristics of a Betting System Believer. The relevant ones for this discussion are:

(25) Hasn't run a computer simulation.

(26) Can't run a computer simulation, because he doesn't know how.

(27) Unwilling to learn how to code a simulation (and unwilling to hire someone to do so).
Last edited by: MichaelBluejay on Sep 22, 2022
Presidential Election polls and odds: https://2605.me/p
ViennaPizza
ViennaPizza
  • Threads: 16
  • Posts: 86
Joined: Apr 26, 2022
September 22nd, 2022 at 10:55:18 PM permalink
Quote: MichaelBluejay

That reminds me of the very first sim I coded, probably 1984. In high school I read or heard something about how after flipping two heads in a row, tails was no more likely. My junior high school and high school didn't teach probability so I didn't have a starting point. On the one hand it seemed like any flip should be 50/50, but on the other, without any education, it also seemed plausible that tails had to be more likely for things to "even out". So I wrote a sim in BASIC to flip coins and I discovered, of course, that the coin has no memory, it doesn't matter what was flipped before. That convinced me about that particular case, but I continued to have misunderstandings about the gambler's fallacy in other cases for a couple more decades.

On my page about me betting system challenge, I encourage would-be challengers in the strongest possible terms to have their idea SIM'd before doing the challenge and risking their money. Once I posted that advice I mostly stopped getting inquiries—so maybe people are actually getting their ideas coded, learning that they don't work, and then not writing to me. I did get an inquiry a while back by someone who claimed that he *did* have his system coded and it beat the house, so I told him to send the code to me, but he said his partner coded it, and the partner died, and he no longer had access to it.

System believers have so many characteristics in common I made a post about them, Characteristics of a Betting System Believer. The relevant ones for this discussion are:

(25) Hasn't run a computer simulation.

(26) Can't run a computer simulation, because he doesn't know how.

(27) Unwilling to learn how to code a simulation (and unwilling to hire someone to do so).
link to original post



You accept SD/DD blackjack for your betting system challenge? If so I might take you on after some research.
MichaelBluejay
MichaelBluejay
  • Threads: 81
  • Posts: 1618
Joined: Sep 17, 2010
Thanked by
teliot
September 22nd, 2022 at 11:06:59 PM permalink
Quote: VladPutin

You accept SD/DD blackjack for your betting system challenge?
link to original post

No, and since you failed the reading comprehension test, now I'm blocking you.
Presidential Election polls and odds: https://2605.me/p
ViennaPizza
ViennaPizza
  • Threads: 16
  • Posts: 86
Joined: Apr 26, 2022
September 22nd, 2022 at 11:13:53 PM permalink
.....
Last edited by: ViennaPizza on Sep 22, 2022
ViennaPizza
ViennaPizza
  • Threads: 16
  • Posts: 86
Joined: Apr 26, 2022
September 22nd, 2022 at 11:34:41 PM permalink
Quote: MichaelBluejay

Quote: VladPutin

You accept SD/DD blackjack for your betting system challenge?
link to original post

No, and since you failed the reading comprehension test, now I'm blocking you.
link to original post



Sounds like you reject blackjack because you're afraid of real math. You're specifically picking games with high HE to make it impossible for betting systems to beat the house edge.

And then you claim betting systems are "completely useless".

You, sir, have just committed a "bait and switch".

The fact that betting systems can not overcome your high HE games is not equivalent to "completely useless" and "makes no difference", iirc those are your own words. The bait and switch here is you're trying to claim they "makes no difference" because they can't over come your high HE games. But that's not what "makes no difference" actually means. It means it does not change the EV.

And that is where you're wrong.

That's why you only take high HE games in your challenge, because you're scared of real math.

If the HE is thin enough, a dent from the betting system can actually turn the EV positive.

According to CBJN, MGM has a 0.19% HE double deck, Paris 0.26% 6D, Aria 0.19% DD, Bellagio 0.20% DD, Caesars 0.26 6D etc etc.

All with thin edges that can be beaten without card counting, merely on the results of previous hands.

Because you reject challenges from these low HE games, you go on and claim systems don't make a difference in the EV because they can't flip the EV to positive. When in reality, to disprove you, one need to show the EV can be nudged by betting systems, rather than turn it into a positive EV game.

System sellers being scammy scums doesn't automatically make you the good guy when you claim the opposite. That's called fallacy of the inverse, look it up, also known as denial of the antecedent. So while I can use a system to gain a razor thin edge at 0.19% HE blackjack in vegas, there's no point doing it when I can just count cards for +3% EV. That doesn't make the system "useless", just because card counting is superior.

TLDR you're a coward hiding behind high house edge games with your challenge while using the fact nobody took your challenge to claim a logical fallacy.
Ace2
Ace2
  • Threads: 32
  • Posts: 2672
Joined: Oct 2, 2017
September 22nd, 2022 at 11:43:25 PM permalink
Quote: VladPutin

[
If the HE is thin enough, a dent from the betting system can actually turn the EV positive.

According to CBJN, MGM has a 0.19% HE double deck, Paris 0.26% 6D, Aria 0.19% DD, Bellagio 0.20% DD, Caesars 0.26 6D etc etc.

All with thin edges that can be beaten without card counting, merely on the results of previous hands.

Are you referring to a system by which you bet more after you’ve lost several hands? The assumption being that the remaining deck is probably more favorable to the player if it has been unfavorable up to now
It’s all about making that GTA
ViennaPizza
ViennaPizza
  • Threads: 16
  • Posts: 86
Joined: Apr 26, 2022
September 23rd, 2022 at 12:03:53 AM permalink
Quote: Ace2

Quote: VladPutin

[

Are you referring to a system by which you bet more after you’ve lost several hands? The assumption being that the remaining deck is probably more favorable to the player if it has been unfavorable up to now
link to original post



Yeah that's definitely true for blackjack even without card counting, and that's part of what I had in mind.

Bac card counting has always been "dismissed" per se, but it actually makes a sizable difference, just not even close to breaking the HE. I did hear some bac side bets are countable and +EV towards the end of the shoe but that's beyond the point here regarding betting systems.

Something similar to what you said about BJ also happens in bac, just in a different way and a much smaller scale. If banker wins a lot the shoe will deplete faster because banker draws more. It's kinda similar to how a cut card in blackjack helps the casino vs continuous shuffler by shortening good shoes and prolonging bad shoes. I don't have the numbers on how card depletion affects bac EV, but I'm sure 1:It's tiny, 2: It's non zero, and 3: It won't overcome the house edge alone.

Small but non zero, is still enough to disprove Bluejay's point of betting systems making "absolutely no difference"
IWannaBeAP
IWannaBeAP
  • Threads: 18
  • Posts: 78
Joined: Aug 22, 2022
September 23rd, 2022 at 12:50:32 AM permalink
Quote: gordonm888

Many of the Wizard's calculations use a looping code, not a random-number- generator-based simulator.

He loops through every possible combination of cards (once), accumulating statistical outcome information.
link to original post



That does sound more accurate than RNG. But some games can go on forever right? You can want to go to the bathroom, get hungry, get sleepy, pee your pants on the casino floor, fall asleep on the craps pit, die from starvation, and the shooter still won't roll a 7. That's a joke of course. But my point is some games can be infinite
  • Jump to: