Bet or skip: Gemma reads the bet slip on my laptop, and the slip's own arithmetic checks Gemma
Описание и применение
betorskip использует Gemma 4 и Tesseract для чтения ставок, проверяет арифметику и применяет правила банка, выдавая BET, SKIP или CHECK локально.
Задача
Betting rules are hard to apply consistently; bettors need a tool that reads a bet slip, verifies all numbers, and enforces their bankroll rules locally without sharing data.
Результат
betorskip accurately classifies 24 out of 24 new‑style screenshots, with only one misclassification, and provides transparent arithmetic checks and rule enforcement locally.
Рабочий процесс
- Paste or point to a bet slip (text or screenshot).
- Gemma 4 reads the slip via Ollama on localhost, returning facts with exact source quotes.
- Code validates each fact: quote present, number matches, label correct, odds formatted as printed.
- Code checks slip’s internal arithmetic: stake×odds equals return, legs multiply to total odds, leg count matches market type.
- Apply user‑defined bankroll rules from a TOML file (max stake %, house margin limits, etc.).
- Output one word: BET, SKIP, or CHECK, with explanatory note.
Доказательства
betorskip takes a bet slip (pasted text or a screenshot) and gives one word back:
Python, no dependencies, about 1,060 lines plus 134 tests. It needs Ollama with gemma4:12b, and Tesseract for screenshots.
A fact survives only if its quote is really on the slip, its number is really in the quote, and the right label sits next to it.
The wrong BET is the number to keep in mind. Tesseract dropped the "Draw 3.20" line of a market where the house keeps 14.4%; with two prices out of three there is no margin to compute, so the margin rule had nothing to apply to and the slip passed.
- Дата записи: 2026-10-13T13:55:54.260Z