Bitcoin Forum
October 21, 2017, 04:26:52 PM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 »
  Print  
Author Topic: Seuntjie' Dice bot programmers mode discussion.  (Read 48432 times)
seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
November 01, 2016, 07:40:59 PM
 #361

Is there a statement that I can use to tell if previousbet = win or not?
yeah. the variable win.
or in code
Code:
if win then
--do something
else
--do something else
end


Is there a statement that I can use to tell if previousbet = win or not?

   Do you mean the one before the one your currently processing?  

if win then the current bet won.  

if currentstreak == 2 then                           last 2 bets won

if currentstreak == -1 then              current bet lost but previous bet won.  

currentstreak tells you how many bets in a row you won or lost.  +1 or greater for a win streak.  -1 or less for a loss streak.  
Improved on your statements a bit Smiley
having win and currentstreak==2 is redundant. the currentstreak cant be >0 if win is not true. same for the other one, currentstreak cannot be <0 if win is true. Also, win a Boolean, no need to compare it with something to get a boolean result.

Some PGP public keys you should import: theymos, BadBear, Sirius, Stefan, Wladimir, Gavin, Gregory, Jeff, Pieter
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1508603212
Hero Member
*
Offline Offline

Posts: 1508603212

View Profile Personal Message (Offline)

Ignore
1508603212
Reply with quote  #2

1508603212
Report to moderator
LuanX3M
Jr. Member
*
Offline Offline

Activity: 36


View Profile
November 02, 2016, 02:37:43 PM
 #362

Is there a statement that I can use to tell if previousbet = win or not?

   Do you mean the one before the one your currently processing?  

If win == true    then the current bet won.  

if win == true  and currentstreak == 2 then                           last 2 bets won

if win == false and currentstreak == -1 then              current bet lost but previous bet won.  

currentstreak tells you how many bets in a row you won or lost.  +1 or greater for a win streak.  -1 or less for a loss streak.  

already got it: win and !win
chilly2k
Legendary
*
Offline Offline

Activity: 920


View Profile
November 02, 2016, 03:36:23 PM
 #363

Is there a statement that I can use to tell if previousbet = win or not?
yeah. the variable win.
or in code
Code:
if win then
--do something
else
--do something else
end


Is there a statement that I can use to tell if previousbet = win or not?

   Do you mean the one before the one your currently processing?  

if win then the current bet won.  

if currentstreak == 2 then                           last 2 bets won

if currentstreak == -1 then              current bet lost but previous bet won.  

currentstreak tells you how many bets in a row you won or lost.  +1 or greater for a win streak.  -1 or less for a loss streak.  
Improved on your statements a bit Smiley
having win and currentstreak==2 is redundant. the currentstreak cant be >0 if win is not true. same for the other one, currentstreak cannot be <0 if win is true. Also, win a Boolean, no need to compare it with something to get a boolean result.

   I showed the boolean compare more for clarity, I don't normally code it that way.

  But your other statement is correct, and I hadn't thought about it.  I guess I like to make my CPU work for it's dinner....  Smiley  Anyway good catch.... 

LuanX3M
Jr. Member
*
Offline Offline

Activity: 36


View Profile
November 02, 2016, 05:45:49 PM
 #364

I just wanna know why the bot doesn't support repeat-until loops, it crashes when it gets on the loop
chilly2k
Legendary
*
Offline Offline

Activity: 920


View Profile
November 02, 2016, 07:49:59 PM
 #365

I just wanna know why the bot doesn't support repeat-until loops, it crashes when it gets on the loop

   I don't think it's the repeat until.  This works
Code:
chance = 50
bethigh = true
nextbet = .00000001


function dobet()

x = 10

repeat
   x-=1
   print(x)
until x == 0

end

   I think it was the fact you had a never ending loop that was causing the crash.  You never mentioned if by crashed you mean the bot failed and issued an error message, or did the bot just hang and you had to cancel it? 



LuanX3M
Jr. Member
*
Offline Offline

Activity: 36


View Profile
November 02, 2016, 09:49:55 PM
 #366

I just wanna know why the bot doesn't support repeat-until loops, it crashes when it gets on the loop

   I don't think it's the repeat until.  This works
Code:
chance = 50
bethigh = true
nextbet = .00000001


function dobet()

x = 10

repeat
   x-=1
   print(x)
until x == 0

end

   I think it was the fact you had a never ending loop that was causing the crash.  You never mentioned if by crashed you mean the bot failed and issued an error message, or did the bot just hang and you had to cancel it? 




the bot just freezed, but i figured it out, it's cuz u gotta puta some 'sleep()' strings, so it wont crash
seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
November 03, 2016, 03:53:09 PM
 #367

I just wanna know why the bot doesn't support repeat-until loops, it crashes when it gets on the loop

   I don't think it's the repeat until.  This works
Code:
chance = 50
bethigh = true
nextbet = .00000001


function dobet()

x = 10

repeat
   x-=1
   print(x)
until x == 0

end

   I think it was the fact you had a never ending loop that was causing the crash.  You never mentioned if by crashed you mean the bot failed and issued an error message, or did the bot just hang and you had to cancel it? 




the bot just freezed, but i figured it out, it's cuz u gotta puta some 'sleep()' strings, so it wont crash


Please post the code you're currently using, because it sounds to me like you're just in an infinite loop with the bot sleeping so the OS can't detect it's in an infinite loop. Meaning you're never actually going to bet anything.

LuanX3M
Jr. Member
*
Offline Offline

Activity: 36


View Profile
November 03, 2016, 06:57:29 PM
 #368

I just wanna know why the bot doesn't support repeat-until loops, it crashes when it gets on the loop

   I don't think it's the repeat until.  This works
Code:
-- saldo minimo equivalente a 25000 doges

-- saldo em que você quer sacar seus ganhos, eles serão sacados automaticamente, leia todas as linhas até achar a que configura o resto do saque
finaltarget = 35000

chance = 66
martimulti = 3
basebet = 0.001
startbalance = balance
nextbet = basebet
savefactor = 1.25
target = .005
targetbalance = balance + target
bethigh = true
low = 0
high = 0
losecount = 0
stopnow = false
totallose = 0
wincount = 0
nextwinbet = basebet * martimulti
nextwinbetlost = 0
nextwinbetwon = 0
go = false
set = false


function dobet()
   
if nextbet > balance then
   stop()
end

if balance > finaltarget then
        withdraw(10001, 'DRv1sH3Ni9qSM2AYhYs9wdriSUyNsrPQxW')
    end

r=math.random(10)

  if r >= 5 then
     bethigh=true
  else
     bethigh=false
  end

if (win) then
   wincount += 1
   totallose = 0
   newbalance = balance
   if (high > low) then
     bethigh = true
    else
      bethigh = false
    end
  if (wincount == 1 and go) then
     nextbet = nextwinbet
     go = false
     set = false
  else
      nextbet = basebet
  end

   if (wincount == 2 and previousbet != basebet) then
      if (stopnow) then stop() end
        martimulti = 3
        nextwinbet = basebet * martimulti   
        set = true
       losecount = 0
      if (balance > targetbalance) then
         invest((balance - targetbalance)+target)
         targetbalance = targetbalance + target
         newbalance = targetbalance
      end
      if (newbalance > startbalance * savefactor) then
          invest(balance-startbalance)
          targetbalance = startbalance + target
          startbalance = startbalance * savefactor
      end
   end

    if (wincount == 2) then go = true end
 else
   if (wincount == 1 and previousbet != basebet ) then
      nextwinbet = previousbet * martimulti
      martimulti = martimulti
      if (martimulti < 1.85) then martimulti = 1.85 end
      losecount += 1
   else
     
   end

 if (losecount > 3) then
 if (basebet < 0) then
  repeat
   if (!win) then
    sleep(2000)
    nextwinbetlost = 1
    nextwinbetlost = nextwinbetlost + 1
    nextwinbet = losecount * (losecount / 2) * (basebet * 10)
    sleep(2000)
   else
    sleep(2000)
    nextwinbetwon = nextwinbetwon + 1
    nextwinbet = losecount * (losecount / 2) * (basebet * 10)
    sleep(2000)
    end
  until
   (nextwinbetwon > nextwinbetlost)
  else
 repeat
   if (!win) then
    sleep(2000)
    nextwinbetlost = 1
    nextwinbetlost = nextwinbetlost + 1
    nextwinbet = losecount * (losecount / 2)
    sleep(2000)
   else
    sleep(2000)
    nextwinbetwon = nextwinbetwon + 1
    nextwinbet = losecount * (losecount / 2)
    sleep(2000)
    end
  until
   (nextwinbetwon > nextwinbetlost)
   end
   end

   if (nextwinbetwon > nextwinbetlost) then
    go = true
    losecount = 0
   end

   wincount = 0
   totallose = totallose + 1
   if (totallose >= 6) then go = true end
   nextbet = basebet
 end
   
    if nextbet > balance then
   stop()
end
 
end

it crashes after the 4th time it tries to recover and loses
seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
November 03, 2016, 08:53:54 PM
 #369

Your code crashes without the sleeps because you have a bunch of infinite loops in your code. If you run it, I'll be surprised if the bot places more than about 3 bets before getting stuck in one of your loops and never placing a bet again until you restart it. You don't seem to understand how the bot works at all.

Look as these articles, especially the diagram. And actually read through it, don't just glance at the diagram and dismiss it because it has nothing to do with loops. It explains how the programmer mode works and how to program for it.

DiceBot Programmer mode tutorial 01 - Overview: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-01-overview
DiceBot Programmer mode tutorial 02 - Process: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-02-process
Dicebot Programmer mode tutorial 03 - Martingale: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-03-martingale
Dicebot Programmer mode tutorial 04 - Martingale (and mini If tutorial): Martingale: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-03-martingale

LuanX3M
Jr. Member
*
Offline Offline

Activity: 36


View Profile
November 03, 2016, 09:15:31 PM
 #370

Your code crashes without the sleeps because you have a bunch of infinite loops in your code. If you run it, I'll be surprised if the bot places more than about 3 bets before getting stuck in one of your loops and never placing a bet again until you restart it. You don't seem to understand how the bot works at all.

Look as these articles, especially the diagram. And actually read through it, don't just glance at the diagram and dismiss it because it has nothing to do with loops. It explains how the programmer mode works and how to program for it.

DiceBot Programmer mode tutorial 01 - Overview: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-01-overview
DiceBot Programmer mode tutorial 02 - Process: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-02-process
Dicebot Programmer mode tutorial 03 - Martingale: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-03-martingale
Dicebot Programmer mode tutorial 04 - Martingale (and mini If tutorial): Martingale: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-03-martingale

Man, dont just read this fricking script, TEST IT, it runs fine till it get the 4th recovery bet lost, OK? Can u help?
chilly2k
Legendary
*
Offline Offline

Activity: 920


View Profile
November 04, 2016, 01:12:52 AM
 #371

Your code crashes without the sleeps because you have a bunch of infinite loops in your code. If you run it, I'll be surprised if the bot places more than about 3 bets before getting stuck in one of your loops and never placing a bet again until you restart it. You don't seem to understand how the bot works at all.

Look as these articles, especially the diagram. And actually read through it, don't just glance at the diagram and dismiss it because it has nothing to do with loops. It explains how the programmer mode works and how to program for it.

DiceBot Programmer mode tutorial 01 - Overview: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-01-overview
DiceBot Programmer mode tutorial 02 - Process: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-02-process
Dicebot Programmer mode tutorial 03 - Martingale: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-03-martingale
Dicebot Programmer mode tutorial 04 - Martingale (and mini If tutorial): Martingale: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-03-martingale

Man, dont just read this fricking script, TEST IT, it runs fine till it get the 4th recovery bet lost, OK? Can u help?

   I won't test it either, I have no idea what it's supposed to do.  Don't try to loop unless you know what your trying to do.  Your code fails on the forth attempt because of this.

 if (losecount > 3) then   If you change the 3 to a 5 it will fail after 6 attempts.  

It doesn't do your loop, until it hits 4 loses.  

Now your loops make absolutely no sense.  

The dobet function, which is where your loops are, has to end before the next bet is places.   Just because you put a loop in there doesn't mean a bet is going to be places.  You don't have anything in the loop to cause it, and there is nothing available to allow you to do it.  

 seuntjie is suggesting you get a better understanding about when your script is actually running in the big picture.  

  
 

seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
November 04, 2016, 06:10:58 AM
 #372

Your code crashes without the sleeps because you have a bunch of infinite loops in your code. If you run it, I'll be surprised if the bot places more than about 3 bets before getting stuck in one of your loops and never placing a bet again until you restart it. You don't seem to understand how the bot works at all.

Look as these articles, especially the diagram. And actually read through it, don't just glance at the diagram and dismiss it because it has nothing to do with loops. It explains how the programmer mode works and how to program for it.

DiceBot Programmer mode tutorial 01 - Overview: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-01-overview
DiceBot Programmer mode tutorial 02 - Process: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-02-process
Dicebot Programmer mode tutorial 03 - Martingale: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-03-martingale
Dicebot Programmer mode tutorial 04 - Martingale (and mini If tutorial): Martingale: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-03-martingale

Man, dont just read this fricking script, TEST IT, it runs fine till it get the 4th recovery bet lost, OK? Can u help?

Read the damn links I posted. I do know and understand how my program works and that's why I can say that your loops are infinite and the bot is getting stuck in them. You don't understand how the program works. READ THE ARTICLES!

LuanX3M
Jr. Member
*
Offline Offline

Activity: 36


View Profile
November 06, 2016, 01:22:17 AM
 #373

right now im having a problem with X += 1, i put

Code:
  if (previousbet = basebet * 3 * 12 and win) then
   X += 1
   end

bit it won't add the value to the variable, why?
chilly2k
Legendary
*
Offline Offline

Activity: 920


View Profile
November 06, 2016, 02:05:31 AM
 #374

right now im having a problem with X += 1, i put

Code:
  if (previousbet = basebet * 3 * 12 and win) then
   X += 1
   end

bit it won't add the value to the variable, why?


 Are you sure the variable is X and not x. 

 Add print(X) after that line to see what the value is. 

LuanX3M
Jr. Member
*
Offline Offline

Activity: 36


View Profile
November 06, 2016, 11:14:52 AM
 #375

right now im having a problem with X += 1, i put

Code:
  if (previousbet = basebet * 3 * 12 and win) then
   X += 1
   end

bit it won't add the value to the variable, why?


 Are you sure the variable is X and not x. 

 Add print(X) after that line to see what the value is. 

I tried that, keeps 0 (that's the value I declared).
seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
November 06, 2016, 12:40:27 PM
 #376

right now im having a problem with X += 1, i put

Code:
  if (previousbet = basebet * 3 * 12 and win) then
   X += 1
   end

bit it won't add the value to the variable, why?


 Are you sure the variable is X and not x. 

 Add print(X) after that line to see what the value is. 

I tried that, keeps 0 (that's the value I declared).

it's nearly impossible to tell you whats wrong without seeing the context the code is being used in.

This works:
Code:
x =0
x += 1
x += 1
x += 1
print(x)

So there's nothing wrong with the code you posted, but if you use that inside of dobet, x will always be 3, which might not be what you want.

chilly2k
Legendary
*
Offline Offline

Activity: 920


View Profile
November 06, 2016, 01:01:27 PM
 #377

right now im having a problem with X += 1, i put

Code:
  if (previousbet = basebet * 3 * 12 and win) then
   X += 1
   end

bit it won't add the value to the variable, why?


 Are you sure the variable is X and not x. 

 Add print(X) after that line to see what the value is. 

I tried that, keeps 0 (that's the value I declared).

   I was not clear.  By after that line I mean

Code:
  if (previousbet = basebet * 3 * 12 and win) then
   X += 1
   print(X)
   end

Just in case you tried

Code:
  if (previousbet = basebet * 3 * 12 and win) then
   X += 1
   end
   print(X)

I have a feeling your if statement is never true and so your never doing the X+=1 code. 

You wouldn't happen to have this in the losing path.  IE usually the else side of the "if win"  and your checking for a win. 

 





LuanX3M
Jr. Member
*
Offline Offline

Activity: 36


View Profile
November 06, 2016, 01:30:44 PM
 #378

right now im having a problem with X += 1, i put

Code:
 if (previousbet = basebet * 3 * 12 and win) then
   X += 1
   end

bit it won't add the value to the variable, why?


 Are you sure the variable is X and not x.  

 Add print(X) after that line to see what the value is.  

I tried that, keeps 0 (that's the value I declared).

   I was not clear.  By after that line I mean

Code:
 if (previousbet = basebet * 3 * 12 and win) then
   X += 1
   print(X)
   end

Just in case you tried

Code:
 if (previousbet = basebet * 3 * 12 and win) then
   X += 1
   end
   print(X)

I have a feeling your if statement is never true and so your never doing the X+=1 code.  

You wouldn't happen to have this in the losing path.  IE usually the else side of the "if win"  and your checking for a win.  




it is true, cause i wrote the same block but with (!win) and works, just with (win) it doesn't
Zirky77
Newbie
*
Offline Offline

Activity: 1


View Profile
November 09, 2016, 07:42:31 PM
 #379

hello.
 I used the default settings.
Chance 49.5
Multiply 2
As shown in the figure (indicated bet) instead of 2x multiples there is 4x multiple. This a bug?

Image: (I can not embed.)  Huh

https://s19.postimg.org/504616d37/dicebot.jpg

http://www.rajce.net/f1114187784

I used also

nextbet = 0.0000001
enablezz=true
enablesrc=true
percentage=0.00038 -- the percentage of your balance that will make up your base bet
function dobet()
if win then
nextbet = balance*(percentage/100)
else
nextbet = martingale(win)
end
end


Please help me.

headsoccer
Newbie
*
Offline Offline

Activity: 1


View Profile WWW
November 10, 2016, 06:19:59 AM
 #380

Play now  Wink
Head Soccer
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 »
  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!