NOTE: I "vibe-coded" through this project; Tldr: Aviator is extremely random and is a zero-sum game except for the fact that you are the one who will keep losing! Please don't even try it.
- The
main.pyscript is designed such that Aviator runs on a secondary monitor with the comments section closed. You may need to adjust this. - You can uncomment the
cv2.imwrite()lines to log screenshots for debugging.
This project implements a machine learning-based prediction system for the Aviator game, a multiplier-based betting game where players need to cash out before the "plane" flies away. The project consists of two main components:
main.py: Real-time game state monitoring and data collectionpredictor.py: ML-based prediction and automated betting strategy
The Aviator game operates on the following principles:
- Each round starts with a multiplier of 1.00x
- The multiplier increases over time
- Players must place bets before the round starts
- Players must cash out before the plane "flies away" to win
- Maximum of two active bets per round
- If you don't cash out before the crash, you lose your bet
- Real-time game monitoring and crash point prediction
- Dynamic bet sizing based on confidence levels
- Adaptive strategy adjustment based on performance
- Comprehensive logging and performance tracking
- Automated risk management
- Uses computer vision (OpenCV) to monitor game state
- Captures multiplier values in real-time
- Detects game end ("FLEW AWAY") events
- Records game data to CSV for analysis
- Implements robust error handling and logging
- Kelly Criterion implementation
- Dynamic risk adjustment
- Balance protection mechanisms
- Progressive bet sizing
- Win streak factoring
- Detailed game logging in CSV format
- Real-time performance metrics
- Skip analysis and evaluation
- ROI tracking
- Win rate analysis
pandas
numpy
xgboost
scikit-learn
matplotlib
seaborn
opencv-python
pytesseract
mss
- Clone the repository:
git clone https://github.com/kbuika/aviator-logger.git
cd aviator-logger- Install dependencies:
pip install -r requirements.txt- Install Tesseract OCR:
- For MacOS:
brew install tesseract - For Ubuntu:
sudo apt-get install tesseract-ocr - For Windows: Download installer from https://github.com/UB-Mannheim/tesseract/wiki
- Configure your display settings:
- Ensure the game window is visible on a secondary monitor
- Adjust screen resolution if needed
- Start data collection:
python main.pyThis will start monitoring games and collecting crash data.
- Run the predictor:
python predictor.pyThis will start the automated betting system.
- Initial Balance: $1000 (configurable)
- Base Target: 1.5x (adaptive)
- Maximum Target: 3.0x
- Base Risk: 3.5% per trade
- Maximum Risk: 5% per trade
- High (80-100%): Up to 50% larger bets
- Medium (65-80%): Up to 30% larger bets
- Low (50-65%): 50-100% of base bet size
- Below 50%: Skip game
- Analyzes every 5 games
- Adjusts targets based on win rate
- Modifies risk based on balance trend
- Updates confidence calculation based on performance
main.py: Game monitoring and data collectionpredictor.py: Betting strategy and prediction logicgame_data.csv: Raw game datagames_played.csv: Betting history and resultstrading_performance.png: Performance visualization
The system tracks:
- Win/Loss ratio
- ROI per session
- Total profit/loss
- Skip accuracy
- Confidence correlation
- Risk exposure
-
Balance Protection
- Reduces risk when balance drops below 80% of initial
- Increases risk when performing well
- Maximum bet size limits
-
Risk Management
- Kelly Criterion for optimal bet sizing
- Dynamic risk adjustment
- Win streak consideration
- Volatility-based risk scaling
-
Loss Prevention
- Skip low-confidence games
- Progressive target adjustment
- Automatic session reset on depletion
Feel free to submit issues, fork the repository, and create pull requests for any improvements.
This project is licensed under the MIT License - see the LICENSE file for details.
This software is for educational purposes only. Trading involves risk of monetary loss. Past performance is not indicative of future results.