Bitcoin Forum
April 25, 2024, 10:39:09 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: runMartingale - A martingale-based dice gambling simulator  (Read 1746 times)
Nixtren (OP)
Member
**
Offline Offline

Activity: 78
Merit: 10


View Profile WWW
January 21, 2016, 12:19:10 AM
Last edit: January 24, 2016, 06:16:41 PM by Nixtren
 #1

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!

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 Wink
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714041549
Hero Member
*
Offline Offline

Posts: 1714041549

View Profile Personal Message (Offline)

Ignore
1714041549
Reply with quote  #2

1714041549
Report to moderator
1714041549
Hero Member
*
Offline Offline

Posts: 1714041549

View Profile Personal Message (Offline)

Ignore
1714041549
Reply with quote  #2

1714041549
Report to moderator
1714041549
Hero Member
*
Offline Offline

Posts: 1714041549

View Profile Personal Message (Offline)

Ignore
1714041549
Reply with quote  #2

1714041549
Report to moderator
Sir_lagsalot
Sr. Member
****
Offline Offline

Activity: 392
Merit: 251



View Profile
January 21, 2016, 12:25:47 AM
 #2

Nice! But in the end, we don't need a simulation to tell us that we WILL lose, some time or another  Roll Eyes
dodgecharger
Hero Member
*****
Offline Offline

Activity: 1005
Merit: 500



View Profile
January 21, 2016, 12:50:34 AM
 #3

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.
mtnsaa
Legendary
*
Offline Offline

Activity: 1568
Merit: 1000


View Profile
January 21, 2016, 02:16:54 AM
 #4

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.
Erza
Legendary
*
Offline Offline

Activity: 1078
Merit: 1000


View Profile
January 21, 2016, 05:28:09 AM
 #5

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
adaseb
Legendary
*
Offline Offline

Activity: 3738
Merit: 1708



View Profile
January 21, 2016, 05:34:08 AM
 #6

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 ?

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
Heutenamos
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1000


Act #Neutral,Think y'self as a citizen of Universe


View Profile
January 21, 2016, 06:04:20 AM
 #7

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.

yo
frendsento
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250


View Profile
January 21, 2016, 07:14:09 AM
 #8

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.
NorrisK
Legendary
*
Offline Offline

Activity: 1946
Merit: 1007



View Profile
January 21, 2016, 07:28:54 AM
 #9

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.
Nahl
Legendary
*
Offline Offline

Activity: 1652
Merit: 1000


View Profile
January 21, 2016, 08:01:57 AM
 #10

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
barbara44
Hero Member
*****
Offline Offline

Activity: 2394
Merit: 605


View Profile
January 21, 2016, 10:15:02 AM
 #11

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.
BigMac
Legendary
*
Offline Offline

Activity: 896
Merit: 1000



View Profile
January 21, 2016, 10:46:01 AM
 #12

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.

mtnsaa
Legendary
*
Offline Offline

Activity: 1568
Merit: 1000


View Profile
January 22, 2016, 12:34:08 AM
 #13

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.
Erza
Legendary
*
Offline Offline

Activity: 1078
Merit: 1000


View Profile
January 22, 2016, 04:32:36 AM
 #14

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
zeaderza
Hero Member
*****
Offline Offline

Activity: 896
Merit: 502



View Profile
January 22, 2016, 08:40:40 PM
 #15

A very useful site for those who still use martingale.
You need an infinite amount to win with this strategy.
iv4n
Legendary
*
Offline Offline

Activity: 3122
Merit: 1171



View Profile
January 23, 2016, 12:14:23 AM
 #16

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.

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
Erza
Legendary
*
Offline Offline

Activity: 1078
Merit: 1000


View Profile
January 23, 2016, 03:48:59 AM
 #17

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
davinchi
Legendary
*
Offline Offline

Activity: 2100
Merit: 1058


View Profile
January 23, 2016, 04:54:19 AM
 #18

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. 
Patatas
Legendary
*
Offline Offline

Activity: 1750
Merit: 1115

Providing AI/ChatGpt Services - PM!


View Profile
January 23, 2016, 09:30:04 AM
 #19

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
      }
Nixtren (OP)
Member
**
Offline Offline

Activity: 78
Merit: 10


View Profile WWW
January 23, 2016, 01:53:06 PM
Last edit: January 23, 2016, 04:00:36 PM by Nixtren
 #20

Thanks everyone for the comments Smiley

Edit: Online version is up. Click here 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 Smiley

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 Smiley

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





Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!