KgBC / just-dice-bot

Hi, this is a flexible betting bot for just-dice.com. Feel free to use it under GPL. If you want to donate some Beer/Satoshis: 1CDjWb7zupTfQihc6sMeDvPmUHkfeMhC83 Thanks. The ACES branch is considered stable, use this if you don't want to develop and do not need latest features: https://github.com/KgBC/just-dice-bot/tree/aces
GNU General Public License v2.0
18 stars 6 forks source link

Simulation mode #22

Closed KgBC closed 10 years ago

KgBC commented 10 years ago

work in progress, simulation mode is on the way!

You will be able to do a fast test of your settings without risking money!

Donate to support me implementing such cool stuff: 1CDjWb7zupTfQihc6sMeDvPmUHkfeMhC83 Thanks!

KgBC commented 10 years ago

basic simulation is working (not uploaded, still testing), I start with 100 BTC balance (so you could read simulation values as %).

It also calculates the time the application would run, so you could basically test a system within minutes as it would run on just-dice for days!

FIXME: reaching NaN fairly fast with good config (which isn't bad, but simulation needs to stop before reaching NAN) :p

That + the upcoming bet database will be a statistical killer feature :)

KgBC commented 10 years ago

testing new simulation fixes - check back soon

geekium commented 10 years ago

Read the python code of this simulation mode. The random number was generated by python. Would be better to generate number base on the "just-dice algorithm". Here's is the algo implement in nodejs: https://github.com/ahdinosaur/just-dice Don't know how to transfer the code to python, hope it would help nonetheless.

geekium commented 10 years ago

P.S. This is a good article on martingale: (part 1 & 2 is enough, part 3,4,5 is blahblah ) http://analyticsjam.com/martingale_1.html http://analyticsjam.com/martingale_2.html

It use excel to test a strategy multiple rounds and multiple times, and then make summary the simulation with x percent to reach target and y percent would go bust, also a histogram is present to see the possible outcome.

with these improvements, the simulation mode is a must have swiss sword to begin with before betting with real BTC.

KgBC commented 10 years ago

https://github.com/ahdinosaur/just-dice is just a visualisation of rolls data contained in a data file, so this is no RNG. For simulation purposes the implemented random algorythm (which uses urandom on linux) is enough, we don't care if anyone tries to break (or predict) the algorithm. I also coded an RNG which passes dieharder tests, but this just isn't necessary here. So I'll go for the fastest and easiest implementation for now :)

I read a lot about martingale, basically it is a very easy thing. It's a very risky thing, that's why the Bot allows variations of Martingale, so that the users can find the strategy that is matching their style best. Saying that, the second link is very interesting, but I currently read over it very quickly. I'll re-read it later and see if we could benefit from the text.

KgBC commented 10 years ago

Think we could close here, basic simulation is working fine in my code. Will be updated in some days.