Git Product home page Git Product logo

saltbot's Introduction

SaltBot Build CodeFactor DeepScan grade GitHub issues GitHub stars GitHub forks

A betting bot for SaltyBet.com

  • Read about it here and learn how to use it here.
  • Download sample data(match record and chromosome) above or click here.
  • Install the Add-On from Firefox here.

System Requirements

Minimum Specs:

  • Dual core processor 1.5Ghz+
  • 4gb DDR3 RAM 1333mhz

Recommended Specs:

  • Quad Core processor 3.0Ghz+
  • 8gb DDR3 RAM 1600mhz

Installing latest version(Firefox)

To install the git version of this extension:

  • Clone the repo:
    git clone https://github.com/saltbot-org/saltbot.git
  • Make sure you have Latest Node.js installed. It is available at https://nodejs.org/en/download/
  • For Ubuntu/Linux Mint Users Follow this guide to install Nodejs ver. 14.x and be sure npm is installed
    sudo apt install npm
  • Open the command line and go to the base of the project where the file package.json is located
  • Run
    npm install && npm run build
  • Open about:debugging#/runtime/this-firefox
  • Click "Load Temporary Add-On..."
  • Import the data and chromosome files
  • Select your preferred mode and settings and let it run.

This version of Saltbot will only be available until Firefox is closed.

Bug Reports

Please be sure to Read the bug reporting guide before you submit a bug report!

The more info you provide, the better we can diagnose the issue and remedy it.

Screenshot

Subreddit

We have a subreddit for saltbot now at /r/saltbot. Use this for extensive discussions of saltbot's features, improvements, strategy, etc.

Twitch Channel

We now have a twitch channel where you can see the bot running live, be sure to swing by and follow!

Contributors & Members

Click here for the current list of Contributors and Members

saltbot's People

Contributors

aciil avatar calexil avatar dependabot-preview[bot] avatar dependabot[bot] avatar hotpotsoup avatar nevynpa avatar olddragon2a avatar reconman avatar renovate-bot avatar renovate[bot] avatar s0t0 avatar synkarius avatar zgf2022 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

saltbot's Issues

Will no longer let me import records/chromosome.

Had this up and running just fine, had to reformat my computer. Saved two copies of my records, yet I cant get the extension to import them for some reason. Never had this issue before, not sure how to trouble shoot it. Tried to upload the seed data just to test, screen pauses like its going to import but then it doesnt. No message in the developer console confirming successful import of records either.

Any help?

Settings Save Failure

There is something wrong with chrome storage, settings aren't getting saved correctly.

Option for a bet multiplier?

Let's say I got 1 million salt and I want to tell the bot to bet 10,000 * confidence instead of 1000 * confidence. A number field in the SaltBot UI would be nice where you could set that multiplier.

So far the only option for something similar is the Aggro mode.

salty.js does not receive any waifu messages after today's saltybet update

chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
...
}

in salty.js, line 362 is not triggered anymore.

twitch_content.js executes

chrome.runtime.sendMessage({
message : Waifu4uLines[j]
}, function(response) {
console.log("response received in twitch content");
});

(lines 41-45) but nobody receives the messages sent.

This leads to mode, tier, odds and time(?) not being detected anymore.

Feature: tier information

  • Rather than a simple number of wins and losses, wins and losses should be lists, each containing characters which represent the tier which the match was won or lost in
  • all data collected already will go into the category "u", meaning unknown tier
  • tier information can then be weighted with wins in higher tiers and losses in lower tiers than the current counting more and the inverse counting less
  • also detect exhibition matches, count them as their own tier

Bets blocked by Uncaught TypeError

When set to cowboy or scientist I can't seem to get any bets in, the console spits out:

Uncaught TypeError: Cannot read property 'classList' of undefined
Strategy.getBailout @ strategy.js:15
Strategy.getBetAmount @ strategy.js:75
Match.betAmount @ tracker.js:82
(anonymous function) @ tracker.js:132

Faulty winner console output

Winner output in console after a match will sometimes say 0 even if you win the match. I have yet to see the converse happen (winner = 1 when you lose the match).

EDIT: I just saw the converse happen where I lost a match and it said I won.
Happens quite frequently. In 5 matches, 2 of the results were faulty.

EDIT2: My apologies I thought the winner was a boolean did you win or lose value. Didn't realize until now Winner 0 represents a win for character 1 and Winner 1represents a win for character 2

Illuminati status is not detected correctly

You didn't and couldn't test if your new code detects the illuminati status correctly again. Instead of "goldtext" being the class of the span-element with the class "navbar-text" it's the class of the span element inside of that.

My newest pull request should fix that and also the declaration of level and the half-finished "document.get" line.

Ideal genetic weights found?

I'll leave this here if you want to change the initial genetic weights. After several generations no better weights can be found.

this.oddsWeight = 1.8549966520931462;
this.timeWeight = 1.1031189409244249;
this.winPercentageWeight = 2.9077989478042916;
this.crowdFavorWeight = 0.005112205084118831;
this.illumFavorWeight = 0.0009473630531161294;
this.minimumCombinedConfidenceForLargeBet = 0.48436656617494533;
this.minimumMatchesForLargeBet = 4.010238368527831;
this.useMinCon = 0.09207601707935577;
this.useMinMat = 0.11168438672383378;
this.useSimilarAbility = 1.5940199534268533;
this.wX = 75.72081773128612;
this.wS = 4.446050435498266;
this.wA = 0.3958316441822831;
this.wB = 0.21452716623874007;
this.wP = 56.30064815598871;
this.wU = 0.3284199607517061;
this.lX = 0.031386742689349045;
this.lS = 0.0528898832275746;
this.lA = 0.23679703153685597;
this.lB = 1.310069078919525;
this.lP = 1.3497754158286093;
this.lU = 0.5759811344280866;
this.oX = 18.018743043251796;
this.oS = 50.359728703405466;
this.oA = 1.0130400620460684;
this.oB = 11.525905368908644;
this.oP = 1.0639248762090212;
this.oU = 2.8625219602163847;
this.wtX = 29.006814043297485;
this.wtS = 0.24564509064194154;
this.wtA = 1.6515435777948981;
this.wtB = 0.02434766938025773;
this.wtP = 0.6999303551497656;
this.wtU = 0.1945792668725041;
this.ltX = 30.011088094612226;
this.ltS = 40.99241754969083;
this.ltA = 5.174790332614436;
this.ltB = 0.4423742809713067;
this.ltP = 0.8504435722652295;
this.ltU = 0.6809271710393173;

mirror matches

A mirror match will cause the character to get one win and one loss, which doesn't help pit the character against other characters accurately. Mirror matches should be handled like draws.

Fitness score modifications

What else can be added to the fitness score?

  • if I make the minimum number of matches part of the chromosome, I can also try to make it maximize the number of matches bet on;
  • similarly, I could do money in the simulator on all matches that have odds if I can link the betting amount to the chromosome somehow

Mass Twitch.TV tabs being opened.

twitch_background.js

    if (details.getTwitch !== undefined) {
        chrome.tabs.query({
            url : "http://www.twitch.tv/saltybet"
        }, function(result) {
            if (result.length == 0)
                chrome.tabs.create({
                    url : "http://www.twitch.tv/saltybet"
                });
        });
    }
});

Causes the twitch.tv tab to constantly open, is there any reason for us to open this and have the saltybet page open?

Saltbot will not bet the correct amount on tournament finales

Just now I've had a tournament finale with 3700 balance which is the same as the bailout amount. The bot calculated 88.9 % confidence and bet 89.

The text on the bottom is different in the finale than in all other matches. That's why the bot thinks it's not in a tournament anymore.

The next time I see a tournament finale I can add the text to the tournament indicators. (tracker.js, lines 121-122)

Feature: automatic crash detection

Write a separate extension which runs in another specified tab, uses messaging to periodically check for a pulse from selected tabs, if no response comes, reopen those tabs.

Feature: default settings changeable

  • Make the last button the user clicked the default mode after a reload.
  • Make the CS strategy use the best current chromosome on reload rather than the vanilla one.

Tournament mode is not flexible for Levels and Illuminati status

In strategy.js you hardcoded 1000 and 2000 for tournament mode. With higher levels the amount you get at the beginning of tournaments increases, especially for Illuminati.

Can you somehow detect the current level and illuminati status and use the calculated starting amount as basis for your tournament calculations instead of 1000?

You should also define something like
if (confidence > 0.9) {
confidence = 1.0;
}
as betting 90% of all your tournament balance doesn't really make sense.

Firefox

Is there any way to get this working in firefox? Would like to run this on my VPS but Chrome doesn't work well in an OpenVZ environment.

Thanks.

Ranking tree

Add a ranking tree to the ConfidenceScore decision logic. Should figure out that if character a beat character b and character b beat character c, that when a and c fight, a should get some confidence credit.

Scientist selection does not seem to work

Selecting the scientist option in the dialogue doesn't seem to change the betting strategy, the other options work fine.

Expected: Console echoes that the strategy has changed.

Actual: There is nothing echoed to the console and the strategy is not changed.

match record duplication

Sometimes match records are saved twice. The same might be happening to character records, but since character records are overwritten, it would be invisible.

Copy of database

Could you include a copy of your database that could be loaded to seed the extension?

Don't record exhibition matches

Exhibition matches should not be recorded as users deliberately choose weaker characters with advantages against strong characters. One example would be 12P versions of usually weak characters who are as strong as X-Tier characters.

Stop betting after reaching $______

Since I have old data (no data), I want saltbot to bet until it 'gets lucky'. So it'd be useful to have saltbot engage monk mode after exceeding a user defined amount. This way new users don't need to wait weeks for saltbot to gain experience.

UI Button Disappearing

I know this was mentioned about a month ago, but the UI button disappears for me once I actually start running the bot. It still works and it will still bet, but I can't get it to come back no matter what, so if I want to turn it off I have to disable the extension/reenable it to turn it back on.

That also means I can't adjust my settings, and I'm stuck in Scientist now and want to go back to Monk. If I uninstall/reinstall it fixes it, but after running it a few times it will inevitably disappear again, and having to keep uninstall/reinstalling is a pain.

Save bettor records

Could be used to figure out who the most accurate bettors are, then add a favor score for them

Fix the chart to make it fair

When generating the chart, it should really allow each strategy to bet on all matches, rather than displaying only the matches that the strategies actually bet on. Not doing so gives an unfair advantage to newer strategies which have more data.

Feature: adjust the cs algorithm

  • Play with the weights ( actually a great genetic algorithm problem, fitness score is the win percentage )
  • Once the weights have been optimized, figure out the confidence threshold for bet failure, and start adjusting the betting amount when confidence is too low

UI mostly not working.

By the looks of it, aside from importing records, there's a problem with the UI accepting inputs when you click on an option. After right-clicking on the UI to look at the console, it's giving me this error:

Uncaught TypeError: Cannot read property 'addEventListener' of null

If I click to see where the error is coming from, I'm directed to this line which is highlighted in red:

document.getElementById("bsc").addEventListener("click", function() {

I have very little knowledge on coding and programming, but I love the bot and the app and figured I'd help if I could, provided this hadn't already been noticed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.