Author

Topic: Looking for someone to write me a Satoshidice script (Read 1689 times)

full member
Activity: 203
Merit: 100
Quote
I wrote a quick little C++ program once to test the Martingale strategy in roulette though I did not know it was the Martingale method, just thought of it on my own.

It came out as would be expected. It would do well for a while and then hit that odd streak of hitting all red or black many times in a row pushing my bet up over a million dollars before changing back to the other color.

This lead me to the conclusion that it is like playing the anti-lottery. Where you bet millions of dollars in the hopes of winning a dollar. The odds are in your favor that you will win a dollar almost every time. But, just like the lottery, eventually the numbers could hit. And instead of winning a dollar you lose your millions.
Well yeah, this is like Wikipedia stuff. You should have probably done some research on it first. On the other hand, personal experience is always priceless.
legendary
Activity: 3598
Merit: 2386
Viva Ut Vivas
I wrote a quick little C++ program once to test the Martingale strategy in roulette though I did not know it was the Martingale method, just thought of it on my own.

It came out as would be expected. It would do well for a while and then hit that odd streak of hitting all red or black many times in a row pushing my bet up over a million dollars before changing back to the other color.

This lead me to the conclusion that it is like playing the anti-lottery. Where you bet millions of dollars in the hopes of winning a dollar. The odds are in your favor that you will win a dollar almost every time. But, just like the lottery, eventually the numbers could hit. And instead of winning a dollar you lose your millions.
hero member
Activity: 728
Merit: 500
I posted this in another thread:

Heres a monte carlo simulator written in R. Personally I like tripling the bet each time, transferring out winnings once they reach a certain level then starting again. The thing with martingales is you are bound to lose eventually if you follow it strictly:



Code:

#install.packages("Rlab") # Run First Time
require(Rlab) #used for bernouilli distribution function rbern()

####Settings
#General
live.plot=F   #Watch Simulation Live (runs slower)
max.bets<-1000 #Number of Bets to End Simulation
iterations<-1000 #Number of Simulations to Run
fee<-.0005 #Transaction Fee

#Bet Strategy and Satoshi Dice options
Win.Odds<-.5 #Odds of Winning
Price.Multiplier<-1.957 #Multiple of Bet Payed on Win
max.bet.size<-500 #Maximum Allowed Size of Bet
start.wallet<-10 #Starting Funds
lose.multiplier<-2 #Multiple of losing bet size to use for following bet
#End Settings

##Calulate Bet Sizes and Payouts
bet.num<-1:20
bet.size<-.01*lose.multiplier^(bet.num-1)
bet.size[which(bet.size>max.bet.size)]<-max.bet.size

win.size<-Price.Multiplier*.01*lose.multiplier^(bet.num-1)-fee
win.size[which(win.size>Price.Multiplier*max.bet.size)]<-Price.Multiplier*max.bet.size-fee



###Highest Density Interval Calculator Function (for the charts)
get.HDI<-function(sampleVec,credMass){
  sortedPts = sort( sampleVec )
  ciIdxInc = floor( credMass * length( sortedPts ) )
  nCIs = length( sortedPts ) - ciIdxInc
  ciWidth = rep( 0 , nCIs )
  for ( i in 1:nCIs ) {
    ciWidth[ i ] = sortedPts[ i + ciIdxInc ] - sortedPts[ i ]
  }
  HDImin = sortedPts[ which.min( ciWidth ) ]
  HDImax = sortedPts[ which.min( ciWidth ) + ciIdxInc ]
  HDIlim = c( HDImin , HDImax, credMass )
  return( HDIlim )
}
####


######Run Simulation
if(live.plot==T){
  dev.new()
}

out2=NULL
pb<-txtProgressBar(min = 0, max = iterations, initial = 0,style = 3)
for(j in 1:iterations){
  
  wallet<-start.wallet
  i<-1
  t<-1
  run.result=NULL
  while(wallet>0 & t<=max.bets){
    result<-rbern(1,Win.Odds)
    if(result==0){
      wallet<-wallet-bet.size[i]
      color="Red"
      i<-i+1
    }
    
    if(result==1){
      wallet<-wallet-bet.size[i]+win.size[i]
      color="Green"
      i<-1
    }
    
    if(wallet>0){
      t<-t+1
      run.result<-rbind(run.result,cbind(j,t,wallet,i))
    }
    
    if(live.plot==T){
      plot(run.result[,2],run.result[,3],
           xlab="Bet Number", ylab="Coins in Wallet",
           col=color,
           main=paste("Simulation #",j)
      )
    }
  }
  
  out2<-rbind(out2,run.result)
  setTxtProgressBar(pb, j)
}
close(pb)
#End Simulation


####Get Results
winning.iterations<-out2[which(out2[,2]==max.bets),1]
perc.wins<-100*length(which(out2[,2]==max.bets))/iterations
win.wallets<-out2[which(out2[,2]==max.bets),3]
hdi<-get.HDI(win.wallets,.95)

win.mode<-density(win.wallets)$x[
    which(density(win.wallets)$y==
      max(density(win.wallets)$y)
    )]

fail.timepoints=matrix(nrow=(iterations-length(win.wallets)),ncol=1)
r<-1
for(i in 1:iterations){
  temp<-out2[which(out2[,1]==i),]
  if(max(temp[,2])    fail.timepoints[r]<-max(temp[,2])
r<-r+1
  }
}

####Plot Results
dev.new()
layout(matrix(c(1,1,2,3),nrow=2,ncol=2,byrow=2))

#Plot Simulation Results
plot(0,0,type="n",
     xlab="Bet Number", ylab="Coins in Wallet",
     xlim=c(0,max(out2[,2])),ylim=c(0,max(out2[,3])),
     main=c(paste("Starting Funds=", start.wallet, "  Win Odds=", Win.Odds),
            paste("Bet Multiplier After Loss= ",lose.multiplier,"x",sep=""),
            paste("Maximum # of Bets=",max.bets, "  # of Simulations=",iterations))
)
for(i in 1:iterations){
  if(i %in% winning.iterations){
    temp<-out2[which(out2[,1]==i),]
    lines(temp[,2],temp[,3],col=rgb(0,1,0,.1))
  }else{
    temp<-out2[which(out2[,1]==i),]
    lines(temp[,2],temp[,3],col=rgb(1,0,0,.1))
  }
}

#Plot Distribution of non-zero Winnings
hist.counts<-hist(win.wallets, col="Green",
                  xlab="Final Wallet Amount",
                  breaks=seq(0,(max(win.wallets)+max(win.wallets)/10),by=max(win.wallets)/10),
                  main=c(paste("Percent of Winning Simulations=",perc.wins, "%"),
paste("Mode=",round(win.mode,2), "  Mean=",round(mean(win.wallets),2))
),
                  sub=paste(round(100*hdi[3],3), "%", "HDI (Lower,Upper):",round(hdi[1],1),",",round(hdi[2],1))
)$count
rect(hdi[1],0,hdi[2],.025*max(hist.counts),col="Black")

#Plot Distribution of when Bankruptcy Occurred
hist(fail.timepoints, col="Red",
     breaks=seq(0,(max(fail.timepoints)+max(fail.timepoints)/10),by=max(fail.timepoints)/10),
     xlab="Bet Number at Bankruptcy",
     main="Bet Number at Bankruptcy")




if you just download R and mess with the settings at the top of the script you can simulate the outcomes of various strategies. It won't automate the betting for you though.

If it makes  you some money:
17FB1kKjFRdVJJMuiNUkKjPgiZ9udSsUuE


Edit: I can also modify it to match your specific strategy if you'd like.
full member
Activity: 198
Merit: 100
DICEonCRACK? I'm not actually sure what that is.  Hit me up on PM
legendary
Activity: 1540
Merit: 1002
Would you be interested in discussing the system with DICEonCRACK for eventually creating a new strategy there based on it or is it a "trade secret"?
hero member
Activity: 756
Merit: 522
Just like the subject, I have a system I've been using (based loosely on Martingale) but I have no knowledge of programming and I'd love to not have to manually do this.  PM me if you're interested.

Are you the whale?
full member
Activity: 198
Merit: 100
All gambling is a risk.  I never said it was foolproof.  Jerky McJerkerson
sr. member
Activity: 293
Merit: 250
Just like the subject, I have a system I've been using (based loosely on Martingale) but I have no knowledge of programming and I'd love to not have to manually do this.  PM me if you're interested.

If a system like that worked they'd go out of business. Just saying.
full member
Activity: 198
Merit: 100
Just like the subject, I have a system I've been using (based loosely on Martingale) but I have no knowledge of programming and I'd love to not have to manually do this.  PM me if you're interested.
Jump to: