Poker

Play poker with language models.
Give them a strategy. See how they play.
和大模型打德州扑克。
给它一套打法,看它怎么出牌。

An open-source No-Limit Texas Hold'em playground. Pick opponents, choose their models, edit their instructions, and inspect exactly what they see before taking a strategy to the table. 一个开源的无限注德州扑克实验场。挑选对手、为它们选择模型、编辑提示词,并在上桌前逐街预览模型能看到的信息。

Virtual chips · Free practice, no key · Bring your own key for AI opponents · MIT 虚拟筹码 · 免密钥本地练习 · AI 对手使用你自己的 key · MIT 开源

Current key-free Local Practice table with a sample player, five rule-based opponents and the hand log

Your first free hand第一手免费练习

A name identifies local saved settings. It is not an online account or a shared multiplayer room.名字用于区分本地设置,不是线上账号,也不是多人联机房间。

  1. Enter a name输入名字

    Choose Local Practice. The table can have one to nine opponents; here every opponent uses the local rules.选择本地练习,可配置一到九名对手;这里所有对手都使用本地规则。

  2. Deal and act发牌并行动

    Press Practice locally, then I'm ready. Use the available Call/Check, Raise and sizing controls. Swipe your hole cards upward to fold.点击本地练习,再点 I'm ready。使用当前可选的跟注/过牌、加注与金额控件;向上滑动底牌弃牌。

  3. Read the hand log回看本手记录

    Follow positions, bets and the practice bot's short rule explanation. Leave the table to return to the lobby; practice does not spend your bankroll.查看位置、下注与规则对手的简短说明。退出回到大厅,练习不消耗资金。

Two private cards. A shared board.两张底牌,共享牌面。

In Hold'em, the best five-card hand can use either, both or neither of your two hole cards. The board appears across the flop, turn and river; a betting round separates each reveal.德州扑克用最佳五张牌比较,可以使用两张、一张或零张底牌。公共牌依次经过翻牌、转牌与河牌,每次揭示之间有一轮下注。

Your hole cards你的底牌

Public board已揭示公共牌

This unsaved explainer reads the same sample cards as the app's request-preview source. It reveals only the selected street, not another player's cards, and does not evaluate or send a decision.这个不保存数据的说明组件从应用请求预览源码读取同一组示例牌,只揭示所选街的牌面,不读取对手底牌,也不计算或发送决策。

Win the pot when everyone else folds, or compare hands at showdown. No-limit raises are bounded by the chips a player has; the app offers the currently legal actions.其他人都弃牌时即可赢得底池,否则在摊牌时比较牌力。无限注的上限仍是玩家现有筹码;应用会提供当前合法操作。

Rules reference: PokerStars Learn规则参考:PokerStars Learn

Six rooms, one bankroll六个牌室,一份资金

Local Practice gives you 1,000 practice chips at 5/10 blinds. It leaves your separate bankroll and opponent records unchanged. Model venues start with a 500-chip bankroll; a room opens when you can cover its buy-in. 本地练习提供 1,000 练习筹码、5/10 盲注,不改变独立的资金与对手记录。模型牌室初始资金为 500 筹码;余额足够支付买入时,相应牌室即可进入。

Write the opponent, then play it先写对手,再和它打

The prompt editor with searchable poker variables and a street-by-street preview

Edit the prompt. Preview every street.编辑提示词,逐街预览。

Each seat has its own model, style and saved instructions. Search for registered information such as position or pot odds, then preview the request on four sample streets locally. Edits save immediately; Done only closes the editor. Preview does not ask a model to act. 每个座位都有自己的模型、风格与保存的指令。搜索位置、底池赔率等已注册信息,在四条示例街上预览请求。编辑会立即保存,Done 只关闭面板;Preview 不会请求模型出牌。

The lobby: bankroll, venue cards and the opponents at your table

Pick your table.挑选你的牌桌。

Play against JEV, Gemini, Claude, GPT, Grok, DeepSeek and Kimi through OpenRouter. Add or remove seats, swap models per opponent, and your bankroll and settings are saved in your browser. 通过 OpenRouter 对战 JEV、Gemini、Claude、GPT、Grok、DeepSeek 和 Kimi。增减座位、为每个对手切换模型,资金和设置都保存在你的浏览器里。

A hand played on a phone-sized screen

Made for phones, too.手机上同样好用。

A minimal table that works one-handed on mobile and spreads out on desktop. English and Chinese UI, with your own avatar and felt colour. 极简牌桌,手机上单手可玩,桌面端自然展开。支持中英文界面,可自选头像与桌布颜色。

Understand what the model receives理解模型收到的信息

Situation, not omniscience局面,而非全知视角

Requests include the acting player's hole cards, revealed board, public stacks, position, betting history and registered derived information. Equity estimates and inferred ranges carry uncertainty. Missing observations remain unknown.请求包括行动玩家的底牌、已揭示公共牌、公开筹码、位置、下注记录与已注册的衍生信息。估算胜率和推断范围都有不确定性,缺失的观察并不等于零。

Style is a decision policy风格是一种决策方式

Let the model decide uses the model on every street. A chosen style can use preflop charts before handing later streets to the model. Chat-model action probabilities describe play frequencies, not winning chances; JEV uses a different decision contract.Let the model decide 会逐街使用模型;选定风格时,翻前可能先使用图表,后续再交给模型。聊天模型的行动概率表示打法频率,不是获胜概率;JEV 使用不同的决策协议。

Watch the table in motion看看牌桌如何运转

Earlier real desktop and phone recordings are retained. The new stills above show the current inspected interface.保留此前真实录制的桌面与手机操作,上方新增静态图展示本次检查的当前界面。

Play desktop recording播放桌面录制Earlier actual desktop hand recording

Two ways to play两种玩法

  1. Online在线

    Open poker.songhai.site. Local Practice works right away, no key. For model opponents, tap your avatar, open AI connection and paste your own OpenRouter key. It stays in your browser; requests go straight to the provider. 打开 poker.songhai.site,本地练习无需 key 即可开玩。想和模型对战,点击你的头像,在 AI 连接 中填入你自己的 OpenRouter key。key 只保存在你的浏览器里,请求直接发往模型服务商。

    Open the app打开应用
  2. Locally本地

    Node.js 22+ and npm. Local Practice needs no key. For model venues, use the connection settings or privately configure .env.local for the local dev server. 需要 Node.js 22+ 和 npm,本地练习无需 key。模型牌室可使用连接设置,或为本地开发服务器私下配置 .env.local。

git clone https://github.com/SonghaiFan/frankie-poker.git
cd frankie-poker
npm ci
npm run dev

Use a key with a spending limit. Chips are virtual; model calls use your own API balance. 建议使用设置了消费上限的 key。筹码是虚拟的,模型调用消耗你自己的 API 余额。

Bankroll, seat instructions and preferences stay in browser storage per origin and player name. Hosted connection keys also remain there until Clear key. Changing browsers does not sync this state; clearing site data removes it.资金、座位指令与偏好保存在当前来源和玩家名字对应的浏览器存储中。线上填写的连接 key 也会保留,直到 Clear key。更换浏览器不会同步,清理站点数据会移除它们。