Pages:
Author

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

newbie
Activity: 23
Merit: 1
Looks nice. I wont be able to run it until Monday, but I'll let you know how it works out when I do.
HCP
legendary
Activity: 2086
Merit: 4363
ok... so after a "WL"... if we have a win and nextbet is > 20, we should reset... else if we have a loss we should increase as per the multiplier...

This code should do that... it will ONLY reset to basebet if you get "WLW" sequence... and the nextbet is going to be > 20:
Code:
------------------------------------------------------------------------------
-- Script for sleeyeyed
-- by HCP
------------------------------------------------------------------------------
-- NOT TESTED THOROUGHLY, use at own risk.
------------------------------------------------------------------------------
basebet=10
nextbet=basebet
chance=33
previousResult1 = false
previousResult2 = false

function dobet()

  if win then
    nextbet=previousbet*.75
    if previousResult2 == true and previousResult1 == false and nextbet > 20 then
      -- WLW sequence with nextbet > 20, so reset to basebet
      nextbet = basebet
    end
  else
    nextbet=previousbet*1.15
  end

  if nextbet < 10 then
    nextbet = basebet
  end

  -- keep track of previous 2 results
  previousResult2 = previousResult1
  previousResult1 = win

end
newbie
Activity: 23
Merit: 1
Quote
xxxxxWLW

Yes, this. The LLL was just for demonstrative purposes.
HCP
legendary
Activity: 2086
Merit: 4363
Thanks for the help and formatting the code. I'm obviously not a programmer. I think you're right about the count4 being triggered. It works better now, but does reset to base after a few losses and a win. Can't really mess with it too much now, but will update if I figure it out. If anyone else wants to give it a go then the more the merrier.
That will be because of the count3 > 3 setting count2=0 setup.

So basically, if you get 3 losses in a row, followed by a win (with nextbet > 20), I think the conditions are setup that it will reset.

Based on your previous description of your algorithm...
Quote
What I'd like to do is set a condition where after one win followed by one loss and if the bet is above 20 units the bet resets to base. If it loses then a multiplier is added to the next bet. So if I have LLLWLW situation it will reset to base but only if the next bet is over 20 units.
Did you actually mean one loss followed by one win? Huh That is to say, you have the pattern xxxxxWLW? or did you mean that it should be xxxxLWL?

I don't see how LLLWLW is one win followed by one loss and then you check the bet size... as you've already completed a 3rd bet and won.

If you can clarify exactly what you're after, I think it shouldn't be too difficult to code up something.
newbie
Activity: 23
Merit: 1
Thanks for the help and formatting the code. I'm obviously not a programmer. I think you're right about the count4 being triggered. It works better now, but does reset to base after a few losses and a win. Can't really mess with it too much now, but will update if I figure it out. If anyone else wants to give it a go then the more the merrier.
HCP
legendary
Activity: 2086
Merit: 4363
With the logic you have... nextbet is reset to basebet because of:
Quote
if count4==1 and win then
  nextbet=basebet;count4=0
end
or
Quote
if nextbet<10 then
  nextbet=basebet
end


For the 2nd option, nextbet will be less than basebet (10) after a couple of wins in a row... due to:
Quote
if win then nextbet=previousbet*.75
end


For the "count4==1 and win" condition, count4 is set to 1 when "count2==1 and count==3":
Quote
if count2==1 and count==3
then count4=1
end


Each bet, count is initially set to 0, then 1 if it's a win... then 2 added if nextbet is > 20... the problem you have is that the nextbet calculations are done AFTER the nextbet check!
Quote
if nextbet>20 then  <-- nextbet is checked here
count=count+2
end
if win then nextbet=previousbet*.75  <-- but nextbet isn't set until here!!
end
if !win then nextbet=previousbet*1.15 <-- or here!!
end

Because of this, the nextbet>20 resolving to "true", might be occurring a bet later than you think and thus causing you some confusion:

Bet amount: 18 -> LOSS
nextbet >20? false
if !win then nextbet = previousbet * 1.15 = 18 *1.15 = 20.7

Bot is now going to bet 20.7!

Bet: 20.7 -> WIN
nextbet >20? TRUE
if win then nextbet = previousbet * 0.75 = 20.7 * .75 = 15.525

Bot would try to bet 15.525, but the bet nextbet has already be checked, so now count==3, which means it could be possible for it to get into the "if count2==1 and count==3" section and set count4==1 and with the win could trigger the reset to base.

I suspect that this might be causing the "random" resets... 


I've taken the liberty of tidying up the code, and refactoring it slightly... see if this works... NOTE: UNTESTED!
Code:
basebet=10
nextbet=basebet
count2=0
count3=0
count4=0

function dobet()
  count=0

  chance=33
  count3=count3+1

  if count3>3 then
    count3=1;count2=0
  end

  if win then
    count=count+1
    nextbet=previousbet*.75
  else
    count2=count2+1
    nextbet=previousbet*1.15
 end

  if nextbet>20 then
    count=count+2
  end

  if count2==1 and count==3 then
    count4=1
  end
  if count4==1 and win then
    nextbet=basebet
    count4=0
  end

  if nextbet<10 then
    nextbet=basebet
  end

end
newbie
Activity: 23
Merit: 1
Need some help with programming what would seem to be a simple thing.

What I'd like to do is set a condition where after one win followed by one loss and if the bet is above 20 units the bet resets to base. If it loses then a multiplier is added to the next bet. So if I have LLLWLW situation it will reset to base but only if the next bet is over 20 units. It works as I like except for the problem that it will randomly to base unexpectedly in certain places. I think count2 is to blame in this script, I just can't figure it out.
Code:
nextbet=basebet
count2=0
count3=0
count4=0
function dobet()
count=0
basebet=10
chance=33
count3=count3+1
if count3>3 then
count3=1;count2=0
end
if win then
count=count+1
end
if !win then
count2=count2+1
end
if nextbet>20 then
count=count+2
end
if win then nextbet=previousbet*.75
end
if !win then nextbet=previousbet*1.15
end
if count2==1 and count==3
then count4=1
end
if count4==1 and win then
nextbet=basebet;count4=0
end
if nextbet<10 then
nextbet=basebet
end
end
HCP
legendary
Activity: 2086
Merit: 4363
As I was trying to explain via PM... you need to provide some sort of context to this script...

What site was it being used on? And what is the underlying logic? It isn't just an easy "copy/paste/change a couple of variable names" to convert this Javascript to a functioning LUA script for the dicebot that has the same functionality.

What I am fairly sure of is that the dicebot script that you tried to write doesn't do anything close to what that Javascript is attempting to do... the "numbers" just don't match. Huh
legendary
Activity: 1717
Merit: 1125
I really do not understand what you want to do... also, it seems like you only posted a part of the script. And the script seems extremely long and redundant. You should be able to simplify it significantly if you use a bit of math.
newbie
Activity: 5
Merit: 0
thanks

gotta think and put my thaughs to order

site where im playing is 999dice.
HCP
legendary
Activity: 2086
Merit: 4363
I would like to do that,but im pretty sure that im not able to do that.Would you or someone else help me?
Why are you not able to do that? Huh You just need to type the code into the script you are using... it isn't that difficult. Just don't include the "..." which I put to show where to put the code in relation to the function dobet().

put these two lines BEFORE function dobet()
Code:
myCounter = 0
maxCount = 1000

put these lines immediately AFTER the line that says function dobet()
Code:
  myCounter = myCounter + 1
  if myCounter >= maxCount then
    resetseed()
    myCounter = 0
  end
easy! Wink


Quote
Also one silly question,one guy said that its better to have more scrips and bots than one.He says that if run same script over and over,its gonna get bust.What s..t its that,for me it sounds like BS,but gotta ask,never know Wink
If they were trying to imply that sites will figure out your script and then cheat and make you go bust... they're a conspiracy theorist idiot. There is no way that a legit, provably fair dice site can do that.

The reason you will go bust if you just play over and over... is the maths of probabilities, "expected value" and "house edge". Basically... the "house always wins".
newbie
Activity: 5
Merit: 0
Hah haa,good,HCP,very good

I would like to do that,but im pretty sure that im not able to do that.Would you or someone else help me?

Also one silly question,one guy said that its better to have more scrips and bots than one.He says that if run same script over and over,its gonna get bust.What s..t its that,for me it sounds like BS,but gotta ask,never know Wink











HCP
legendary
Activity: 2086
Merit: 4363
noo,not training bot,training myself Grin
safebet 21sats in this script means it goes up and up and up...
turbo means that i stop bot and chance 21sats to 1000sats and hit start...
like i use it both automatic and manually.automatic(21sat) i watch and wait when is time to attack and then chance it to turbo(1000sat).
yeah,only i wanted to know is there any program where i can train myself...you know like samurais do Wink
Right... you seem to have missed the point of the programmer mode then... you should be able to code that sort of behaviour into your script.

It should be possible to get it to check for the conditions that you are looking for... ie. X losses in a row... and then set the bet/chance to whatever value you like... and then reset on a win etc without you needing to intervene.



what is the function for reseting seed after like 1000 bets. and where should i put it before the function dobet()? or after??
Firstly, resetseed() only works on a limited number of sites... they don't all support that functionality.

If you want it to be every 1000 bets, you would need to put it inside function dobet()... if it is before, it will only ever be run once, before the bot starts betting... The dobet() function is executed after every bet is placed and the result is returned from the betting site. You can see the "flow" here: https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-02-process

So, you need to create a "counter", check it after every bet... once it hits 1000 (or whatever number), you call resetseed() function (assuming your site supports it) and then set the counter back to zero... like this:
Code:
-- script setup stuff goes here --
...
myCounter = 0
maxCount = 1000
...
function dobet()
...
  myCounter = myCounter + 1
  if myCounter >= maxCount then
    resetseed()
    myCounter = 0
  end
...
  --rest of your script goes here--
...
end
newbie
Activity: 11
Merit: 0
Thx for the tips again guys i have a new question:

what is the function for reseting seed after like 1000 bets. and where should i put it before the function dobet()? or after??

thx for the tips
newbie
Activity: 5
Merit: 0
noo,not training bot,training myself Grin

safebet 21sats in this script means it goes up and up and up...

turbo means that i stop bot and chance 21sats to 1000sats and hit start...

like i use it both automatic and manually.automatic(21sat) i watch and wait when is time to attack and then chance it to turbo(1000sat).

yeah,only i wanted to know is there any program where i can train myself...you know like samurais do Wink


HCP
legendary
Activity: 2086
Merit: 4363
To be honest... I have no idea what you're talking about with "safebet is 21 and turbo 1000"??!? Huh

Also... you can't "train" the bot... it isn't a learning AI. You can only program it. Or are you attempting to change settings as the bot is running? Huh
newbie
Activity: 5
Merit: 0
thanks for fast answer.
simulation mode is useless for my tactic.
my safebet is 21.and turbo 1000 or 2000.all "dips" that come i chance safebet to 1000 or 2000.after dip,i get up to next 10000,then i chance back to safebet 21.and wait for next dip.dip that im talking is 4 to 5 false bet.with this tactic ive been doing ok,but i would like to train it more.got something in my mind....
HCP
legendary
Activity: 2086
Merit: 4363
You can use the "simulation" mode within the bot itself... other than that, I only know of Crypto-Games.net which has "PLAY" money...

You can get PLAY money from the faucet... Although, technically it does have some value (50 PLAY = 0.00000001 BTC Tongue)
newbie
Activity: 5
Merit: 0
is there any place where i can run script manually without real money?

my scrip is working ok,but its better when i turbo with higher bets.i would like to train my method.

thänks
legendary
Activity: 1717
Merit: 1125
something like
bethigh = bethigh
bet low
bet low
bet low
.
.
.
.........
How resetseed() works before function dobet() or it really works or not?? I have doubt!
resetseed()
function dobet()?

I'm still not sure what you're wanting? Huh
bethigh = bethigh? Huh This makes no sense.

bethigh is a "boolean" value... it is either "true", in which case the bot will bet "high"... or it is "false", in which case the bot will bet "low".

Also, all resetseed() does not work on all sites... and all it does (on sites that it actually works on), is request the site to reset your client server seed... much like clicking on the reset seed button on sites that offer this functionality...

A lot of people seem to have all sorts of conspiracy theories about how sites can use the seed to scam you... if the site has implemented "provably fair" correctly, there is no way for them to cheat using the seeds... and resetting the seed to break losing runs etc is just superstition.

Have you read all the programmer mode documentation and tutorials here: https://bot.seuntjie.com/ProgrammerMode.aspx Huh

Contrary to what many people believe, seeds in a provably fair system are tools to help prove fairness and can be used by the client/customer/gambler to prove that the site is cheating (if they are). They cannot be used by the site as a tool to cheat.

Calling the reset seed function outside of the dobet script will work. It will trigger once when you type start, BUT not all sites have nonce based systems, so you can't reset your seed and a lot of site have limits on how often you can reset seeds. If you attempt to reset your seed to often, it won't work.
Pages:
Jump to: