Inspiration
Every poker hand comes down to one question: is this call worth it? Experienced players answer it with odds they've memorized. Beginners, like us, mostly guess. We wanted a tool where you set up the exact spot you're in, press one button, and let the math do the thinking. No brain required, which is where the name came from.
We're four first-time hackers. One of us knew C++, the other three knew Python and Java, and none of us had built a web app before this weekend.
What it does
No-Brain Poker is a Texas Hold'em hand analyzer.
- Set the scene. Click the cards on the felt table to pick your two cards and any board cards (flop, turn, river). Choose how many opponents are still in (1 to 8), how much is in the pot, and what it costs you to call. Seats and chips appear around the table to match.
- Press Calculate. The app deals out the rest of the hand 10,000 times at random and counts how often you win, tie and lose.
- Get an answer. You see your chance of winning, the pot odds, the expected value and a plain recommendation: fold, call, raise, check or bet.
- Ask the coach. An AI coach built on Google's Gemini API receives the simulation results and explains why that's the move. It also answers follow-ups like "what if they go all-in?"
How we built it
We used plain HTML, CSS and JavaScript with no frameworks, plus a small Node.js server.
deck.jsandhandEvaluator.jsbuild the deck and find the best five-card hand out of seven.monteCarlo.jsruns the simulation. It deals random hands to every opponent, fills in the missing board cards, compares hands, and repeats 10,000 times.script.jsandtable.jsconnect everything to the page and draw the seats, cards and chips.gemini.jsandserver.jstalk to Gemini. We never put an API key in our code. Right now you paste your own Gemini key into the app, and our server can keep a key in a.envfile that is never uploaded to GitHub.
The decision math (a tie counts as half a win):
$$\text{equity} = P(\text{win}) + \tfrac{1}{2}\,P(\text{tie})$$
$$\text{pot odds} = \frac{\text{call}}{\text{pot} + \text{call}}$$
$$\text{EV} = \text{equity} \times (\text{pot} + \text{call}) - \text{call}$$
If your equity is higher than the pot odds, calling makes money in the long run. If it's higher by a wide margin, we suggest raising.
Sam built the simulation engine and page logic, Devanshi designed the interface, Chris built the Gemini coach and the server, and Daniel wrote the strategy rules, tests and README. We used AI assistants (ChatGPT and Claude) to help write, debug and test parts of the code.
Challenges we ran into
- Ace-King said "fold." Part of our first version was AI-generated. When we tested Ace-King against several opponents, it told us to fold. The simulation was fine, but the decision rule wasn't. It trusted whatever pot the user typed, even when that was impossible: if 8 opponents have each called $50, the pot is at least $400. Old results also stayed on screen after you changed your cards. We fixed both.
- Trusting our own numbers. That bug made us question whether the engine itself was right, so we checked it against an independent hand evaluator.
- Git. This was our first time working together in one repo. We hit rejected pushes, merge conflicts, and once even committed conflict markers into
index.html. - Keeping the API key secret in a public repository.
- Fitting 1 to 8 opponents around an oval table so the seats, cards and chips never cover the board, on both laptops and phones.
Accomplishments that we're proud of
- Our engine agreed with an independent hand evaluator on all 300,000 showdowns we tested. In our tests, pocket aces beat one opponent about 85% of the time, which matches published poker odds.
- Four beginners built a complete working app in under 24 hours.
- The coach explains the math instead of just handing you an answer.
- The table feels like a real game, with real card images, seats and chips.
What we learned
- JavaScript, HTML and CSS, coming from C++, Python and Java.
- Monte Carlo simulation: when something is hard to calculate exactly, simulate it thousands of times and count.
- Poker math: equity, pot odds and expected value.
- How to collaborate with git and GitHub, and how to recover when it goes wrong.
- How to use an API without leaking the key.
- AI-written code can look right and still be wrong. Now we test it against answers we already know.
What's next for No-Brain Poker
- Send every coach request through our server, so users don't need their own Gemini key.
- Opponent reading: estimate which hands an opponent likely holds based on how they've bet, instead of treating every hand as equally possible.
- Pre-flop hand charts and a hand history for reviewing past decisions.
- Faster simulations, so we can run far more than 10,000 deals instantly.
Log in or sign up for Devpost to join the conversation.