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

Roulette-focused => The Notepad => Topic started by: mr.ore on Oct 29, 07:42 AM 2011

Title: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 29, 07:42 AM 2011
So I finally found time to create quite naive implemntation of counter propagation neural network. It is the one which is more simple to understand and implement than back propagation, but it's nature prefers more generalization, so that severeral slightly different inputs (for example index of tracked events like red=0, black=1 in last x spins like RBRRB = 0 1 0 0 1) are mapped to same output (for example bet on 0 = red). The aim is to reduce variance on even chances. And  here are first results - could it be a path to that mythical "consistent winnig bet" ;)
Title: Re: Neural network bet selectio on even chances.
Post by: superman on Oct 29, 07:46 AM 2011
Keep going mr.ore, watching with interest as always, don't go getting drundk again lol
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 29, 07:55 AM 2011
Important part of the method is that it contains "vector quantization" method in self organizing map (link:://en.wikipedia.org/wiki/Self-organizing_map (link:://en.wikipedia.org/wiki/Self-organizing_map)).

Quoting wiki:
QuoteThe algorithm can be iteratively updated with 'live' data, rather than by picking random points from a data set, but this will introduce some bias if the data is temporally correlated over many samples.
link:://en.wikipedia.org/wiki/Vector_quantization (link:://en.wikipedia.org/wiki/Vector_quantization)

I have the simple version now, so improving it might be of utmost importance.

link:://en.wikipedia.org/wiki/Counterpropagation_network (link:://en.wikipedia.org/wiki/Counterpropagation_network)
Title: Re: Neural network bet selectio on even chances.
Post by: Bayes on Oct 29, 08:57 AM 2011
Quote from: mr.ore on Oct 29, 07:42 AM 2011
The aim is to reduce variance on even chances.

The way I'm attempting to do that is by using diversification (link:://en.wikipedia.org/wiki/Diversification_%28finance%29) which is mathematically proven to reduce variance (the proof is in the article). Instead of "assets" I'm "investing" in different EC patterns. Ridiculous? maybe so; it's stretching the definition to call a pattern an asset, but combined with regression to the mean it's working pretty well.  8)

I suppose the analogous technique in horseracing is "dutching". Spread your stake over 2 or more likely winners so that the return is the same whichever horse wins. It's really just common sense to not put all your eggs in one basket.
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 29, 01:14 PM 2011
I have saved initial state of rng, so that I can test the strategy over same spins. Now I returned back to programing after some break and a nap during to various circumstances and runned it for 30k spins. Wow, it seems that banrkoll balance trend follow a nice predictable line, like if a variance was really lovered, it is pretty "consistent". Maybe I am up to something  8) I will try to fine tune it to these spins without looking on more, so that I can have that "up to something" feeling at least this evening and enjoy myself  >:D .
Title: Re: Neural network bet selectio on even chances.
Post by: birdhands on Oct 29, 01:28 PM 2011
Please excuse the stupid question, but this is a European wheel, right?  That's why there is a steady loss?  I understand that the variance is what's being tested, I just want to be sure.


Mr. Ore, I believe that you and Bayes are probably our best hope; if there's a solution, you will find it.
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 29, 01:43 PM 2011
Yes that's Europen wheel.
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 29, 01:54 PM 2011
Quote
Mr. Ore, I believe that you and Bayes are probably our best hope; if there's a solution, you will find it.

Mathematically there is no solution, so finding anything that works is like prooving that intelligence is something really special. There is more in it than just beating the game, which should be impossible ;). But the more I watch results over thousands of spins the more I thing, there MUST be something. Intelligence MUST outperform random, because I see again and again the similar patterns even in such a large set of spins. While there MUST exist a sequence that beats anything, how much have been done to make almost infallible system? It does not matter that somewhere in an infinity it will lose. Utility is what matters.  Expected value = over inifinite number of spins, our results would be -2.7%, but what about FINITE number of spins? Let's fight random again, it's saturday evening, oh yeah  >:D !
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 29, 02:41 PM 2011
Curve fitting excersise - first 1000 spins were used to train neural network so that it learns "reading random", other spins are those in which it was not trained. This time no-zero roulette to see clearly the results. The main problem is that "trained" network can "broke" and my implementation is not stable - it does not converge to stable state where it does not learn because it already know how to win over trained spins. While I am still quite far from ability to automatically generate a roulette system that wins over a set of spins flat betting, first steps have been done.

When/if I master it over even chances, I will try it to create some wheel based method (so that it can learn dealer's signatures or any other forms of bias - to get Advantage-play system ;) ). Well created AI should be able found even unexpected biases, if any exist. Random can't produce bias forever, but maybe human hand or physical wheel could do that. Wiesbaden spins also contain information about dealer change - what about trying to categorize unknown dealers? If they have signature, it should be possible for NN to found it. But there is no information about who was the dealer, that's not good.

What I would like someone to send me is data in this form:

dealer 0
13
5
7
0
13
21
14
13
22
0
dealer 1
14
19
26
17
0
8
dealer 0
9
19
18
17
22

and so on

I need a set of spins where a dealer is identified.
They can have a name of course, but I will transform them to numbers anyway ;)

Could someone provide me with that? Next time you go to casino, track dealers names too and connect them to their spins, so that we can study human nature instead that of random.
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 29, 02:42 PM 2011
And image of curve fitting excersise, of course ;) Remember - this time it is without zero, but it should be obvious.
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 29, 02:51 PM 2011
First 1000+ spins to see what my new "baby" can do. It has to mature though ;)
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 29, 03:35 PM 2011
Anyone remember this w3c guy who proposed the idea of consistent winning bet and that it should be tested over 30 sessions 100 spins long flat betting? What would happened if you actually found a bet that wins over 3000 (=30 sessions X 100 spins) spins flat betting? It would look like those two images in attachement, first on no-zero, second one single zero roulette. Neural network found such a bet and mastered it.
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 29, 03:37 PM 2011
And what would happened if you took it into a casino  :twisted: ...
Title: Re: Neural network bet selectio on even chances.
Post by: Dutchy on Oct 29, 03:45 PM 2011
To Bayes and Mr.Ore,guys thanks for all your efforts,really amazing ideas!Math on a scale most of us will never know!Retracement always interests me but many times I have found it does not rebound enough.Tried comparing singles with 2's and up should be 50/50 right, with moderate success.Keep up the great work.Mr.Ore it is saturday night,"go get em" >:D
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 29, 04:30 PM 2011
Well, those 10k spins were beated, but I had to manually change parameters of network and run it 100 times over spin data to learn it. I will have to read another chapter in a textbook to learn improved versions of neural networks, maybe it would help to create a good method. In the end I want the network just to avoid long stretches without upwards trends so that my positive progression works. I have quiet a good positive up as you go progression which works wonders, but a good hit ratio is really needed ;)

In any way - this curve fitting is just to test the networks efficiency and not a real attempt to create a system. The system is going to have a progression, it is A MUST for a game with negative expectation.

As usual - one image is without zero, the other is with zero kicking in.
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 29, 04:34 PM 2011
20k spins just to check I haven't accidentally found a holy grail - no, I did not  :twisted: .
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 29, 05:04 PM 2011
Curve fitted 65k spins from Wiesbaden, it is first 65k from that file with 700k spins which lies around somewhere on the forum. Because I'm adapting the same network, I can say that it knows a lot ;) This time only zero-roulette image.
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 29, 05:12 PM 2011
Wiesbaden LoL  :wink:
Title: Re: Neural network bet selectio on even chances.
Post by: birdhands on Oct 29, 06:27 PM 2011
This is an emotional roller coaster!
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 30, 02:48 AM 2011
Found a pdfs with interesting information for anyone interested in the topics.
Title: Re: Neural network bet selectio on even chances.
Post by: warrior on Oct 30, 10:16 AM 2011
Quote from: mr.ore on Oct 29, 07:42 AM 2011
So I finally found time to create quite naive implemntation of counter propagation neural network. It is the one which is more simple to understand and implement than back propagation, but it's nature prefers more generalization, so that severeral slightly different inputs (for example index of tracked events like red=0, black=1 in last x spins like RBRRB = 0 1 0 0 1) are mapped to same output (for example bet on 0 = red). The aim is to reduce variance on even chances. And  here are first results - could it be a path to that mythical "consistent winnig bet" ;)
Dont understand what the bet seletion is on this.
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 30, 10:27 AM 2011
There is a black box (neural network = artificial intelligence) which reads past results and it's own previous decisons and on this basis make a decision where to bet next.

example

past spins |  past bets
R B R B B   |  R B R => BLACKBOX => BET B

It can be trained over past spins so that it "knows" where to bet according to patterns. The trick is that I want to enhance it so that it learn to follow trends. I have several trend following methods but they do not adapt as game change. With this it should be possible to control if the blackbox is learning or not, so I could add some counter that would increase if it starts losing so that it make an attempt to find out short term corellations. Basicaly this is a simlified model of player's brain and the aim is to learn it how to read random.

The spins so far are just a check that the AI can reverse engineer bet selection that wins over set of spins.
Title: Re: Neural network bet selectio on even chances.
Post by: superman on Oct 30, 10:38 AM 2011
Many months ago I made a bot into AI it works very well but, the main issue I had was the AI can only work with whats already happened, so I added other switches to it but it still can't cope with the flow of random, very interesting though, keep it up mr.ore
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 30, 12:39 PM 2011
Could you describe more specific what your AI was and how did you used it? I'm also thinking of learning AI to switch between several selections or learning it to play progressively. Did you dedicated some outputs of the AI as it's imputs in learing? If not then try it, it improves a lot of things.
Title: Re: Neural network bet selectio on even chances.
Post by: superman on Oct 30, 12:57 PM 2011
It was very basic, nothing on the scale you are currently looking at, it updated in realtime, FTL, SAL dependent on series it would switch over during the growth of long series and try to catch a declining series length, it worked very well at spotting 3 out of 4, being, chops RBRBRB, series of 2, series of 3 and series >3 it struggled on the series of 2 every time as thats tough to combat because when it worked out what was happening it was too late, depending on the length of the RRBBRRBBRRBB sequence, if it was a short series of RRBBRRBB then it would catch some hits which kept it sort of ok.

I never set it to learn as I didnt really see much point, random isn't supposed to give the same outputs close together, yes it may from day to day but not during one attack, that's what I thought anyway so never bothered. Maybe you are onto something.

The states I looked for where.

Is the series growing in length after each spin?

Then make a decision on the fly as to which way to bet.
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 30, 01:24 PM 2011
What kind of AI was it then? You could set it to learn so that had to be a supervised learing. Was it a fuzzy controller, neural network, perceptron or something else like a simple automata? Could you send me a link which describes your algorithm? I would be interested to see and replicate what you did, if it is interesting and worked for you.
Title: Re: Neural network bet selectio on even chances.
Post by: superman on Oct 30, 01:32 PM 2011
It wasnt really an alogrithm I was just watching outcomes and trying to react to them the best I could, we know FTL or SAL works for certain series of events but gets caught on flip flops so I just made a few if statements to react to what was happening at that point in time, nothing fancy or clever. Like I said in my last post the only thing that caught it out was series of 2 as by the time you work out its happening it may stop then it takes a few spins to work out whats starting to happen, it worked perfect on flip flops and series longer than 2 but the terrible twos were tough to catch fast enough.
Title: Re: Neural network bet selectio on even chances.
Post by: Bayes on Oct 30, 01:47 PM 2011
mr.ore, have you considered playing around with genetic algorithms? They're good for finding optimisations, in this case we want to optimise our winnings.  :xd:

Not too difficult to understand either. There's a good beginner's tutorial here (link:://:.ai-junkie.com/ga/intro/gat1.html).
Title: Re: Neural network bet selectio on even chances.
Post by: Bayes on Oct 30, 01:59 PM 2011
Also, if you're looking at statistical techniques, Gizmo used to go on about Cluster Analysis (link:://en.wikipedia.org/wiki/Cluster_analysis) a lot. Might be worth a look...
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 30, 02:03 PM 2011
The problem with genetic algorithms is that you need to represent knowledge somehow. Of course you can use genetic algorithm on anything, even learning a neural network, but they are not adaptive, they can't learn as they go. I tried them to optimize some methods, but the results was also just curve fitting. I had a system where you compute a loss you made and you bet 50% on first bet, 25% on the second an so on. Those values seemed best long term, but in a certain set of spins this might not be true, so I tried with genetic algorithm to find the optimal values and then continue playing for a few spins, did not worked much well. My framework is not much good with those algorithms where it has to be runned several times over same set of spins, I usually save a state to file and then run it again from command line, something like "for i in {1..1000}; do ./run; done", then just ./run and see result in gnuplot.
Title: Re: Neural network bet selectio on even chances.
Post by: mr.ore on Oct 30, 02:07 PM 2011
Quote from: Bayes on Oct 30, 01:59 PM 2011
Also, if you're looking at statistical techniques, Gizmo used to go on about Cluster Analysis (link:://en.wikipedia.org/wiki/Cluster_analysis) a lot. Might be worth a look...

That's what a bottom layer of my neural network does. Similar patterns are assigned a symbol and then top layer learns to fit the symbol to correct reaction. Actually for roulette it would be better just to translate patterns or results to symbols manually and train a better network over that. Because now the network has to learn a) patterns -> symbols, b) symbols -> action and it takes too much time. Advantage is that I can use same code for anything I want without much thinking.
Title: Re: Neural network bet selectio on even chances.
Post by: Roulettebeater on Feb 28, 10:19 AM 2021
Hi M.ORE,

i read with interest your thread, i have solid experience in data analytics and machine Learning.
were you able at the end to get some pecial results from applying NN to roulette ?

looking forward to hear from you