BRAINROTTERS
brainrotters.com

Changelog

A log of every notable change made to the site, from first commit to latest session.

← My AI Journey Home
Mar 2026 · Session 3
Expert System, Optimizations & Changelog
New
Poker expert system — replaces Groq AI hints

Pure rule-based hint engine built in JavaScript. Covers preflop hand tiers, post-flop made hands, flush draws, straight draws, gutshots, pot odds, and positional logic. Zero API calls, zero rate limits, instant response.

k.html
New
trainer.html — side-by-side hint comparison

Added expert system hints alongside Groq responses in a two-column layout. Copy All output includes both. Ran three 15-scenario batches; expert system scored 42/45 correct (93%). Groq made all 3 errors.

trainer.html
Fix
Expert system: hole variable undefined post-flop

Draw detection used bare hole instead of p.hole, crashing silently on any one-pair or worse hand. The original bug — 7♥K♦ on 10♦J♣Q♥ returned no hint at all.

k.html
Fix
Expert system: false straight draw detection

Straight draw window check didn't require a hole card inside the window, so community-card-only straights triggered the draw path incorrectly. Added holeValSet filter.

k.htmltrainer.html
Fix
Expert system: underpair check used boardMin instead of boardMax

Pocket pairs below the highest board card should be treated as underpairs. The old check only triggered when below all board cards, letting hands like 4-4 on J-5-K-A slip through unlabelled.

k.htmltrainer.html
Fix
Expert system: pure air incorrectly returned CALL

The final fallback used to say "pot odds may justify calling" for any non-draw, non-made hand facing a bet. Now returns FOLD — no draw means no reason to call.

k.htmltrainer.html
Fix
Expert system: pocket tens/nines only raised in late position

TT and 99 had a positional guard that downgraded to CALL from early position. These are strong enough to raise from anywhere — guard removed.

k.htmltrainer.html
Update
Poker dictionary expanded from 35 to 51 terms

Added: set-mining, implied odds, suited connector, bottom pair, middle pair, pocket pair, three of a kind, four of a kind, straight flush, flush, straight, pure air, showdown, top kicker, overcards, pre-flop, flop, turn, river. All now highlight as clickable tooltips in expert hints.

k.html
Remove
Dead Groq getHint() function and exposed API key removed

149 lines of unreachable code including a live gsk_… API key were stripped after the expert system replaced the async Groq path.

k.html
Perf
Joystick requestAnimationFrame loop now stops when game isn't running

Previously jLoop() ran unconditionally from page load, burning CPU on mobile the entire time. Now tied to gameRunning and started only by startGame().

mp.html
Fix
Timer no longer counts down when the tab is hidden

Added document.hidden guard to the setInterval tick. Backgrounding the tab mid-game no longer burns through the clock.

mp.html
Perf
Particle array capped at 150

Rapid deliveries and boba pickups could spike the particle array unboundedly. Now trimmed from the front when it exceeds 150 entries.

mp.html
New
This changelog page

Linked from near the top of ai_journey.html. Derives earlier history from the journey chapters.

changelog.htmlai_journey.html
Mar 2026 · Session 2
AI Journey Page, Driving Game Upgrades & Accounts
New
ai_journey.html — full documentation site

11-chapter illustrated narrative covering the entire build history. Table of contents, ↑ Top links on every chapter, auto-updating timestamp, collapsible technical deep-dives with ⚡ lightning labels.

ai_journey.html
New
Account system — login modal on every page

PHP + SQLite + bcrypt from scratch. auth.js drop-in script adds a gold-bordered login/register modal. Sessions persist across pages. Admin link visible to pappazed only. ✨ AI Journey link shown to all users.

auth.jsauth.phpadmin.php
New
Admin dashboard

Login telemetry, account list, last-seen timestamps, account deletion. Protected by server-side username check — only accessible to the admin account.

admin.php
Update
mp.html — click-to-drive controls (desktop)

Hold the mouse anywhere on the canvas; the car steers smoothly toward the cursor. Arrow keys take priority instantly; releasing them restores click-to-drive. 8px deadzone prevents spinning at the target.

mp.html
Fix
mp.html — mobile detection bug

navigator.maxTouchPoints > 0 returns true on desktop Chrome (touchscreen laptop support), causing the joystick to appear on desktop. Fixed by switching to a user-agent regex check.

mp.html
New
mp.html — boba stop powerup system

Each delivery spawns a 🧋 Boba Stop on the road. Drive over it for +4 seconds (capped at 30s). Stops accumulate — uncollected ones stay on the map. Spawn placement filters out intersections and avoids clustering near locations or other stops.

mp.html
Update
mp.html — leaderboard username autofill

If logged in when hitting a high score, the name entry pre-fills with the first 3 letters of the account username in uppercase.

mp.html
New
trainer.html — Groq hint training tool

Generates random poker scenarios and fires them at the Groq API. Displays prompts and responses side by side. Copy All exports results. Countdown timer on rate limit hits. Built to evaluate hint quality during prompt engineering.

trainer.html
Fix
Login links missing from ai_journey.html and gramma.html

ai_journey.html was missing both the <script> tag and #auth-link span entirely. gramma.html had the script but no span. Both fixed.

ai_journey.htmlgramma.html
Early 2026 · Session 1
The Original Build
New
Site structure — brainrotters.com launched

Six HTML pages with a dark neon aesthetic. Daily rotating quotes (15 total) with deliberately mismatched Unsplash images. Links to each family member's page. Pure HTML, no frameworks, no build step.

index.htmle.htmlc.html
New
M/P driving game

Canvas-based top-down driving game. Pick up K, C, E and deliver them to destinations around a road grid. Iterated through three control systems before landing on a virtual joystick. 30-second timer, road speed boost, PHP leaderboard.

mp.htmlleaderboard.php
Fix
PHP server upgraded from version 4.4.9 (2008) to PHP 8

The leaderboard backend was rewritten twice — once for old PHP, once after the upgrade. Required a support call to the hosting provider.

leaderboard.php
New
Gramma's message board

Five color-coded message cards. Password protection via gramma_passwords.php. 500-character limit. Auto-resets every Monday morning. Purple theme throughout.

gramma.htmlmessages.phpgramma_passwords.php
New
K's poker game — initial version

Full Texas Hold'em against three AI opponents (E, C, Gramma) with distinct personalities. Debugged sequential turn queue bug. Cards redesigned three times: simple text → pip layout → emoji face cards. Removed hover animations and corner suit symbols.

k.html
Update
Poker aesthetic overhaul

Full casino visual redesign: dark felt table, gold border glow, Cinzel serif fonts, "K's Table — Hold'em" header, dealer button badge, proper pip card layouts, emoji face cards, card zoom on tap, win screen with opponent card reveal.

k.html
New
AI poker hints via Groq API

Hint button fires board state at llama-3.3-70b via the free Groq API. Prompt engineering iterated to 72% token compression (408 → 116 tokens). Achieved 15/15 accuracy on test scenarios. 33-term poker dictionary with inline tooltips and popups.

k.html
Fix
Rate limit handling — RPM vs TPD separation

Per-minute limits get exponential backoff retries with live countdown display. Daily token limit (TPD) aborts the remaining queue immediately and shows a reset countdown. AbortController adds a 20-second request timeout.

k.htmltrainer.html
New
Gramma's page linked to account system

If already logged in, the password prompt is skipped automatically. Gramma's page reads the active session from auth.js and pre-authorises the edit form.

gramma.htmlauth.js