Bitcoin Forum
December 05, 2016, 12:45:29 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 6 [7] 8 »  All
  Print  
Author Topic: PHP martingale bot for satoshiDICE  (Read 30833 times)
dooglus
Legendary
*
Offline Offline

Activity: 1988



View Profile
February 06, 2013, 11:20:16 AM
 #121

nope that's old-fashioned and against modern recommendations

pretty much any php parser will work just fine without a closing ?> at the end of the file, and leaving it off the end of the file makes it less likely you'll accidentally introduce unwanted whitespace in the output.

I didn't know that.  Thanks!

1480941929
Hero Member
*
Offline Offline

Posts: 1480941929

View Profile Personal Message (Offline)

Ignore
1480941929
Reply with quote  #2

1480941929
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480941929
Hero Member
*
Offline Offline

Posts: 1480941929

View Profile Personal Message (Offline)

Ignore
1480941929
Reply with quote  #2

1480941929
Report to moderator
Gyrsur
Legendary
*
Offline Offline

Activity: 1498


#BEL+++++


View Profile WWW
February 06, 2013, 12:16:09 PM
 #122

you cannot successfully play SD with logic or a script. forget to play with this!

to beat SD you have to play with illogicalness. this is where the fear of SD comes from!

http://blockchain.info/tx/9784cb364ffbaa000bbb5574ec6a50c9f500c9df830cf89d3cd90318bd7225dc --> WIN

EDIT: http://blockchain.info/tx/9b446789a58501a84767f0ad87013982aec870048b40cc895fc3fde0c56af37a --> WIN

EDIT2: http://blockchain.info/tx/812bdb3cc7e620e38e1fdee74361d58c1c860e3d2b2b7a7ee3c37047e2157a8c --> LOSE

So, what next? Buy bitcoins to feed the SD monster with 20.48 --> 40.96 --> 81.92?? NO WAY!! DON'T FEED THE SD MONSTER. IT IS WASTE OF TIME.

^^update

dooglus
Legendary
*
Offline Offline

Activity: 1988



View Profile
February 06, 2013, 07:57:46 PM
 #123

So, what next? Buy bitcoins to feed the SD monster with 20.48 --> 40.96 --> 81.92?? NO WAY!! DON'T FEED THE SD MONSTER. IT IS WASTE OF TIME.

I think we all realise that there's no way to guarantee a win at satoshidice, and that the longer you play, the more likely you are to make a loss.  It can be fun/exciting/scary to use Martingale betting, but of course you should never risk more than you can afford to lose, because you might end up losing everything you bet.

KJTetc
Newbie
*
Offline Offline

Activity: 24


View Profile
February 06, 2013, 08:01:56 PM
 #124

Using your script, localhost as allowed ip in conf. Running from command line. Still get that http error Sad



I don't think that will work as when I just run it for 30 seconds I get a repeat of this once it's done

Warning: fopen(http://...@127.0.0.1:8332/): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in C:\xampp\htdocs\jsonRPCClient.php on line 132

Run the script on the command line:

  php bot.php

not from a web server.

Try using my script and the json-rpc PHP file that's with it.  It has better error handling.

  https://github.com/dooglus/sdbot
dooglus
Legendary
*
Offline Offline

Activity: 1988



View Profile
February 08, 2013, 01:47:06 AM
 #125

Using your script, localhost as allowed ip in conf. Running from command line. Still get that http error Sad

I PM'ed him, used TeamViewer to diagnose the problem.  Turned out he had two copies of the script, and was running an old copy while editing the new copy.  Running the new copy showed straight away that his wallet was encrypted and locked.

I modified the script so it prompts for a passphrase, but my Windows skills are weak, and apparently it didn't work.  So I guess he either ended up unlocking his wallet manually or hardcoding the passphrase into the script.

The last I heard from him:
  "[11:31:16 PM] made a whole bitcoin tonight!!"

Smiley

I made a few other changes to the script. like adding the option to set constant starting and stopping bet sizes, rather than using a percentage of your balance, and stopping if a certain file exists.

  http://github.com/dooglus/sdbot

payb.tc
Hero Member
*****
Offline Offline

Activity: 812



View Profile
February 08, 2013, 01:49:54 AM
 #126

The last I heard from him:
  "[11:31:16 PM] made a whole bitcoin tonight!!"

hopefully that's not "the last we hear from him" Cheesy

quit while you're ahead KJ!
KJTetc
Newbie
*
Offline Offline

Activity: 24


View Profile
February 08, 2013, 05:20:11 AM
 #127

Made 2.46 bitcoin in total. I think I'm done gambling forever!



The last I heard from him:
  "[11:31:16 PM] made a whole bitcoin tonight!!"

hopefully that's not "the last we hear from him" Cheesy

quit while you're ahead KJ!

maomao
Member
**
Offline Offline

Activity: 84


View Profile
February 13, 2013, 10:41:21 AM
 #128

  Can you  add a feature, to the results of the past N bets, If greater than a certain threshold, and suspended for 10 minutes



Rampion
Legendary
*
Offline Offline

Activity: 1078


View Profile
February 13, 2013, 10:47:15 AM
 #129

You cannot escape the house edge. Never.

http://www.goodbonusguide.com/casino-articles/roulette-systems-destroying-the-martingale-theory-myth.html

maomao
Member
**
Offline Offline

Activity: 84


View Profile
February 13, 2013, 05:36:36 PM
 #130

Code:
function get_result($mode, $bet_txid, $game_name)
{
unset($r);
$jsonurl = "http://satoshiroulette.com/log.api.php?txid=$bet_txid&mode=$mode";

while(! isset($r->{$game_name}) )
{
$json = file_get_contents($jsonurl);
$r = json_decode($json);
if(isset($r->{$game_name}))
{
$result = $r->{$game_name};
}
print ".";
$s = rand($GLOBALS['sleep'], $GLOBALS['sleep_max']);
sleep($s);
}
return $result;
}

 like the example above,can we  query to result directly from the satoshidice website.

$jsonurl = "http://www.satoshidice.com/lookup.php?tx=$bet_txid&limit=250&min_bet=0&status=ALL&format=json";


dooglus
Legendary
*
Offline Offline

Activity: 1988



View Profile
February 13, 2013, 09:21:45 PM
 #131


Well, if you play long enough, your losses will get arbitrarily close to the house edge.

But if you only play a few times you can end up making a profit.

The guy who only ever makes one bet and doubles his stake has "escaped the house edge", hasn't he?

dooglus
Legendary
*
Offline Offline

Activity: 1988



View Profile
February 13, 2013, 09:29:48 PM
 #132

Can you  add a feature, to the results of the past N bets, If greater than a certain threshold, and suspended for 10 minutes

Can you be a bit clearer please?  You want it to pause when it's won a certain amount in the last so many bets?  Is that net win?  Like suppose we start at 1 BTC, we lose a bunch, doubling up each time, the last N=3 bets were 64, 128, and 256, and only the 256 won, does that count as a win of 64?  Because it's really only a win of about 1 BTC.  And what's with the weird quoting?  Gyrsur and myself didn't say any of that stuff...

like the example above,can we  query to result directly from the satoshidice website.

That's a good idea.  I'll add both when I need a break from 'real work'.  Smiley

Rampion
Legendary
*
Offline Offline

Activity: 1078


View Profile
February 13, 2013, 10:48:58 PM
 #133


Well, if you play long enough, your losses will get arbitrarily close to the house edge.

But if you only play a few times you can end up making a profit.

The guy who only ever makes one bet and doubles his stake has "escaped the house edge", hasn't he?

I assume that the purpose of a bot is to play long enough.

organofcorti
Donator
Legendary
*
Offline Offline

Activity: 1946


Poor impulse control.


View Profile WWW
February 13, 2013, 10:59:45 PM
 #134


Well, if you play long enough, your losses will get arbitrarily close to the house edge.

But if you only play a few times you can end up making a profit.

The guy who only ever makes one bet and doubles his stake has "escaped the house edge", hasn't he?

I assume that the purpose of a bot is to play long enough.

No, anyone using a bot is likely to have played too long. The longer you play, the more likely your luck tends to expected, and the vloser you tend to get to a loss equating to the house edge. That's just rephrasing what dooglus wrote.

It boils down to: the longer you martingale, the more likely your winnngs are to be a range that can be mathematically described as follows:

Code:
lost your shirt <  earnings <  (1 - house edge) * amount you bet

Bitcoin network and pool analysis 12QxPHEuxDrs7mCyGSx1iVSozTwtquDB3r
follow @oocBlog for new post notifications
SRoulette
Sr. Member
****
Offline Offline

Activity: 364



View Profile WWW
February 14, 2013, 05:46:41 AM
 #135

replying here as this bot was our direct inspiration for our own (and even the reason we chose php).

https://bitcointalk.org/index.php?topic=142326.0

Great work btw Smiley

Rampion
Legendary
*
Offline Offline

Activity: 1078


View Profile
February 14, 2013, 08:25:30 AM
 #136


Well, if you play long enough, your losses will get arbitrarily close to the house edge.

But if you only play a few times you can end up making a profit.

The guy who only ever makes one bet and doubles his stake has "escaped the house edge", hasn't he?

I assume that the purpose of a bot is to play long enough.

No, anyone using a bot is likely to have played too long. The longer you play, the more likely your luck tends to expected, and the vloser you tend to get to a loss equating to the house edge. That's just rephrasing what dooglus wrote.

It boils down to: the longer you martingale, the more likely your winnngs are to be a range that can be mathematically described as follows:

Code:
lost your shirt <  earnings <  (1 - house edge) * amount you bet


The longer you martingale, the more likely you will lose enough times in a row to loose all your money. Bets grow exponentially, money is not infinite.

Unless you have 50 billion... But then why would you Martingale just to double the first bet? It's kinda stupid to bet, let's say 512 BTC (cumulative bet 1023 BTC), to win only 1 BTC.

gweedo
Legendary
*
Offline Offline

Activity: 1246


Java, PHP, HTML/CSS Programmer for Hire!


View Profile WWW
February 14, 2013, 08:30:42 AM
 #137

replying here as this bot was our direct inspiration for our own (and even the reason we chose php).

https://bitcointalk.org/index.php?topic=142326.0

Great work btw Smiley

I guess you guys didn't know how nested while loops work cause you just have one loop that is infinite LOL

Want to earn 2500 SATOSHIS per hour? Come Chat and Chill in https://goseemybits.com/lobby
dooglus
Legendary
*
Offline Offline

Activity: 1988



View Profile
February 14, 2013, 07:29:51 PM
 #138

Unless you have 50 billion... But then why would you Martingale just to double the first bet? It's kinda stupid to bet, let's say 512 BTC (cumulative bet 1023 BTC), to win only 1 BTC.

Actually, if I have 1023 BTC and need 1024 BTC, it's about 100 times more cost effective to bet 1 BTC and martingale up to 512 than it is to bet the whole 1023 BTC on a '1-in-1023' bet (if such a thing existed).

Of course, both strategies are a bad idea - you can expect to lose on average.  But you can expect to lose 100 times less on average if you do a sequence of up to 10 martingale bets than if you make a single large bet.

juve4v
Hero Member
*****
Offline Offline

Activity: 506


View Profile
March 01, 2013, 08:11:12 PM
 #139

I have one question: Could it be possible for the bot to acces the real time bets as they appear on "recent" tab on sd site, or at least  last bet, check the number and bet only if x > y , where y is "no less than  number we play.
For example I want to only play : Less that 32768 which is 50%, for a fixed amount but I want the bot to check last number on recent tab and if that number is > 32768 alow to bet,  if it is < 32768 stop and wait till next number is greater than 32768 then play.So could this be made possible?
I know its a bit out of this topic but it is /can be connected to it.
kano
Legendary
*
Offline Offline

Activity: 1918


Linux since 1997 RedHat 4


View Profile
March 01, 2013, 08:55:22 PM
 #140

I have one question: Could it be possible for the bot to acces the real time bets as they appear on "recent" tab on sd site, or at least  last bet, check the number and bet only if x > y , where y is "no less than  number we play.
For example I want to only play : Less that 32768 which is 50%, for a fixed amount but I want the bot to check last number on recent tab and if that number is > 32768 alow to bet,  if it is < 32768 stop and wait till next number is greater than 32768 then play.So could this be made possible?
I know its a bit out of this topic but it is /can be connected to it.
Lulz - funny Smiley
History doesn't affect the next bet Tongue

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
Pages: « 1 2 3 4 5 6 [7] 8 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!