Bitcoin Forum
September 27, 2020, 02:51:09 PM *
News: Latest Bitcoin Core release: 0.20.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 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 48 49 50 51 52 53 54 55 56 57 58 59 [60] 61 62 »
  Print  
Author Topic: Seuntjie' Dice bot programmers mode discussion.  (Read 122939 times)
HCP
Legendary
*
Offline Offline

Activity: 1470
Merit: 2915

<insert witty quote here>


View Profile
July 18, 2019, 09:29:06 PM
 #1181

@Agent009

This script should do what you've asked... As always, it hasn't been extensively tested (I simply used the simulation and exported the results to check it), so use at your own risk!

You will need to modify the "edge" variable to match the "House Edge" of the site you want to play on... 1% HouseEdge = 1... 0.8% HE = 0.8 etc. Then set the basePayout and baseBet to suit your requirements. They are defaulted to 10x payout and 0.00000010 BTC

Code:
-------------------------------------------------------------------------------
--
-- Payout Martingalge Script for Agent009 by HCP
--
-- BTC Donations to: 33gzi64cvCr4i9ECGPwvZktzS2qknRUFhC
--
-------------------------------------------------------------------------------

edge       = 1 -- set to the house edge of your site
basePayout = 10 -- set to the base payout that you want
payout     = basePayout

chance     = (100 - edge) / payout -- calculate chance based on house edge
baseChance = chance

baseBet = 0.00000010 -- 1 "unit"
nextbet = baseBet -- set our initialBet

bethigh = false

function dobet()

    if win then
        -- reset to base bet/chance/payout
        nextbet = baseBet
        chance  = baseChance
        payout  = basePayout
       
    else
        -- increase payout
        payout  = payout + 1
       
        -- recalculate chance
        chance  = (100 - edge) / payout
       
        -- increase bet by 1 unit
        nextbet = previousbet + baseBet
    end

end

1601218269
Hero Member
*
Offline Offline

Posts: 1601218269

View Profile Personal Message (Offline)

Ignore
1601218269
Reply with quote  #2

1601218269
Report to moderator
1601218269
Hero Member
*
Offline Offline

Posts: 1601218269

View Profile Personal Message (Offline)

Ignore
1601218269
Reply with quote  #2

1601218269
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Agent009
Newbie
*
Online Online

Activity: 43
Merit: 0


View Profile
July 19, 2019, 12:50:15 AM
 #1182

@Agent009

This script should do what you've asked... As always, it hasn't been extensively tested (I simply used the simulation and exported the results to check it), so use at your own risk!

You will need to modify the "edge" variable to match the "House Edge" of the site you want to play on... 1% HouseEdge = 1... 0.8% HE = 0.8 etc. Then set the basePayout and baseBet to suit your requirements. They are defaulted to 10x payout and 0.00000010 BTC

Code:
-------------------------------------------------------------------------------
--
-- Payout Martingalge Script for Agent009 by HCP
--
-- BTC Donations to: 33gzi64cvCr4i9ECGPwvZktzS2qknRUFhC
--
-------------------------------------------------------------------------------

edge       = 1 -- set to the house edge of your site
basePayout = 10 -- set to the base payout that you want
payout     = basePayout

chance     = (100 - edge) / payout -- calculate chance based on house edge
baseChance = chance

baseBet = 0.00000010 -- 1 "unit"
nextbet = baseBet -- set our initialBet

bethigh = false

function dobet()

    if win then
        -- reset to base bet/chance/payout
        nextbet = baseBet
        chance  = baseChance
        payout  = basePayout
       
    else
        -- increase payout
        payout  = payout + 1
       
        -- recalculate chance
        chance  = (100 - edge) / payout
       
        -- increase bet by 1 unit
        nextbet = previousbet + baseBet
    end

end

HCP thank you very much! Smiley
I will test it today and then talk about the results...
seuntjie
Legendary
*
Offline Offline

Activity: 1708
Merit: 1121



View Profile WWW
July 19, 2019, 11:41:00 AM
Merited by HCP (2)
 #1183

you can use site.edge to get the edge for the site you are currently playing on.

The site object contains some basic details for the site and the users stats as they come from the site, and the class definition can be found at https://github.com/Seuntjie900/DiceBot/blob/master/DiceBot/cDiceBot.cs#L5976

sleepyeyed
Newbie
*
Offline Offline

Activity: 23
Merit: 1


View Profile
July 31, 2019, 04:47:31 PM
 #1184

How can I calculate the probability of rolls if I start at chance=1 and keep increasing the chance by 1 on each loss? What would be the probability that it would reach chance=90? also, how would I increase each bet on loss so that it would stay in profit or at least break even? In my code below I'm toying with using exponents, but I'm just throwing random numbers at it to see what sticks so far.
Code:
basebet=1
nextbet=basebet
chance=1
function dobet()

if win then
nextbet=basebet
chance=1
end

if !win then
chance=chance+1
nextbet=previousbet*1.165^1.75
end
seuntjie
Legendary
*
Offline Offline

Activity: 1708
Merit: 1121



View Profile WWW
August 01, 2019, 07:19:30 AM
 #1185

How can I calculate the probability of rolls if I start at chance=1 and keep increasing the chance by 1 on each loss? What would be the probability that it would reach chance=90? also, how would I increase each bet on loss so that it would stay in profit or at least break even? In my code below I'm toying with using exponents, but I'm just throwing random numbers at it to see what sticks so far.
Code:
basebet=1
nextbet=basebet
chance=1
function dobet()

if win then
nextbet=basebet
chance=1
end

if !win then
chance=chance+1
nextbet=previousbet*1.165^1.75
end

Not sure about the probability, my stats isn't that good.

How to calculate the next bet to ensure you break even: You will need to track your streak profit. to do this, have a variable that you add your losses to when you lose and reset when you win.
Then you can use the formulas payout=(100-edge)/chance and profit=(betamount*payout)-betamount to calculate what your bet amount should be

so if you've had 30 losses in a row and you have, say, -35 profit for the losing streak, you can calculate your next bet to break even using

-(streakprofit) = (x * ((100- site.edge)/chance))-x
refactors to
x= -(streakprofit)/payout
(this assumes streakprofit is negative)

sleepyeyed
Newbie
*
Offline Offline

Activity: 23
Merit: 1


View Profile
August 01, 2019, 12:04:09 PM
 #1186

Quote
Not sure about the probability, my stats isn't that good.

How to calculate the next bet to ensure you break even: You will need to track your streak profit. to do this, have a variable that you add your losses to when you lose and reset when you win.
Then you can use the formulas payout=(100-edge)/chance and profit=(betamount*payout)-betamount to calculate what your bet amount should be

so if you've had 30 losses in a row and you have, say, -35 profit for the losing streak, you can calculate your next bet to break even using

-(streakprofit) = (x * ((100- site.edge)/chance))-x
refactors to
x= -(streakprofit)/payout
(this assumes streakprofit is negative)


I kind of understand this, but am unsure of how I can fit this into my code so that it works correctly. So does the x variable represent my next bet? Sorry for my programming logic ignorance. I'll try my best at wrapping my head around it for now.
docthusinh
Jr. Member
*
Offline Offline

Activity: 219
Merit: 4


View Profile
September 06, 2019, 03:38:05 PM
 #1187

Not sure if the programming mode support this:

betsides = [L, H, L, L, H, L, H, H, L, L....]
stakes = [1, 1, 1, 2, 3,4, 5, 6...]
betodds = [2, 2, 2, 3, 4, 5, ....]

if win
 nextside = betsides[0]
 nextstake = stakes[0]
 nextodd = betodds[0]

else //lose
 nextside = betsides[currentstreak]
 nextstake = stakes[currentstreak]
 nextodd = betodds[currentstreak]

Questions are:
1) Will above variables taken for use in the bot (nextside, nextstake, nextodd)? If not, how to implement above?
2) Is the first lose will cause currentstreak = 1?
3) If above array list suported, what is the maximum size? Basically I need 3000+
seuntjie
Legendary
*
Offline Offline

Activity: 1708
Merit: 1121



View Profile WWW
September 07, 2019, 07:26:21 PM
 #1188

Not sure if the programming mode support this:

betsides = [L, H, L, L, H, L, H, H, L, L....]
stakes = [1, 1, 1, 2, 3,4, 5, 6...]
betodds = [2, 2, 2, 3, 4, 5, ....]

if win
 nextside = betsides[0]
 nextstake = stakes[0]
 nextodd = betodds[0]

else //lose
 nextside = betsides[currentstreak]
 nextstake = stakes[currentstreak]
 nextodd = betodds[currentstreak]

Questions are:
1) Will above variables taken for use in the bot (nextside, nextstake, nextodd)? If not, how to implement above?
2) Is the first lose will cause currentstreak = 1?
3) If above array list suported, what is the maximum size? Basically I need 3000+

1+3) https://www.lua.org/pil/11.1.html
2) See the tutorials on https://forum.seuntjie.com/index.php?topic=2.0, specifically https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-1-1-variables

Also, see just a quick tutorial/example for if statements regarding if statements in LUA.

sleepyeyed
Newbie
*
Offline Offline

Activity: 23
Merit: 1


View Profile
September 20, 2019, 05:49:44 PM
Last edit: September 20, 2019, 07:24:02 PM by sleepyeyed
 #1189

Is there any way to round numbers off easily? For instance if I have the following code...

Code:
basebet=.00000001
chance=89
function dobet()

if win then
   chance=chance/2
   nextbet=basebet
end

Since the chance on a win will be split in half then the chance would be 44.5. What if I wanted to round the chance to the next higher whole chance being 46? is there a simple way to do this?
HCP
Legendary
*
Offline Offline

Activity: 1470
Merit: 2915

<insert witty quote here>


View Profile
September 20, 2019, 10:31:30 PM
 #1190

Is there any way to round numbers off easily?
There are math.floor() and math.ceil() functions in LUA (the scripting language of the dice bot), that will allow you to "round" to whole numbers... However, they don't do typical ".5" rounding... They just go up or down to the next whole number, regardless of the decimal. So, math.floor(4.8 ) will result in 4... and math.ceil(4.1) will result in 5.

One trick to "fix" this and have more "normal" rounding, is to simply add 0.5 and use math.floor():
Code:
x = 4.3
y = 4.8
z = 4.5

print("Normal Rounding")
print("x: ",x," --> ", math.floor(x+0.5))
print("y: ",y," --> ", math.floor(y+0.5))
print("z: ",z," --> ", math.floor(z+0.5))

would yield:
Code:
Normal Rounding
x:  4.3  -->    4
y:  4.8  -->    5
z:  4.5  -->    5

In your example:
Code:
chance=89
print("chance: ",chance)
chance = chance / 2
print("chance BEFORE: ",chance)
chance = math.floor( chance + 0.5)
print("chance AFTER: ",chance)

would result in this output:
Code:
chance:     89
chance BEFORE:  44.5
chance AFTER:   45

Hope that helps.

houseworx
Full Member
***
Offline Offline

Activity: 339
Merit: 100


View Profile
September 21, 2019, 12:00:11 PM
 #1191

how I can simple make something:

if currentstreak "every number" then
do something
end

11111222223333344444

for example every 5 streak next 5 streak made nextbet = previousbet + 0.00000001

I dont understand, last period when bot was updates with this "blue words" in code box, they dont like = simbol.

'then' expected, got '='
Phyzyprogrammer
Member
**
Offline Offline

Activity: 90
Merit: 10

Visit www.btcscriptbot.wordpress.com to get latest


View Profile WWW
September 27, 2019, 09:26:28 AM
 #1192

I need a Good programmer, that can help me create a script for bitsler Gambling site, I have a personal strategy that I use, and I want to create a script for it, so I can just past the script on my browser console option and start betting automatically!, I will pay you...... So pls reply to this post let me know how good you are, thank you guys

visit (www.btcscriptbot.wordpress.com) we offer latest scripts and bots to earn bitcoins and other altcoins for free and paid! Earn Bitcoins with bots
seuntjie
Legendary
*
Offline Offline

Activity: 1708
Merit: 1121



View Profile WWW
September 27, 2019, 10:53:12 AM
 #1193



This thread is for the programmer mode in DiceBot, NOT console scripts that you run in your browser.

I would not recommend using anything that runs in your browser console.

HCP
Legendary
*
Offline Offline

Activity: 1470
Merit: 2915

<insert witty quote here>


View Profile
September 28, 2019, 03:46:28 AM
 #1194

how I can simple make something:

if currentstreak "every number" then
do something
end

11111222223333344444

for example every 5 streak next 5 streak made nextbet = previousbet + 0.00000001
Do you mean every 5 loss streak? 5 win streak? or something else?

Personally, I would do something like:
Code:
myLossStreakCounter = 0
streakLimit = 5

function dobet()
...
  if (!win) then
    -- If it was a loss, increment the counter
    myLossStreakCounter = myLossStreakCounter + 1
  end
  ...
  if myLossStreakCounter == streakLimit then
    -- reached the streak limit, increase bet and reset counter
    nextbet = previousbet + 0.00000001
    myLossStreakCounter = 0
  end
  ...

If should be relatively obvious how the code can be modified to be used for a Win streak


Quote
I dont understand, last period when bot was updates with this "blue words" in code box, they dont like = simbol.

'then' expected, got '='
This error suggests that you have a syntax error in your code. The bot thinks you're trying to use an "if something then" command, but it can't find the "then" part of the command before it finds an "=".

Usually it shows a line number where the error occurred. Check near there for incorrect code... failing that, you'd need to post the code for others to be able to debug it properly.

sleepyeyed
Newbie
*
Offline Offline

Activity: 23
Merit: 1


View Profile
October 02, 2019, 03:09:34 PM
 #1195

I'm playing with the idea of incrementally increasing my bet based on my balance and as the balance increases the increment of the bet gets smaller. In the code below I have this working, but I'm thinking that there must be an easier or shorter way to do this with variables. If anyone has any suggestions I'd appreciate it.

Code:
basebet=.00000001

if balance>.00025000 and balance<.00150000 then
    basebet = balance/25000
end

if balance>=.00150000 and balance<.00300000 then
    basebet = (balance/50000)+.00000003
end

if balance>=.00300000 and balance<.00600000 then
    basebet = (balance/100000)+.00000006
end

if balance>=.00600000 and balance<.01000000 then
    basebet = (balance/200000)+.00000009
end

if balance>=.01000000 then
    basebet = (balance/500000)+.00000012
end

HCP
Legendary
*
Offline Offline

Activity: 1470
Merit: 2915

<insert witty quote here>


View Profile
October 02, 2019, 10:45:23 PM
 #1196

I'm playing with the idea of incrementally increasing my bet based on my balance and as the balance increases the increment of the bet gets smaller. In the code below I have this working, but I'm thinking that there must be an easier or shorter way to do this with variables. If anyone has any suggestions I'd appreciate it.
About all you can do in this scenario is refactor your code slightly to avoid the script having to process every individual "if" statement by using "elseif's"... once it finds the "matching" elseif, it will drop out of the if and move on:
Code:
if balance < 0.00025000 then
  basebet = 0.00000001
elseif balance < 0.00150000 then
  basebet = (balance / 25000)
elseif balance < 0.00300000 then
  basebet = (balance / 50000) + 0.00000003
elseif balance < 0.00600000 then
  basebet = (balance / 100000) + 0.00000006
elseif balance < 0.01000000 then
  basebet = (balance / 200000) + 0.00000009
else
  basebet = (balance / 500000) + 0.00000012
end


As for using variables, I don't think that it would be "easier" or "shorter"... as you have several factors in play (ie. the divisor and the increment) which need to be modified for each "step" in your system. Potentially you could set up some arrays to hold these, like:
Code:
divisor = {25000,50000,100000,200000,50000}
increment = {0,0.00000003,0.00000006,0.00000009,0.00000012}

basebet = (balance / divisor[x]) + increment[x]

But then you're still left with trying to derive the index into those arrays... and then it gets a bit more complicated... like this:
Code:
step = 1
bal = {0.00025, 0.0015, 0.003, 0.006, 0.01, 999999999}
divider = {1, 25000, 50000, 100000, 200000, 500000}
increment = {0, 0, 0.00000003, 0.00000006, 0.00000009, 0.00000012}

while bal[step] < balance do
  step = step + 1
end

if step == 1 then
  basebet = 0.00000001
else
  basebet = (balance / divider[step]) + increment[step]
end
NOTE: This code appears to work... but I haven't tested it in the bot.

houseworx
Full Member
***
Offline Offline

Activity: 339
Merit: 100


View Profile
October 06, 2019, 08:43:34 AM
 #1197

how I can simple make something:

if currentstreak "every number" then
do something
end

11111222223333344444

for example every 5 streak next 5 streak made nextbet = previousbet + 0.00000001
Do you mean every 5 loss streak? 5 win streak? or something else?

Personally, I would do something like:
Code:
myLossStreakCounter = 0
streakLimit = 5

function dobet()
...
  if (!win) then
    -- If it was a loss, increment the counter
    myLossStreakCounter = myLossStreakCounter + 1
  end
  ...
  if myLossStreakCounter == streakLimit then
    -- reached the streak limit, increase bet and reset counter
    nextbet = previousbet + 0.00000001
    myLossStreakCounter = 0
  end
  ...

If should be relatively obvious how the code can be modified to be used for a Win streak


Quote
I dont understand, last period when bot was updates with this "blue words" in code box, they dont like = simbol.

'then' expected, got '='
This error suggests that you have a syntax error in your code. The bot thinks you're trying to use an "if something then" command, but it can't find the "then" part of the command before it finds an "=".

Usually it shows a line number where the error occurred. Check near there for incorrect code... failing that, you'd need to post the code for others to be able to debug it properly.

thanks!
houseworx
Full Member
***
Offline Offline

Activity: 339
Merit: 100


View Profile
October 06, 2019, 08:46:56 AM
 #1198

btw Seuntjie, what kind of "built-in variable" do not working at simulation?! i know there is something wrong. like example simulation dont use "profit from stats statesment" you need to write manual "own roundprofit" to use that kind of things, but what else?! simulation using "currentstreak"? etc or everthing are need to be written by "own"?!

my target is to say, simulation dont use currentstreak right or not at all in it, can be?!
seuntjie
Legendary
*
Offline Offline

Activity: 1708
Merit: 1121



View Profile WWW
October 08, 2019, 07:44:28 AM
 #1199

btw Seuntjie, what kind of "built-in variable" do not working at simulation?! i know there is something wrong. like example simulation dont use "profit from stats statesment" you need to write manual "own roundprofit" to use that kind of things, but what else?! simulation using "currentstreak"? etc or everthing are need to be written by "own"?!

my target is to say, simulation dont use currentstreak right or not at all in it, can be?!

All internal variables should be available in the simulations.

best_coins_com
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
October 27, 2019, 11:44:46 PM
 #1200

Hello.

I want to ask if you can add to bot (Im interested in website freebitco.in) sth like array with Hi Low options?

I mean i want to make autobet for example: hi, hi, low, hi, low, low, low, hi, low which will be fully random. I have my own strategy.

Is it possible?

Thanks
Pages: « 1 ... 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 48 49 50 51 52 53 54 55 56 57 58 59 [60] 61 62 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!