Bitcoin Forum

Economy => Gambling => Topic started by: Nixtren on January 21, 2016, 12:19:10 AM



Title: runMartingale - A martingale-based dice gambling simulator
Post by: Nixtren on January 21, 2016, 12:19:10 AM
runMartingale

Nixtren presents an open-source martingale-based dice gambling simulator. With this script you can simulate (get final results) playing traditional martingale without wasting any real money.

Now available online. Click here to try it! (https://nixtren.net/bitcoin/runMartingale/)

Usage: php runMartingale.php base_bet balance bets [rounds]

Quote
php runMartingale.php 0.0001 0.10 1000 (0.0001 base bet, 0.10 starting balance and 1000 bets)

Array
(
    [expectedBets] => 1000
    [betsTaken] => 265
    [balance] => 0.01100000
    [profit] => -0.08900000
    [lossStrike] => 10
)

php runMartingale.php 0.0001 0.10 1000 5 (0.0001 base bet, 0.10 starting balance and 5 rounds of 1000 bets each; the output is the profit made)

0.05340000
-0.04900000
0.04980000
-0.08730000
0.05250000

The script relies on PHP's mt_rand() function to perform generation of pseudorandom dice values.

I built this script because I wanted to perform some simulations before actually start to gamble with martingale. If you currently gamble and use the martingale strategy this script will help you get an idea if you will succeed or not. If you perform a simulation with enough bets (try a million bets) you will realize that you will always end losing no matter what. The only thing you don't know is when, so don't blame me for any losses.

The source-code for the script can be found on the official GitHub repository. Hack it, sell it, love it:
https://github.com/Nixtren/runMartingale (It seems the indentation of the script got messed up on GitHub, ignore that fact)

I know some of you are not very geeky people, so if you're running Windows and don't have PHP installed I have made a quick .zip for you to get started without trouble:
https://github.com/Nixtren/runMartingale/releases/tag/v0.0.1%2Bphp

If you find this useful, please consider buying me a cookie:
13vT1T1vsLHsJRnWjRVzSmAkzGNWsfQWRi

Enjoy folks ;)


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: Sir_lagsalot on January 21, 2016, 12:25:47 AM
Nice! But in the end, we don't need a simulation to tell us that we WILL lose, some time or another  ::)


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: dodgecharger on January 21, 2016, 12:50:34 AM
Actually many gamblers have tried this strategy, they know it and will never win over the house. Many ppl probably don't bother to try it or don't know how to start. Why not build a web page for us to try it if you have your own website? So it will not be costy for you.


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: mtnsaa on January 21, 2016, 02:16:54 AM
Martingale can still be used if you want to try it for a small period of time, not for hours. You may encounter a nice streak and cash out without the huge risk of losing it all at the first bet. The problem lime others have said is that if you are a serious gambler, the house edge will get you eventually.


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: Erza on January 21, 2016, 05:28:09 AM
What is the point of making martingale simulator if in the end you are still losing? In a short run may be you can apply on this but long run mostly you will lose everything unless you have huge bankroll and you bet with small base bet may be it can still cover but it really takes time to get some profit


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: adaseb on January 21, 2016, 05:34:08 AM
So how can I run this without installing a debugger? Can I just put it in an HTML file and redirect that file to open the PHP on my hard drive ?


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: Heutenamos on January 21, 2016, 06:04:20 AM
There is no use if you come up with 200 pages theory or script ,the edge will get you a 100 % chance to lose at the end.Though luck could change it but not statistics/methods.


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: frendsento on January 21, 2016, 07:14:09 AM
i think this theory will only mislead users when gambling there is no perfect starategy that will work for everyone and guarantee sure winnings. and besides this strategy will only lead you to a big loss in a long run.so i advice to everyone to use this strategy at your own risk and be responsible enough.


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: NorrisK on January 21, 2016, 07:28:54 AM
i think this theory will only mislead users when gambling there is no perfect starategy that will work for everyone and guarantee sure winnings. and besides this strategy will only lead you to a big loss in a long run.so i advice to everyone to use this strategy at your own risk and be responsible enough.

I tried the martingale strategy for the first time yesterday and ran into exactly the problem you are describing. I tried it with a low number of coins though, luckily.

I managed to increase my holdings 8 fold by using this strategy, before going on a 11 loss streak, making my 12th bet impossible, losing almost all my gains in one go.

Than i stupidly decided to go double or nothing and lost all.. Should've started the trick again while still being almost 2.5 times ahead of my initial stash.


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: Nahl on January 21, 2016, 08:01:57 AM
martingale is martingale no one can change it and i had been try this strategy many times but unfortunately my bets result always be lost


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: barbara44 on January 21, 2016, 10:15:02 AM
martingale is martingale no one can change it and i had been try this strategy many times but unfortunately my bets result always be lost

right me too, no matter what and how much with whichever strategy I bet, I always end up with a loss.


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: BigMac on January 21, 2016, 10:46:01 AM
There is no use if you come up with 200 pages theory or script ,the edge will get you a 100 % chance to lose at the end.Though luck could change it but not statistics/methods.

This is the exact reason I think why the simulator could be useful. There are some firm believers of martingale out there, thinking that it is impossible to have a long losing streak. With such a simulator, they could see the truth themselves before deciding to gamble their money away.


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: mtnsaa on January 22, 2016, 12:34:08 AM
There is no use if you come up with 200 pages theory or script ,the edge will get you a 100 % chance to lose at the end.Though luck could change it but not statistics/methods.

This is the exact reason I think why the simulator could be useful. There are some firm believers of martingale out there, thinking that it is impossible to have a long losing streak. With such a simulator, they could see the truth themselves before deciding to gamble their money away.

Interesting take. Like I said, if you are a very casual gambler it's worth a try. I got lucky and stopped the script (it's a different one and a different game) when I was ahead. It ran for 5-10 minutes. Of course I didn't try it again, so you get the idea why it worked hehe.

I would definitely try this if you have some loose change or something from a giveaway and want to get more out of it (and don't mind losing it all). For me martingale is a better strategy than going "all in", it gives you more options in a much more controlled environment. But we all agree that in the end, the house always have the upper hand.


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: Erza on January 22, 2016, 04:32:36 AM
There is no use if you come up with 200 pages theory or script ,the edge will get you a 100 % chance to lose at the end.Though luck could change it but not statistics/methods.

This is the exact reason I think why the simulator could be useful. There are some firm believers of martingale out there, thinking that it is impossible to have a long losing streak. With such a simulator, they could see the truth themselves before deciding to gamble their money away.

No. I think with simulator more people will decide to gambling using some big amount of money. Simulator is just use for how many losing streak that someone will get with X bankroll so they will anticipate this thing by deposit some money and start rolling. You just need to set your balance and your basebet well to start using martingale and simulator is just some source of help and it just take some little part on it


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: zeaderza on January 22, 2016, 08:40:40 PM
A very useful site for those who still use martingale.
You need an infinite amount to win with this strategy.


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: iv4n on January 23, 2016, 12:14:23 AM
A very useful site for those who still use martingale.
You need an infinite amount to win with this strategy.

Even with infintive amount u have max bet on many dice sites. So infinte betting is not working for sure, on one moment house will not let u to double the bet cause its higher then max bet, simply.
Everyone who play dices know martingale is not working on long run, so this simulators are probably just some trick. Nothing more.


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: Erza on January 23, 2016, 03:48:59 AM
A very useful site for those who still use martingale.
You need an infinite amount to win with this strategy.

There is no way you could have infinite amount to play. Because of the house edge you will still lose it in a long run. Keep that in mind because "infinite bankroll" thing is never exist in this world. And each site have max bet that they can accept so there is no way you could keep using martingale until the end


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: davinchi on January 23, 2016, 04:54:19 AM
A very useful site for those who still use martingale.
You need an infinite amount to win with this strategy.

Yes, the infinite bankroll and the winning in gambling are still a dream to most of the gamblers here. May be, sometimes you may win with Martingale if your luck favors you. Otherwise it would be too hard to beat the house edge. Basically it's as simple as your luck v/s house edge. 


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: Patatas on January 23, 2016, 09:30:04 AM
I will fork the script from the Gh account later but look at this :
while($betsTaken < $bets)
   {
      $betsTaken++;
/*Why to increment the bets taken ? Shouldn't it be $betsTaken+=$bets ?
      $balance_ = bcsub($balance, $currentBet); // Take bet amount from balance
/*Mind making the statement recursive?
      if($balance_ < 0)
      {
         break; // No more money to bet, abort
      }


Title: Re: runMartingale - A command-line martingale-based dice gambling simulator
Post by: Nixtren on January 23, 2016, 01:53:06 PM
Thanks everyone for the comments :)

Edit: Online version is up. Click here (https://nixtren.net/bitcoin/runMartingale/) to visit it!

Actually many gamblers have tried this strategy, they know it and will never win over the house. Many ppl probably don't bother to try it or don't know how to start. Why not build a web page for us to try it if you have your own website? So it will not be costy for you.

Looks like you're right. I'm going to build a basic web page so people can try without downloading :)

This is the exact reason I think why the simulator could be useful. There are some firm believers of martingale out there, thinking that it is impossible to have a long losing streak. With such a simulator, they could see the truth themselves before deciding to gamble their money away.

That's the exact reason why I built this simulator. I wanted to see what would happen if I ran martingale with 1 satoshi base bet (and around 0.05 BTC of starting balance). Well, I would lose everything sooner or later :)

For those thinking "this simulator is a trick and will only induce people to use martingale", you're wrong. This simulator is to see that they can lose their money quite easily. I wanted to see that with my own eyes as well, hence the simulator was built.


Whatever is written after this line is only meant to developers.


I will fork the script from the Gh account later but look at this :
while($betsTaken < $bets)
   {
      $betsTaken++;
/*Why to increment the bets taken ? Shouldn't it be $betsTaken+=$bets ?
      $balance_ = bcsub($balance, $currentBet); // Take bet amount from balance
/*Mind making the statement recursive?
      if($balance_ < 0)
      {
         break; // No more money to bet, abort
      }

Quote
Why to increment the bets taken ? Shouldn't it be $betsTaken+=$bets ?
$betsTaken is increased after each bet. $betsTaken++ increases the variable $betsTaken by 1. It shouldn't be $betsTaken+=$bets, with your logic you would get something like this:
Quote
1
2
4
8
16
32
64
Instead of:
Quote
1
2
3
4
5
6
$betsTaken is not the bet amount. It's just a variable that stores how many bets we had so far.

Quote
Mind making the statement recursive?
I'm not quite understanding what you mean. The following line will stop the simulation:
Code:
break; // No more money to bet, abort







Title: Re: runMartingale - A martingale-based dice gambling simulator
Post by: BitLegit.com on January 25, 2016, 08:11:00 AM
cool.  thanks, finding this useful


Title: Re: runMartingale - A martingale-based dice gambling simulator
Post by: BitBatFan on February 19, 2016, 07:12:29 PM
Nice calculator will try my strategies with it before going live. Thanks!


Title: Re: runMartingale - A martingale-based dice gambling simulator
Post by: Nixtren on February 20, 2016, 01:01:18 AM
Thanks everyone for the comments! :)

Once I get enough free time I will be releasing the successor of runMartigale, which will allow you to perform simulations with your own strategy (e.g.: increase bet on win, increase bet on loss and the ability to code by hand your strategy script so you can use more advanced stuff). I took that idea from DiceBot (https://github.com/Seuntjie900/DiceBot).

If you know how to code PHP and would like to contribute to this open-source project feel free to drop me a message ;)