[MAX] ML Anti XRay
Automatically flag potential xrayers with Machine Learning
[MAX] ML Anti XRay
AI Anti-Xray Detection Plugin
This plugin is designed to help Minecraft server administrators detect and prevent x-ray cheating using a simple AI model. It monitors players' ore mining behavior and collects various data points to determine if a player is likely using x-ray mods.
---
Key Features
- AI-Driven Detection: The plugin uses two sets of model weights (for legit and x-ray behavior) to compute a confidence score indicating the likelihood that a player is x-raying.
- Rotation from last ore - Rotation from last ore Tracks the distance from the last mined ore. - Rotation from last ore Determines whether an ore was naturally visible or revealed due to nearby block breaking. - Rotation from last ore Data is only recorded once per ore vein to avoid duplicate counts. - Rotation from last ore Maintains a rolling history of ore mining events (default: 10 minutes). - Rotation from last ore: Checks how big of a rotation you'd have to do in order to reach an ore from the last one.
- Xray Training: Use the `/train <legit|xray>` command to adjust the AI model weights based on player behavior. This allows the model to learn and improve over time: - Xray Training: Adjusts the model if a player is confidently a legitimate miner. - Xray Training: Adjusts the model when a player is detected as using x-ray mods.
- Customizable Configuration: Configure the plugin via `config.yml` to set: - Flag threshold (confidence percentage). - Flag messages. - List of ores to monitor. - Mining time window for data collection. - And more...
- Automatic File Management: The plugin automatically creates necessary folders and files (e.g., ML/legit.dat, ML/xray.dat) if they do not exist, ensuring smooth first-time setup.
---
How It Works
1. Data Collection: - When a player breaks a block, the plugin checks if it's an ore of interest. - If a non-ore block is broken, the plugin scans adjacent blocks for ores and marks them as "revealed." - When an ore is mined, the plugin checks if it was naturally exposed (i.e., visible without needing to break any adjacent block) before recording the event.
2. Count The plugin calculates: - Count to the ore. - Count from the previous ore break. - Count (using the revealed ore list). - Count of similar ores mined within the configured time window.
3. AI Prediction: The collected features are processed through a weighted model, and a confidence score is computed that indicates the likelihood of x-ray usage.
4. Training & Adaptation: The `/train` command allows administrators or trusted players to train the model based on observed behavior, updating the weights stored in `ML/legit.dat` or `ML/xray.dat`.
5. Flagging Suspicious Behavior: If the confidence score exceeds the configured threshold, the plugin flags the player which then notifies staff of their potentially unfair behaviour.
---
Usage
- Installation: Place the plugin jar into your server's `plugins` folder. On first run, the necessary configuration and ML data files will be created automatically.
- Configuration: Edit `config.yml` in the plugin’s data folder to customize the detection thresholds, messages, and ore list.
- Commands: - `/train <legit|xray>` Use this command to train the AI model based on a player's recent mining behavior.
---
Conclusion
This AI Anti-Xray Detection Plugin leverages in-game data to help maintain a fair play environment on your server by dynamically learning and adapting to player behavior. Enjoy a smarter, self-improving system for combatting x-ray cheats!
Feel free to reach out with feedback or suggestions to improve the plugin further. Happy mining!