Deal Community Cards
poker.afterflopFull Description
工具:poker.afterflop(发公共牌 / 推进阶段)
用途
为当前 game_id 的牌局在指定阶段发公共牌(afterflop / turn / river),并在发牌前用传入的 bet 结算上一轮双方已达成一致的等额下注:
pot += 2 * bethero.stack -= betai.stack -= bet
何时调用
- 仅在上一轮下注已经结束时调用本工具:
- 双方都过牌(check/check)⇒
bet = 0 - 有下注且被跟注,双方在本轮最终投入金额相等 ⇒
bet = 等筹后的单边金额 - 若任意一方在上一轮选择
fold:不要调用本工具,应直接进入poker.showdown处理结算/宣布胜者。
输入参数(Input)
stage:要发公共牌的阶段,必须是afterflop/turn/rivergame_id:牌局 id,用于读取当前牌局状态与剩余牌堆bet:进入本阶段前,上一轮(上一街)双方最终等筹后的单边下注金额- 若双方都过牌:
bet = 0 - 若下注被跟注:
bet = 最终等筹金额
行为与阶段约束(Behavior)
- 当
stage = afterflop: - 牌局当前
board必须为空(未发过翻牌) - 从
deck发出 3 张公共牌加入board - 当
stage = turn: - 牌局当前
board必须已有 3 张牌(已发 afterflop) - 从
deck发出 1 张公共牌加入board - 当
stage = river: - 牌局当前
board必须已有 4 张牌(已发 turn) - 从
deck发出 1 张公共牌加入board
> 本工具会在发牌前先按 bet 更新底池与双方筹码,然后再发公共牌,并保存最新牌局状态。
返回内容(Output)
返回当前牌局更新后的关键状态(以工具返回为准):
board:最新公共牌pot:结算bet后的最新底池hero_stack/ai_stack:结算bet后双方最新剩余筹码- 以及牌局相关信息(如
bb/sb/button等)
使用规则(模型必须遵守)
- 你必须在对话中先确认本轮下注已经结束,并把最终等筹后的
bet作为入参传入。 - 你不能在双方下注尚未等筹时调用本工具推进到下一阶段。
- 发牌后将进入下一轮行动;若当前阶段已到
river且本轮下注结束,应继续进入poker.showdown。
AI 行动输出格式(强制)
当轮到 AI 行动时,必须对用户说出自己本回合的具体行动: AI 行动:Check | Call <数额> | Raise 到 <数额> | Fold 尽量保持游戏流程的顺畅,在你的 AI 回合可以选择无需再提问或征求用户确认,因为德州规则就是如此。
结束回合的强制动作
- 当 AI 的行动使本轮结束(例如 AI Call 了用户的 Bet / Raise),必须立即调用下一阶段发牌工具并给出结果,不要停留在口头说明。
Parameters (3 required)
betnumberWhen the hand reaches afterflop/turn/river, the user and AI must agree on a matched bet size. Enter the final matched amount per side (one-sided value since both equal). The poker.afterflop tool uses this bet via “pot += 2 * bet” to update the pot and “stack -= bet” to deduct remaining stacks for both AI and user. Use 0 for a check.
game_idstringID of this hand; required so the system knows how to deal the remaining cards
stagestringStage to deal cards; choose afterflop/turn/river
afterflopturnriver