AutoTableTurf
Automate the Tableturf game helping you reach Level 999 and get all sleeves by AI.
Install / Use
/learn @fga401/AutoTableTurfREADME
NOTICE
Due to the recent UI update in the game, all detection box positions must be updated before running this project. https://github.com/fga401/AutoTableTurf/issues/9
AutoTableTurf
Automate the Tableturf game helping you reach Level 999 and get all sleeves. The script is based on image recognition and bluetooth emulator to auto play Tableturf.

Features
- Simple web portal.
- AI that can beat Level 3 NPC.
- Complete flow control. Once win a NPC 30 times, auto switch to the next one.
Getting Started
prerequisite:
- Python >= 3.9.0
- Bluetooth adapter. Tested on
- Windows Subsystem for Linux with a motherboard built-in bluetooth device.
- Raspberry 4B.
- Capture card. Tested on Razer Ripsaw HD.
Note: all parameters about image recognition are based on Razer Ripsaw HD. It may need to finetune for other devices.
Install the requirements:
sudo pip3 install -r requirement.txt
Setup and run the virtual controller server on the device which has Bluetooth adapter. Please refer to: https://github.com/fga401/AutoTableTurf/tree/master/controller/nxbt_server
Run the web portal:
export FLASK_APP=portal
sudo python3 -m flask run --host=0.0.0.0
On the web portal:
- enter the virtual controller server endpoint and click
Connect. If successful, you can control your Switch by keyboard. - Choose the correct webcam whose source is Switch.
- Write the profile on the right side.
- Go to the NPC selection page.
- [Optional] Set the timer to auto stop. Also, you can check the checkbox
Turn off Switch after stop. - Click 'Run'.

Profile example:
[
{
"current_level": 1,
"current_win": 2,
"target_level": 3,
"target_win": 30,
"deck": 0
},
{
"current_level": 3,
"current_win": 12,
"target_level": 3,
"target_win": 30,
"deck": 1
}
]
Each block represents the configuration of an NPC. The above profile performs the following actions:
- Use Deck 0 to play against the first NPC Level 1 until one win.
- Use Deck 0 to play against the first NPC Level 2 until three wins.
- Use Deck 0 to play against the first NPC Level 3 until thirty wins.
- Use Deck 1 to play against the second NPC Level 3 until eighteen wins.
Demo
Plan
- [x] Virtual controller API
- [x] Screen capturing
- [x] Screen recognition & Game flow testing
- [x] Smarter AI
- [x] User-friendly interface
Known issues
- don't use Deck 11, which is prone to crash. #4
Credits
Many thanks to all below repositories:
- https://github.com/Brikwerk/nxbt for implementing a Python API of Switch controller.
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
