Pages:
Author

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

member
Activity: 270
Merit: 10
No update about more than a month about about the bot on this discussion board. Programmers stopped the discussion or they just left the topic or will start asap just a break.

is the main forum for the bot , maybe they're out there , I'm always there to ask
hero member
Activity: 1134
Merit: 517
No update about more than a month about about the bot on this discussion board. Programmers stopped the discussion or they just left the topic or will start asap just a break.
legendary
Activity: 1717
Merit: 1125
Is there an easy way to change bets based on luck percentage?

such as..

Code:
if luck<=100% then nextbet=basebet*multiplier
  else
   nextbet=basebet

If not then what's an easy way to calculate the luck percentage and apply the above code?

iirc there is no luck variable available in the programmer mode. You can see the method DiceBot uses to calculate luck at https://github.com/Seuntjie900/DiceBot/blob/master/DiceBot/cDiceBot.cs#L1392. Do with that what you want
newbie
Activity: 23
Merit: 1
Is there an easy way to change bets based on luck percentage?

such as..

Code:
if luck<=100% then nextbet=basebet*multiplier
  else
   nextbet=basebet

If not then what's an easy way to calculate the luck percentage and apply the above code?
newbie
Activity: 23
Merit: 1
Aha, very nice. I'll have to do this. Thanks.
HCP
legendary
Activity: 2086
Merit: 4314
Well, technically that could also be used as "a single command to type while [your] script was going"... If you were to type:
Code:
stoponwin = true
on the console when the script is running... then on the next win, the script will stop.

In fact, that is how I generally use it. You don't even need the "if (profit)" check or anything other condition to set stoponwin for that matter... just the:
Code:
  if (win) then
    if (stoponwin) then
      stop()
    end
  end
newbie
Activity: 23
Merit: 1
Thanks. Might be useful, but I was hoping for a single command to type while my script was going. I find it odd that there's stop on win button available for the advanced mode, but not programmer mode.
HCP
legendary
Activity: 2086
Merit: 4314
As far as I know, there is no stoponwin() function or anything like that... You have to code that into your script yourself.

Code:
if  then
  stop()
end

I've used a boolean flag before, to "stop on next win" etc...

Code:
...
stoponwin = false
...
function dobet()
  ...
  if (win) then
    if (stoponwin) then
      stop()
    end
  ...
  end
...
  if (profit > 0.001) then
    stoponwin = true
  end
...
end
newbie
Activity: 23
Merit: 1
Anyone know if in the console there's a command to stop on a win when running a script or is stop() the only way to stop it?
HCP
legendary
Activity: 2086
Merit: 4314
question.bet on DiceBot . the result would be the same. if you would bet on the site
The short, very generalised, answer would be "Yes".

The long answer would be it depends on the website and how it implements client seeds and/or your ability to change/specify them. But, generally speaking, if you're using the same seed and/or nonce in the bot as on the website, then yes the results would (should) be identical regardless of whether or not you used bot or web browser.

newbie
Activity: 23
Merit: 1
I understand where you're coming from in regards to the gambler's fallacy. I would say however that there is something to be said about a certain equilibrium being maintained within a certain set of numbers when also taking standard deviation into account. In no way would I say that previous results dictate future ones, but I would say that betting with probabilities would more likely be beneficial rather than betting against them. Could be flawed logic on my part, but it's still interesting and fun to explore. I'm not out to create a bulletproof script, just one that maximizes the chances for survival based on statistical analysis. I do appreciate your input and the help you've given me with my code and will continue to learn more about LUA scripting. I'm not trying to set the world on fire or anything, it's just a fun rabbit hole I've recently discovered that seems to have no bottom.
legendary
Activity: 1717
Merit: 1125
Personally, I believe that is somewhat flawed logic (basing your decisions on past results) and getting into "gamblers fallacy" territory... given that each roll is independent, the probabilities are (should be?) exactly what you choose for your "chance" (minus the house edge, of course). Wink Tongue

To make the most of those bet history functions, you're going to need an understanding of SQL queries (especially for getHistoryByQuery()) and/or the Dicebot Database schema.

A SQLite DB browser like this one will let you look through the database structure to get an idea of the data that is stored. As for SQL queries, there are plenty of tutorials available online to explain how "SELECT" statements work.

+1

+1

+1
HCP
legendary
Activity: 2086
Merit: 4314
Personally, I believe that is somewhat flawed logic (basing your decisions on past results) and getting into "gamblers fallacy" territory... given that each roll is independent, the probabilities are (should be?) exactly what you choose for your "chance" (minus the house edge, of course). Wink Tongue

To make the most of those bet history functions, you're going to need an understanding of SQL queries (especially for getHistoryByQuery()) and/or the Dicebot Database schema.

A SQLite DB browser like this one will let you look through the database structure to get an idea of the data that is stored. As for SQL queries, there are plenty of tutorials available online to explain how "SELECT" statements work.
newbie
Activity: 23
Merit: 1
That code will work for my purposes for now, but eventually I'd like to create something that can calculate the probabilities of wins or losses based on number of wins and also based on what numbers have come up. Then I'd adjust my multiplier and/or basebet based on the probabilities. I'm looking at the bet history functions and they're a bit over my head, but I am at least learning more as I go along.
HCP
legendary
Activity: 2086
Merit: 4314
Are you talking about a snapshot of the current "profit" after 100 bets? or are you wanting to do something a little more complex?

If it is a simple "what is current profit after 100 bets" scenario, I would personally just have a counter and a "startBalance" variable...

Code:
... stuff ...
startBalance = balance
count = 0

function dobet()
 
  ...
 
  count = count + 1
  nextbet = previousbet * multiplier
  if count >= 100 then
    count = 0 -- reset counter
    -- check profit
    if balance - startBalance >= 50 then
      nextbet=basebet
      startBalance = balance -- reset "profit" base value
    end
  end

  ... other stuff ...

end

If it is something more complex, then the bet history functions might be a better idea.
legendary
Activity: 1717
Merit: 1125
Now I've got another new idea unrelated to my previous one. Lets say I want to analyze a group of bets, 100 for instance, and I want to be able to bet a multiplier based on whether or not a certain profit has happened. So in 100 bets if there is 50 or more units of profit then nextbet=basebet otherwise nextbet=previousbet*multiplier for another 100 bets. Rinse and repeat.

Be sure to take a loot at the bet history functions on https://steemit.com/seuntjie/@seuntjie/dicebot-programmer-mode-tutorial-01-2-functions. For the query function, you need to specify the whole select statement.
newbie
Activity: 23
Merit: 1
Now I've got another new idea unrelated to my previous one. Lets say I want to analyze a group of bets, 100 for instance, and I want to be able to bet a multiplier based on whether or not a certain profit has happened. So in 100 bets if there is 50 or more units of profit then nextbet=basebet otherwise nextbet=previousbet*multiplier for another 100 bets. Rinse and repeat.
newbie
Activity: 23
Merit: 1
Nice. That's super elegant and works well. It's easy to modify too. Thanks again, you rock dude.
HCP
legendary
Activity: 2086
Merit: 4314
If you are wanting to do that, it would probably be better to use a "table" to hold the last X results... rather than creating a bunch of similarly named variables. It'll be more flexible and provide for easier expansion.

Code:
------------------------------------------------------------------------------
-- Script v2 for sleeyeyed
-- by HCP
------------------------------------------------------------------------------
-- NOT TESTED THOROUGHLY, use at own risk.
------------------------------------------------------------------------------
basebet=10
nextbet=basebet
chance=33
streakTable = {}

function dobet()

  -- keep track of last 5 results
  for i=5,2,-1 do
      streakTable[i] = streakTable[i-1]
  end
  streakTable[1] = win

  if win then
    nextbet=previousbet*.75
    if (streakTable[2] == false and streakTable[3] == true and nextbet > 20) or
      (streakTable[2] == false and streakTable[3] == false and streakTable[4] == true and nextbet >20) or
      (streakTable[2] == false and streakTable[3] == false and streakTable[4] == false and streakTable[5] == true and nextbet >20) then
      -- WLW or
      -- WLLW or
      -- WLLLW sequence with nextbet > 20, so reset to basebet
      nextbet = basebet
    end
  else
    nextbet=previousbet*1.15
  end

  if nextbet < 10 then
    nextbet = basebet
  end

end
newbie
Activity: 23
Merit: 1
Works great! Thanks HCP. Ok, so for some more fun could we add a condition where it will reset to base after a WLLW and a WLLLW situation at the same time that the WLW condition is also running? My mind is having trouble deciphering the logic here. I'm guessing there needs to be a previousResult3 and previousResult4 in there, but don't know how to place it correctly.
Pages:
Jump to: