Skip to content

leopuzzuoli/Crash_Strategy_Tester

Repository files navigation

📈 Crash Strategy Tester 🌎

A machine to simulate bot betting strategies on a popular online casino

GitHub license GitHub license

BackgroundWhat it isWhat it's notGetting Started

Made by Leonardo Puzzuoli

Background

Roobet is a popular online casino where you can bet using cryptocurrencies. "Crash" is its most well-known game mode. In it, a spaceship races upward, taking with it a "multiplier value" until the ship randomly explodes. If a better has cashed out beforehand, they will receive the multiplier value at the time of cashing out times their initial bet. Anybody left in the game when the ship explodes will lose their bet. There is a chance for everyone to lose their bet instantly. This happens if the multiplier stops at 1.0x, in other words, if the spaceship "explodes on the launch pad". This ensures the game is in favor of the casino regardless of player behavior.

What it is

Before you can / should try your hand at gambling you should at least better understand your odds and the game you are playing. Unfortunately Crash is a very slow game, with only one round played every approximately seven seconds. This makes live testing of betting strategies and outcome data on the website impractical. Luckily, in the interest of fairness, the casino offers a way to calculate the outcome of the previous round programmatically, given the state data of the current round. With this we can iteratively collect all previous rounds that have been played in a certain session. A session lasts about 2 million games, spanning over multiple months. This program allows you to collect that data, program your trading strategies in a simple manner and replay a piece of the game's history in a matter of seconds, viewing the results and allowing for iterative design of the betting bots. After a few days of designing test strategies you should come to the conclusion that maximizing the odds of winning is possible, but requires large amounts of funds and is never guaranteed.

The tabulated result data Left shows simulation information, right is the amount of money each bot has left after every round. Not all bots make it to the end

What it's not

This is not production-grade code. It is the result of four days of tinkering around, editing code and adding features as we went along. This is not an invitation to lose your money on an online betting site.

Getting started

1.Download Project
2.install required dependencies in pipfile
3.Write your bots in the main.py file.
> Each function is a different bot. Different bots receive different parameters. Bots need to return the exit multiplier followed by the bet
4.Get the game data using get_file.py by pasting the current and first game hash into the file (can be found by clicking on past games in the timeline in Crash) and renaming the file multipliers.csv
Alternatively just use old real game data and rename multipliers_old.csv to multipliers.csv
5. Run python ./test.py

About

Simulate bot trading strategies on roobet crash

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages