• Welcome to #1 Roulette Forum & Message Board | www.RouletteForum.cc.

News:

WARNING: Forums often contain bad advice & systems that aren't properly tested. Do NOT believe everything. Read these links: The Facts About What Works & Why | How To Proplerly Test Systems | The Top 5 Proven Systems | Best Honest Online Casinos

Main Menu
Popular pages:

Roulette System

The Roulette Systems That Really Work

Roulette Computers

Hidden Electronics That Predict Spins

Roulette Strategy

Why Roulette Betting Strategies Lose

Roulette System

The Honest Live Online Roulette Casinos

Don't make this programming mistake with random()

Started by Still, Jun 04, 01:41 AM 2012

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Still

Hey programmers, this is just a heads up. 

I used Visual Basic (supplied with Microsoft Excel) to check out someone's claim to have a 1.5% edge on Craps using some system of play.  I bought this system from someone who was advertizing in USA Today back in 2001 or so.  I was living near several casinos in the North Lake Tahoe area and thought it would be nice to make money indoors during the winter...instead of outdoors in construction.  But i was not willing to throw any dice until my trusty computer told me the truth. 

So i set up the two dice to get a game going, and programmed all the other parameters to duplicate what the seller was proposing.  It's been a long time;  but something was working.  I clearly had an edge (using his system or a tweak i can't remember).  So i started going out to the local casinos playing $5 chips alternating between the Come and Don't Come counting all the money i was going to make in the next year...scheming how i was gonna stay under the casino radar while i took a million $ from them. 

But after about 40 hours of playing and logging my results, my stats showed that i was losing at the expected rate for a $5 basic unit.  So i went back to check thoroughly all my code.  I found the culprit with the random number generator.  I was throwing dice out of a fast loop...as fast as the machine could throw em.  On a hunch, i decided to slow the loop down, giving more time between the throws of each pair of dice.  As soon as i did this, i lost the edge i thought i had. 

So what happened?  Well as some of you know, the random function in VB seeds off of the clock.  It's hard to understand, but by spreading the seeds a little further apart, the dice got more random.  Meaning, the system i was using somehow exploited the tiny bit of non-random character of the dice due to seeds so close together.  Whodda thunk it?

So double check your random/randomize functions to make sure they are kosher before running a system against them  might actually exploit the weaknesses. 

For the $300 i spent on the Craps system, i got to live for three weeks with the feeling that i was soon to be a millionaire.  I was heartbroken when i found out the bug.  But maybe it was worth it...the feeling...for three weeks. 

~ Still



superman

QuoteWell as some of you know, the random function in VB seeds off of the clock.  It's hard to understand, but by spreading the seeds a little further apart, the dice got more random

Yeah if you call it as fast as possible you will get duplicates too as the same seed value will produce the same result, the way I avoid it if I want speed is to add (+) the last result onto the seed value and not work in milliseconds rather use a second gap, not sure you can do that in excel though. Good observation though mate.
There's only one way forward, follow random, don't fight with it!

Ignore a thread/topic that mentions 'stop loss', 'virtual loss' and also when a list is provided of a progression, mechanical does NOT work!

Still

Thanks for the tip!  But i didn't quite catch the reference to "second gap".   

I might try to get some stuff done in Microsoft Visual Studio 2010 Express and/or Excel 2007 (VBA). 

On the other hand, RX looks promising.  So many choices. 

-