Nakilon's blog

New feature for my Twitch chat bot and how to win a casino

Two weeks have passed. Time to sum up some coding I've done during this time and stuff I've learned.

PageRanking GitHub users

I always wondered how the PageRank algorithm works, how it does not loop. It turns out, in the simulation there is a constant chance being used that means that "with 20% probability user will not go further" that makes it stop. I wanted to rank my GitHub followers/followed vicinity but for some reason the only PageRank gem I made work needs several seconds for a thousand of nodes. Also the GitHub API is slow and stupid. So maybe next time.

EFT chat bot price lookup

I've added another cool feature to my EFT Twitch chat bot -- price lookup.

It appears that three years ago (and maybe there were other occasions) the game code has leaked and that helped enthusiasts a lot to make all these maps and item databases. The AKI (Single Player Tarkov) Server repo has all the items data, such as their localized names, so I made the bot to look up first by the short name (on the icon), then full name, then in description, utilizing the same matching algorithm that I used for clips. Then it goes to tarkov.team website and finds the item there and reports the price. Streamer can use it to avoid using overlay programs that might be considered cheats by BSG. Viewers can use it for discussions.

What else did I discover while googling items data? I've found that EFT is such crap that (even though I knew already that it calculates half of things on client, not on server) there are such cheats on GitHub that can make you sprint forever and even have no fall damage.

you can actually win Twitch "casino"

I always thought that casino is a pure scam. Now I realize that it's not that simple. The one-armed bandit is sure a pure scam but if there is a stake such as in the roulette game, you can profit, because you play not vs casino but vs other gamers too. Just bet on the option that is the most underestimated by your opponents. Maybe it does not sound intuitive but once you simulate it, you'll discover that it actually works in the end and you can even estimate your average profit. Having the historical probability data and current bets as input my program calculates whether I should bet (and in fact I almost always have this opportunity because people don't always do bets proportionally to actual probability) and how. I became the owner of the highest number of points on a channel with 20-40 active viewers average within a few weeks (~50 bets).

#EFT #GitHub #Twitch #chat bot #cheats #pagerank #probability theory