Bitcoin Forum
December 11, 2016, 10:16:04 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   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 30865 times)
Sovereign108
Jr. Member
*
Offline Offline

Activity: 56


View Profile
September 05, 2012, 06:17:47 PM
 #61

Well.....forget Powershell, I am using PHP now which I modified and boy is my Bitcoins increasing Smiley
1481451364
Hero Member
*
Offline Offline

Posts: 1481451364

View Profile Personal Message (Offline)

Ignore
1481451364
Reply with quote  #2

1481451364
Report to moderator
1481451364
Hero Member
*
Offline Offline

Posts: 1481451364

View Profile Personal Message (Offline)

Ignore
1481451364
Reply with quote  #2

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

Posts: 1481451364

View Profile Personal Message (Offline)

Ignore
1481451364
Reply with quote  #2

1481451364
Report to moderator
1481451364
Hero Member
*
Offline Offline

Posts: 1481451364

View Profile Personal Message (Offline)

Ignore
1481451364
Reply with quote  #2

1481451364
Report to moderator
1481451364
Hero Member
*
Offline Offline

Posts: 1481451364

View Profile Personal Message (Offline)

Ignore
1481451364
Reply with quote  #2

1481451364
Report to moderator
kano
Legendary
*
Offline Offline

Activity: 1932


Linux since 1997 RedHat 4


View Profile
September 05, 2012, 11:33:02 PM
 #62

I tried that command in powershell and I just get error type mismatch or nothing in square brackets! help?
Thanksa anyway, I got it working!

I am using that Powershell script which I modified and its going great, only thing is that waiting for a confirmation on the received balance takes ages for me so each game lasts a while...
If you do a ./bitcoind listtransactions '*' 1 it will show you the last transaction you received even if it is unconfirmed.
Thus you can see the results of your bets as soon as SD replies ... and lose money way faster Cheesy
Well that's linux, so I guess on windows it may be:
 ./bitcoind listtransactions "*" 1
or even
 ./bitcoind listtransactions * 1

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

Activity: 1106


View Profile
September 06, 2012, 06:35:30 PM
 #63

Well.....forget Powershell, I am using PHP now which I modified and boy is my Bitcoins increasing Smiley

can you explain what initial bet you are making and any other info like most losses in a row or what
have you?
Sovereign108
Jr. Member
*
Offline Offline

Activity: 56


View Profile
September 06, 2012, 07:22:28 PM
 #64

I modified the PHP script to conform to the formulas listed on this forum page. It's supposed to be safer lol. All I did is pushed the numbers from what the R script generated and put it into an array and point the bet variable to that array Smiley. LOL I'll post my script eventually, just testing it atm Tongue

I haven't had any losses for a day tbh. All that happens is a see saw action on my balance but it eventually goes up. My cut off point is just over 1 BTC cos after that the numbers increase exponentially more. My win rate is consistent with the game I am playing 12% at 8x the bet - the statistics I get are surprising similar to the chance of winning a bet. It really is fair!

I have like 36 bets before the cut off point of 1BTC and there always is 1 win Smiley

Well.....forget Powershell, I am using PHP now which I modified and boy is my Bitcoins increasing Smiley

can you explain what initial bet you are making and any other info like most losses in a row or what
have you?
Sovereign108
Jr. Member
*
Offline Offline

Activity: 56


View Profile
September 06, 2012, 08:24:11 PM
 #65

Its like, I won 16 games out of 111 games total for this round and I haven't lost any BTCs! hahaha
fcmatt
Legendary
*
Offline Offline

Activity: 1106


View Profile
September 06, 2012, 08:40:13 PM
 #66

Its like, I won 16 games out of 111 games total for this round and I haven't lost any BTCs! hahaha

I imagine that a loss of close to 1 BTC tho.. makes it very hard to recover from that?
What i mean is that it would take a lot of wins at a small amount to recover that 1 BTC and
get back on the plus side?
Sovereign108
Jr. Member
*
Offline Offline

Activity: 56


View Profile
September 06, 2012, 08:56:16 PM
 #67

Its quite easy to recover 1BTC. The amounts are small only for the first few bets. I try not to do the >2 BTC bets though, thats dangerous territory as it can spiral out of control - it did once for me Sad.
Its like, I won 16 games out of 111 games total for this round and I haven't lost any BTCs! hahaha

I imagine that a loss of close to 1 BTC tho.. makes it very hard to recover from that?
What i mean is that it would take a lot of wins at a small amount to recover that 1 BTC and
get back on the plus side?
exdirrk
Newbie
*
Offline Offline

Activity: 26


View Profile
September 06, 2012, 10:59:03 PM
 #68

I stopped doing the 2x play and started doing the 1.338 on BTC Dice today and instead of doubling you just quadruple.  Start with .025 bets or .1 depending on how brave you are.  I played it for an hour and won 2 bitcoins using .1,.4,1.6,6.4,26.6  @26.6 you would have lost 5 times and the odds of that happening are 1:841.  In the end I did play again and lost .5 bitcoins because I didn't want to wager a bunch but I feel like the risk is less mine.
payb.tc
Hero Member
*****
Offline Offline

Activity: 812



View Profile
September 07, 2012, 12:57:03 AM
 #69

I stopped doing the 2x play and started doing the 1.338 on BTC Dice today and instead of doubling you just quadruple.  Start with .025 bets or .1 depending on how brave you are.  I played it for an hour and won 2 bitcoins using .1,.4,1.6,6.4,26.6  @26.6 you would have lost 5 times and the odds of that happening are 1:841.  In the end I did play again and lost .5 bitcoins because I didn't want to wager a bunch but I feel like the risk is less mine.

try 25.6 next time.
organofcorti
Donator
Legendary
*
Offline Offline

Activity: 1960


Poor impulse control.


View Profile WWW
September 07, 2012, 01:34:51 AM
 #70

Try this strategy with starting bet and multiplier determined by the game odd and the maximum coin you could stand to lose in one go:

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

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

Activity: 56


View Profile
September 07, 2012, 07:54:36 PM
 #71

Ok, I might as well post a modified php script. Its based on this strategy to make it safer to not loose too much btcs. I just hard coded the values for 8x betting to be used for the bets that the R script outputted (check out that link).

Lol I got broke twice now, not playing satoshidice anymore or any other game for that matter :-0

The btcs were increasing, but every so often the house would turn against me, thats the time to give yourself a short break lol

Code:
<?php
require_once('jsonRPCClient.php');
/** BITCOIN **/
$btcu = array("user" => "BitcoinRPC",             // RPC Username
            
"pass" =>   "password",               // RPC Password
            
"host" =>   "127.0.0.1",      // RPC Hostname/IP
            
"port" =>   9332);            // RPC Port
$b = new jsonRPCClient("http://{$btcu['user']}:{$btcu['pass']}@{$btcu['host']}:{$btcu['port']}");

define('MIN_BET'0.05);
define('MAX_BET'2.519995);
define('ADDRESS''1dice6YgEVBf88erBFra9BHf6ZMoyvG88');

$bet_8x=array(0.010562,0.012070,0.013795,0.015765,0.018018,0.020592,0.023533,0.026895,0.030737,0.035128,0.040147,0.045882,0.052436,0.059927,0.068488,0.078272,0.089454,0.102233,0.116838,0.133529,0.152605,0.174406,0.199321,0.227795,0.260337,0.297528,0.340033,0.388609,0.444124,0.507570,0.580081,0.662949,0.757656,0.865893,0.989592,1.130962,1.292528,1.477175,1.688200,1.929371,2.204996,2.519995,2.879994,3.291422);

$total_fees 0;
$count 0;
$count_won 0;
$current_bet_index=0;
$bet $bet_8x[0];
$total_lost=0;
while ((
$bet <= MAX_BET) && ($count_won 200))
{
        
$balance_a $b->getbalance('*'0);
        if (!isset(
$starting_balance)) $starting_balance $balance_a;
        if(
$b->getbalance('*'1) < $bet) { // If we don't have enough confirmed bitcoins to send to satoshi dice...
            
echo "Waiting for confirmed balance";
            while(
$b->getbalance('*'1) < $bet
            {
                echo 
".";
                
sleep(60); // Wait a full minute before checking the balance again.
            
}
            echo 
"\n";
        }
    
try // Wrapped in a try catch block just incase we run out of cash.
        
{
            
$b->sendtoaddress(ADDRESS, (float) $bet);
    
}
        catch(
Exception $e
        {
            echo 
"Have: " $b->getbalance('*'1) . " Needed: " $bet "\n";
    
die("Ran out of money?\n");
    
}
        
$balance_b $b->getbalance('*'0);
        
$count++;
        
$fee $balance_a $balance_b $bet;
        
$total_fees += $fee;
        
$total_fees number_format($total_fees,8,'.','')+0;

        echo 
'Game #'.$count."---------------------------------------------\n";
        echo 
"\n".'Balance:                ' $balance_a."";
        echo 
"\n".'Bet Amount Sent:        -'$bet."";
        echo 
"\n".'Fee:                    -'. (number_format($fee8'.''') +0) . "";
        echo 
"\n".'Total Fees:             -'$total_fees"";
        echo 
"\n".'Balance after bet sent: ' $balance_b "       ".'Waiting';

        
$balance_c 0;

        while (
$balance_b >= $balance_c)
        {
        sleep(4);
$balance_c $b -> getbalance('*'0);
echo '.';
        }

        echo 
"\nNew Balance:            $balance_c";

        
$diff $balance_c $balance_b;

        if (
$diff $bet)
        {
                
$bet $bet_8x[0];
                
$current_bet_index=0;
                
$count_won++;
                echo 
"\n*****Win!*****           (Won $count_won out of $count games)";
                echo 
"\nTotal lost:             ".$total_lost."";
                echo 
"\nProfit made:            ".$diff."";
                
$net_profit=$diff-$total_lost;
                echo 
"\n"."Net profit:             ".$net_profit."\n";
                
$total_lost=0;
        }
        else
        {
                echo 
"\n".'_____Lose!_____'."";
                
$total_lost += $balance_a-$balance_c;
                echo 
"\nTotal lost:             ".$total_lost."\n";
                
$bet $bet_8x[$current_bet_index++];
        }

        echo 
"\n";
}

echo 
'Starting Balance: '.$starting_balance."\n";
echo 
'Ending Balance: '$balance_c."\n";
echo 
'Total Fees: '$total_fees."\n";
$amt_won $balance_c $starting_balance;
echo 
'Net Profit: '. (number_format($amt_won,8,'.','') + 0). "\n\n";
?>

fcmatt
Legendary
*
Offline Offline

Activity: 1106


View Profile
September 07, 2012, 08:20:22 PM
 #72

as another poster mentioned the only way to truly win at SD is not to play.
the end result of playing constantly will always be to lose. the math says so.

it is not like blackjack where you have a chance to increase your odds of winning
depending on the type/rules of table you are playing at.

i will admit I have played around with SD by making a few bets (very tiny and I am up, fyi)
but if you sit back and think about the game... eh... the more I play the more I will likely
lose. There is no skill to it. Every bet stands alone and does not influence the next. etc...

On the flip side, SD represents better odds then the majority of casino games. So that is
a plus.

But who will create a gambling site where some skill is involved or offers a 50-50 bet?
Probably no one. If skill is involved only skilled players will end up playing. If 50-50 odds
the site will never make any profit.

gambling.. heh. might as well play the stock market.
Sovereign108
Jr. Member
*
Offline Offline

Activity: 56


View Profile
September 07, 2012, 08:58:17 PM
 #73

Yea! You have better chance with the stock markets with Apple Cheesy
exdirrk
Newbie
*
Offline Offline

Activity: 26


View Profile
September 07, 2012, 09:02:05 PM
 #74

I stopped doing the 2x play and started doing the 1.338 on BTC Dice today and instead of doubling you just quadruple.  Start with .025 bets or .1 depending on how brave you are.  I played it for an hour and won 2 bitcoins using .1,.4,1.6,6.4,26.6  @26.6 you would have lost 5 times and the odds of that happening are 1:841.  In the end I did play again and lost .5 bitcoins because I didn't want to wager a bunch but I feel like the risk is less mine.

try 25.6 next time.


Good catch
SNS
Full Member
***
Offline Offline

Activity: 136



View Profile
October 05, 2012, 10:56:10 PM
 #75

Is it possible to convert these bots for blockchain.info wallet?

dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
October 06, 2012, 01:30:06 AM
 #76

Is it possible to convert these bots for blockchain.info wallet?

Yes.

The blockchain.info wallet provides an API, so it would be relatively easy to modify them (or pay someone else to modify them) to interact with that API rather than using the satoshi client.

chrcoe01
Full Member
***
Offline Offline

Activity: 147


View Profile
October 08, 2012, 08:05:38 PM
 #77

i like the idea of this, but feel a bit iffy actually putting it to use

"You may delay, but time will not, and lost time is never found again." -Benjamin Franklin
dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
October 09, 2012, 12:57:40 AM
 #78

i like the idea of this, but feel a bit iffy actually putting it to use

Iffy like it's cheating to use a bot to play?  It's not - the site won't mind at all.

Or iffy like it's going to lose all the bitcoins you let it play it?  It will, eventually.

chrcoe01
Full Member
***
Offline Offline

Activity: 147


View Profile
October 09, 2012, 01:16:38 PM
 #79

the second one, I was using the strategy in the thread about 'how to last longer' and it works really well, until your luck runs out Cheesy

but that was without the script and I noticed every once in awhile the transaction fee would go up if I didn't have enough confirmed coins obviously, so I would go do something else for awhile and come back, does this script check for that?

EDIT: i went back and re-read the code samples here and it looks like they take into consideration unconfirmed coins which would make the fee go up I think (?)

I was also wondering about the blockchain idea so I can screw around with it from work, I may do that in my spare time.  It seems like they have an api that works with bitcoind so you would just point your script to blockchain.info with your identifier (not the shortlink) and the password along with port 443 instead of localhost and it might work the same.

I have yet to actually try it because all my wallet stuff is at home and I don't have any coins in my blockchain account so don't quote me Cheesy

"You may delay, but time will not, and lost time is never found again." -Benjamin Franklin
dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
October 10, 2012, 04:52:55 AM
 #80

[...] don't quote me Cheesy

OK.   Wink

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!