Pages:
Author

Topic: Seuntjie' Dice bot programmers mode discussion. - page 49. (Read 125420 times)

sr. member
Activity: 336
Merit: 250
I hate this stupid quotes about all that casino gambling shit i dont need to know how much you are winning or losing what i do know is that every online casino is just one big scam but you your own decission.
newbie
Activity: 4
Merit: 0
Hello All
I have an idea about a strategy i wanted to program in dicebot but i am lost

the idea is a modified version of fibonacci progression that goes like this

Bet 5,8,13,20 and 30 which is maximum on a loss
if you win on 5, stay there. if not move to next level(Cool, if you win move back, if not move to 13. keep doing that until you reach 30.

when you lose 5(30), you set a target to 30*2 (which means from then on you will be looking to earn twice as much as what you lost, which is 60 profit), then bet base (5). if you lose that, add the loss to the previous target, meaning that if you lose 5 set target to 60, then bet 5, if you lose it, make your target 65 then bet 5 again, until you win, then reduce your target by 5.
Once you hit a win, adjust the target and then bet half the size of your target. if you win, bet the other half, if you win it then go back to level 4 (20) bet, and continue going down until you are back at 1 (5) and repeat the process.

Anybody can help put that in a script so that we all can test it?

Thanks

Aima

Edit: here below is an attempt at coding for this strategy but it is not working.

Code:
function dobet() --
if(win) then --
losecount=losecount-=1
if(losecount<2) then --
nextbet = basebet
losecount=0
end
if(losecount==2) then --
end
if(losecount==3) then --
nextbet = level3bet
end
if(losecount==4) then --
nextbet = level4bet
end
if(losecount==5) then --
nextbet = level5bet
end
if(profittarget>1) then --
profittarget=profittarget+currentprofit
if(profittarget/2nextbet=profittarget/2
else
nextbet=maxlevelbet
end
end
else if (profittarget<1) then
profittarget=0
losecount=4
nextbet=level4bet
end
end

if (!win) then
losecount=losecount+=1
if(losecount==1) then -- basebet has just lost
end
if(losecount==2) then --
end
if(losecount==3) then --
nextbet = level4bet
end
if(losecount==4) then --
nextbet = level5bet
end
if(losecount==5) then --
profittarget=level4bet*2
end
if(losecount>5) then --
nextbet = basebet
profittarget=profittarget+currentprofit
end
end
end
full member
Activity: 126
Merit: 100
Look at the brighter Side
hi guys Smiley what code to use if you want to get the last bet high or lo roll? i need it so i can make a conditional statement that base on rolls whether its lo or hi ..

thank you

bethigh is the variable.  It's true/false.  So if (bethigh == true) then    The last bet was high.  == false would be low. 

bethigh = !bethigh  will flip it from one to the other   either low -> high or high -> low. 

hey thanks i figured it out anyway i want to stop after 3 streaks in a row my code isnt working can you please take a look

Quote
chance=49.5
base=0.00010000
nextbet = base

function dobet()

lossstreak = 0
lossswitch = 1

if (win) then

   lossstreak = 0
   lossswitch = 1
   nextbet=base

else

lossstreak += 1
nextbet=previousbet*2
if (lossstreak == lossswitch) then
      bethigh = !bethigh
      lossswitch += 1
      lossstreak = 0
elseif (lossstreak == 3) then
      lossstreak = 0
stop()
end

end

end

thanks in advance
legendary
Activity: 1007
Merit: 1000
hi guys Smiley what code to use if you want to get the last bet high or lo roll? i need it so i can make a conditional statement that base on rolls whether its lo or hi ..

thank you

bethigh is the variable.  It's true/false.  So if (bethigh == true) then    The last bet was high.  == false would be low. 

bethigh = !bethigh  will flip it from one to the other   either low -> high or high -> low. 
full member
Activity: 126
Merit: 100
Look at the brighter Side
hi guys Smiley what code to use if you want to get the last bet high or lo roll? i need it so i can make a conditional statement that base on rolls whether its lo or hi ..

thank you
legendary
Activity: 1717
Merit: 1125
Is there a way to reset the labouchere(win) function??


Code, something like this, what to insert at ##reset ??##??:


---

function dobet()

bal = balance

if maxbal == nil then maxbal = 0.00000001 end

oldmaxbal = maxbal

maxbal = math.max(bal, oldmaxbal)

if balance < maxbal*2/3 then ##reset ??##end

nextbet = labouchere(win)


end

---

Please help...

L

I think the only way to do this would be to set the value of the labouchere list. So

Code:
setvaluestring('settingname','value')
--the setting name is LabValues
--the value is a ? seperated list. This means if your labouchere list is
--0.1
--0.2
--0.3
--0.4
--0.5
--0.4
--0.3
--0.2
--0.1
--then your value is 0.1?0.2?0.3?0.4?0.5?0.4?0.3?0.2?0.1

--So try using
setvaluestring('LabValues','0.1?0.2?0.3?0.4?0.5?0.4?0.3?0.2?0.1')

--If you're going to be resetting at multiple places, I recommend making a global variable with the list
LabVals = '0.1?0.2?0.3?0.4?0.5?0.4?0.3?0.2?0.1'

function dobet()

--script things

--reset
setvaluestring('LabValues',LabVals)

--script things
end

Alternatively you can write your own reset function LUA that does that and resets any variables etc you need to reset.

Note on this approach: If you reset the list and do not call labouchere(win) it will use the latest value set to nextbet.
If you DO call labouchere(win) it will calculate the second bet (since you told it there's been a win or a loss). If you reset it using this method, you need to manually set the size of the next bet for it to be the correct size.

Edit: Just realized that because of some internals in the bot, this might or might not work.... I'm honestly not sure and it's up to you to test Smiley
full member
Activity: 160
Merit: 100
Is there a way to reset the labouchere(win) function??


Code, something like this, what to insert at ##reset ??##??:


---

function dobet()

bal = balance

if maxbal == nil then maxbal = 0.00000001 end

oldmaxbal = maxbal

maxbal = math.max(bal, oldmaxbal)

if balance < maxbal*2/3 then ##reset ??##end

nextbet = labouchere(win)


end

---

Please help...

L
legendary
Activity: 1717
Merit: 1125
Nope
newbie
Activity: 4
Merit: 0
Is there any way I can draw custom dots on the chart?
hero member
Activity: 813
Merit: 507
-snip-

Still occur the same error.

I haven't actually tried the code yesterday but now I have and changed all the errors

Code:
baseBet = 0.00000001
streakBet = 0.000001
streak = 0
nextbet = baseBet

function dobet()

if (previousbet>baseBet) then
  nextbet = baseBet

  if win then
    streakBet = 0.000001
  else
    streakBet = streakBet*2
  end

else
  if win then
    streak = 0

    nextbet=baseBet
  else
    streak = streak+1

    if streak==6 then
      nextbet=streakBet
    end
  end
end

end


Sorry for the wrong version  Sad
legendary
Activity: 1717
Merit: 1125
-snip-

Try this one

Code:

baseBet = 0.00000001
streakBet = 0.000001
streak = 0

function dobet()

if previousbet>baseBet then
  nextBet = baseBet

  if win then
    streakBet = 0.000001
  else
    streakBet = streakBet*2
  end

else
  if win then
    streak = 0

    nextbet=baseBet
  else
    streak = streak+1

    if streak==6 then
      nextbet=streakBet
  end
end

But betting after a losing streak doesn't change your odds at all... Roll Eyes

Error in the code, something about "end problem".

Image:

  Add an "end" at the end.  He just missed the last end to close the function when he cut/pasted.  

Still occur the same error.

Make sure every if/if-else and function has a matching end
newbie
Activity: 4
Merit: 0
-snip-

Try this one

Code:

baseBet = 0.00000001
streakBet = 0.000001
streak = 0

function dobet()

if previousbet>baseBet then
  nextBet = baseBet

  if win then
    streakBet = 0.000001
  else
    streakBet = streakBet*2
  end

else
  if win then
    streak = 0

    nextbet=baseBet
  else
    streak = streak+1

    if streak==6 then
      nextbet=streakBet
  end
end

But betting after a losing streak doesn't change your odds at all... Roll Eyes

Error in the code, something about "end problem".

Image: http://image.prntscr.com/image/d8153fb72df64a56882251e1c7bbe62f.png

  Add an "end" at the end.  He just missed the last end to close the function when he cut/pasted.  

Still occur the same error.
legendary
Activity: 1007
Merit: 1000
-snip-

Try this one

Code:

baseBet = 0.00000001
streakBet = 0.000001
streak = 0

function dobet()

if previousbet>baseBet then
  nextBet = baseBet

  if win then
    streakBet = 0.000001
  else
    streakBet = streakBet*2
  end

else
  if win then
    streak = 0

    nextbet=baseBet
  else
    streak = streak+1

    if streak==6 then
      nextbet=streakBet
  end
end

But betting after a losing streak doesn't change your odds at all... Roll Eyes

Error in the code, something about "end problem".

Image:

  Add an "end" at the end.  He just missed the last end to close the function when he cut/pasted.  
newbie
Activity: 4
Merit: 0
-snip-

Try this one

Code:

baseBet = 0.00000001
streakBet = 0.000001
streak = 0

function dobet()

if previousbet>baseBet then
  nextBet = baseBet

  if win then
    streakBet = 0.000001
  else
    streakBet = streakBet*2
  end

else
  if win then
    streak = 0

    nextbet=baseBet
  else
    streak = streak+1

    if streak==6 then
      nextbet=streakBet
  end
end

But betting after a losing streak doesn't change your odds at all... Roll Eyes

Error in the code, something about "end problem".

Image: http://image.prntscr.com/image/d8153fb72df64a56882251e1c7bbe62f.png
hero member
Activity: 813
Merit: 507
-snip-

Try this one

Code:

baseBet = 0.00000001
streakBet = 0.000001
streak = 0

function dobet()

if previousbet>baseBet then
  nextBet = baseBet

  if win then
    streakBet = 0.000001
  else
    streakBet = streakBet*2
  end

else
  if win then
    streak = 0

    nextbet=baseBet
  else
    streak = streak+1

    if streak==6 then
      nextbet=streakBet
  end
end

But betting after a losing streak doesn't change your odds at all... Roll Eyes
newbie
Activity: 4
Merit: 0
I want to set automatic my strategy, but i have one problem, the base bet is 0.00000001 and chance 42%. When hit 6 lose streak the base bet change to 0.00000100, and if i lose again, and hit 7 lose streak, the base bet reset to 0.00000001 and the next 6 lose streak the base bet will change to 0.00000200 (double). The problem is, everything is automatic, less the double part, so how i double the "increased" bet if i lose the 7 time?

Strategy Example:

win - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000100
win - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000200
lose - 0.00000001
win -  0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
win - 0.00000400
lose - 0.00000001
win -  0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
win - 0.00000100

Configured in "Advanced Mode":
http://image.prntscr.com/image/d205c40823b649f59696eac09bb49a8e.png
http://image.prntscr.com/image/7185b151672948a2a1797f8f63a95836.png

I tried these codes:
Code:
function dobet()

baseBet=0.00000001
streakBet1=0.0000001

if win then

 nextbet=0.00000001

else

 nextbet=baseBet

end
if currentstreak==-6 then

 nextbet=streakBet1

if win then

streakBet1=0.0000001

else

setvalueint(streakBet1,double)

end

end

end

end

and

Code:
function dobet()

baseBet=0.00000001
streakBet1=0.0000001

if win then

 nextbet=0.00000001

else

 nextbet=baseBet

end
if currentstreak==-6 then

 nextbet=streakBet1

if win then

streakBet1=0.0000001

else

streakBet1=streakBet1*2

end

end

end

end
legendary
Activity: 1007
Merit: 1000
I'm trying to set up my script so that

I keep on betting 0.00000001 until I lose.
After that it doubles my bet until I win two times in a row under 0.00000050.

If I win twice in a row under =0.00000050 I would go back to 0.00000001 .


If I don't win twice in a row  under 0.00000050 then I want to win exactly ONCE over 0.00000050 .

My major issue with my scripts is that the only way I'm able to return to 0.00000001 after rolling over 0.00000050, is that I end up having to win Twice in a row,instead of winning a single time in a row.



   If you think about it logically.  If you win then,  if the previousbet is greater then .00000050 then set the nextbet equal to the base bet.  Else (if the previousbet is less then .00000050) you make nextbet equal to previousbet. 

This is how I would code it.

Code:

if (win) then
   wincount += 1
   if (previousbet < 0.00000050 and wincount != 2) then   -- only  try again if the last bet is under 50 and this is not the second win in a row
      nextbet=previousbet
   else
      nextbet = basebet
   end
else
   wincount = 0
   losecount += 1
   nextbet=previousbet*multiplier     
end


     if you wanted to stop a loosing streak, I would add something on the  loss side of that if statement. 

 
legendary
Activity: 1007
Merit: 1000
LUA ERROR!!
')' expected, got '='

Code:
chance=49.5
multiplier=2.0
base=0.00000001
nextbet = base
wincount = 0
losecount = 0
resetstats = false
function dobet()

if (win) then
   wincount += 1
   nextbet=previousbet
else
   losecount += 1
   nextbet=previousbet*multiplier    
end
      if (wincount == 2  and currentprofit = <-0.00000050 and losecount= <5) then
      if (win nextbet = basebet)
end and then                                                                    
      resetstats = true
else    
         if (losecount == >5 and currentprofit = >-0.00000050)  then
         if (win  nextbet = basebet) end and  then                                                                          
       resetstats = true
         end            
end
end

Please start using the code box. Valid operators for ifs:
Equals ==
Not equals !=
larger than >
smaller than <
larger or equals to >=
small or equals to <=

Programming is consistent. even though it looks mostly the same = and == does not do the same thing. >= and => does not do the same thing (in fact the one works and the other doesn't). it's extremely important to be consistent with your code otherwise it won't work. Not just with the operators, if you're using variables and it has a capital letter in one place but not in the other, it's two separate variables.

the script now fires up in a unexpected way. Yet I think I know how to fix  this error.



If your code is close to the above code, I think I know what the problem is.  I'll give you a hint.  Your checking if wincount ==2.  if you don't reset that, it will only equal 2 once.  

You're talking about resetcount ?

    Not sure what resetcount is.  It's not mentioned in your script.  I'm talking about setting wincount equal to 0 at some point.  IE, reset the counter, otherwise it will increment forever.  Maybe you want to reset the wincount in the loss path.  so
Code:

if win then             // IF winner
   wincount += 1
else                     // Else Loser   
   wincount = 0
end




Also you have resetstats = true.  I don't know if that does anything or not.  But, you just put a line with resetstats() and that will actually reset your stats.  

resetstats is listed under the methods/calls list.  Those are actual calls to other functions.  You code (type) the function name followed by any parms in parens.  () just means there are no parms.  It can be confusing, but your almost there.  
hero member
Activity: 854
Merit: 503
anybody program the labouchere?
want to optimize it.
legendary
Activity: 1007
Merit: 1000
LUA ERROR!!
')' expected, got '='

Code:
chance=49.5
multiplier=2.0
base=0.00000001
nextbet = base
wincount = 0
losecount = 0
resetstats = false
function dobet()

if (win) then
   wincount += 1
   nextbet=previousbet
else
   losecount += 1
   nextbet=previousbet*multiplier    
end
      if (wincount == 2  and currentprofit = <-0.00000050 and losecount= <5) then
      if (win nextbet = basebet)
end and then                                                                    
      resetstats = true
else    
         if (losecount == >5 and currentprofit = >-0.00000050)  then
         if (win  nextbet = basebet) end and  then                                                                          
       resetstats = true
         end            
end
end

Please start using the code box. Valid operators for ifs:
Equals ==
Not equals !=
larger than >
smaller than <
larger or equals to >=
small or equals to <=

Programming is consistent. even though it looks mostly the same = and == does not do the same thing. >= and => does not do the same thing (in fact the one works and the other doesn't). it's extremely important to be consistent with your code otherwise it won't work. Not just with the operators, if you're using variables and it has a capital letter in one place but not in the other, it's two separate variables.

the script now fires up in a unexpected way. Yet I think I know how to fix  this error.



If your code is close to the above code, I think I know what the problem is.  I'll give you a hint.  Your checking if wincount ==2.  if you don't reset that, it will only equal 2 once.  
Pages:
Jump to: