[GH-ISSUE #3512] [Issue]: UNO bots waste Wild cards by re-declaring the current active color #1897

Closed
opened 2026-10-21 05:43:37 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @SpicyMarinara on GitHub (Jul 12, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3512

Originally assigned to: @SpicyMarinara on GitHub.

Summary

In Conversation-mode UNO, character bots frequently play Wild or Wild Draw Four cards and declare the color that is already active. This is legal but reduces move quality and breaks immersion because the bot appears to ignore strategic color choice.

Expected behavior

When a bot plays a Wild or Wild Draw Four, it should usually declare the color it benefits from most, such as the color it holds the most of, rather than defaulting to the currently active color unless that is genuinely the strongest choice.

Actual behavior

Bots often re-declare the current active color after playing a Wild or Wild Draw Four, leaving the color unchanged even when they hold few or no cards of that color.

Steps to reproduce

  1. Start a Conversation-mode UNO game with at least one character bot.
  2. Play until the active color is a given color and a bot holds a Wild or Wild Draw Four but few or no cards of the active color.
  3. Watch the bot play the Wild or Wild Draw Four and declare the same color that was already active.

Environment

  • Marinara Engine version: Not provided
  • Install type: Not provided
  • OS + version: Not provided
  • Browser or app shell: Not provided

Logs, screenshots, or video

No logs, screenshots, or video provided. Reported prompt/code evidence: describeForModel() sends buildBoardSummary(), which begins with Top card: … — active color is Red., while buildInstructions() and the play_card tool do not provide strategy for choosing declared_color. The play_card tool describes declared_color only as "the color you choose."

Additional context

Reported root cause: the model chooses the Wild color without strategy guidance, so it anchors on the most salient color token in the prompt: the current active color. Relevant files: packages/shared/src/features/turn-games/uno/engine.ts (buildBoardSummary, buildInstructions, pickFallback/dominantColor) and packages/shared/src/features/turn-games/uno/tools.ts (playCardToolManifest). Proposed fix: append a line in buildInstructions() when the acting seat holds a Wild/Wild Draw Four, using existing colorCounts(hand) data, such as: "If you play a Wild, set declared_color to the color you hold the most of (you have: 3 blue, 2 green, 1 red). Don't just keep the current color (Red) unless it's genuinely your strongest." Optionally mirror the hint in the declared_color tool description. A stricter alternative would reject Wild plays that re-declare the current color while the seat holds other colors, but guidance is preferred to preserve character agency. Related context: sibling to #3306 / #3308 around personality-driven bot moves; this issue is a color-strategy gap and does not affect state integrity.

Discord thread: [Issue]: UNO bots waste Wild cards by re-declaring the current active color
Discord thread link: https://discord.com/channels/1417099416812392641/1525690259042730155
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (2 messages)
[2026-07-12T02:28:23.710Z] ChrisDay: ## What happens

When a character bot plays a Wild (or Wild Draw Four), it frequently declares the color that is *already* active — active color is Red, the bot plays a Wild, and sets the new color to Red again. It's legal, but it throws away the whole point of the Wild and reads as the character not actually thinking. Small thing, but it noticeably breaks immersion at an otherwise convincing table.

## Steps to reproduce

1. Start a Conversation-mode UNO game with at least one character bot.
2. Play until the active color is X and a bot holds a Wild but few/no cards of color X.
3. Watch the bot play the Wild and re-declare X, leaving the color unchanged.

## Root cause

The color is chosen by the *model*, with no strategy given for it. On a bot turn the runner sends `describeForModel()`; `buildBoardSummary()` opens with `Top card: … — active color is Red.`, and neither the board summary nor `buildInstructions()` says anything about how to pick a Wild's declared color. The `play_card` tool exposes `declared_color` only as "the color you choose." So the most salient color token in the prompt is the current active color, and the model anchors on it and echoes it back.

Files: `packages/shared/src/features/turn-games/uno/engine.ts` (`buildBoardSummary`, `buildInstructions`, `pickFallback`/`dominantColor`); `packages/shared/src/features/turn-games/uno/tools.ts` (`playCardToolManifest`).



## Context

Sibling to #3306 / #3308 (personality-driven bot moves) — the same "bots don't really *play*" family, but this is a color-strategy gap orthogonal to personality: a perfectly in-character bot still anchors on the current color. State integrity is unaffected; this is purely move quality / immersion.
[Discord message: https://discord.com/channels/1417099416812392641/1525690259042730155/1525690259042730155]

[2026-07-12T02:29:35.362Z] ChrisDay: ## Proposed fix (small, engine-side, keeps character agency)

Give the model the same steer the fallback already uses. When the acting seat holds a Wild/Wild4, append one line in `buildInstructions()`, e.g.:

> If you play a Wild, set `declared_color` to the color you hold the most of (you have: 3 blue, 2 green, 1 red). Don't just keep the current color (Red) unless it's genuinely your strongest.

The counts come straight from the existing `colorCounts(hand)` helper — a few deterministic lines, no new state, no behavior override. The character still chooses; it's just no longer flying blind. Optionally mirror the same hint in the `declared_color` description in `tools.ts`.

If you'd rather enforce it, a conservative guardrail could reject a Wild play that re-declares the current color while the seat holds other colors — but the guidance nudge is lower-risk and preserves the "a scatterbrained character might pick oddly" behavior added in #3308.
[Discord message: https://discord.com/channels/1417099416812392641/1525690259042730155/1525690559572869195]

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Jul 12, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3512 Originally assigned to: @SpicyMarinara on GitHub. ## Summary In Conversation-mode UNO, character bots frequently play Wild or Wild Draw Four cards and declare the color that is already active. This is legal but reduces move quality and breaks immersion because the bot appears to ignore strategic color choice. ## Expected behavior When a bot plays a Wild or Wild Draw Four, it should usually declare the color it benefits from most, such as the color it holds the most of, rather than defaulting to the currently active color unless that is genuinely the strongest choice. ## Actual behavior Bots often re-declare the current active color after playing a Wild or Wild Draw Four, leaving the color unchanged even when they hold few or no cards of that color. ## Steps to reproduce 1. Start a Conversation-mode UNO game with at least one character bot. 2. Play until the active color is a given color and a bot holds a Wild or Wild Draw Four but few or no cards of the active color. 3. Watch the bot play the Wild or Wild Draw Four and declare the same color that was already active. ## Environment - Marinara Engine version: Not provided - Install type: Not provided - OS + version: Not provided - Browser or app shell: Not provided ## Logs, screenshots, or video No logs, screenshots, or video provided. Reported prompt/code evidence: `describeForModel()` sends `buildBoardSummary()`, which begins with `Top card: … — active color is Red.`, while `buildInstructions()` and the `play_card` tool do not provide strategy for choosing `declared_color`. The `play_card` tool describes `declared_color` only as "the color you choose." ## Additional context Reported root cause: the model chooses the Wild color without strategy guidance, so it anchors on the most salient color token in the prompt: the current active color. Relevant files: `packages/shared/src/features/turn-games/uno/engine.ts` (`buildBoardSummary`, `buildInstructions`, `pickFallback`/`dominantColor`) and `packages/shared/src/features/turn-games/uno/tools.ts` (`playCardToolManifest`). Proposed fix: append a line in `buildInstructions()` when the acting seat holds a Wild/Wild Draw Four, using existing `colorCounts(hand)` data, such as: "If you play a Wild, set `declared_color` to the color you hold the most of (you have: 3 blue, 2 green, 1 red). Don't just keep the current color (Red) unless it's genuinely your strongest." Optionally mirror the hint in the `declared_color` tool description. A stricter alternative would reject Wild plays that re-declare the current color while the seat holds other colors, but guidance is preferred to preserve character agency. Related context: sibling to #3306 / #3308 around personality-driven bot moves; this issue is a color-strategy gap and does not affect state integrity. Discord thread: [Issue]: UNO bots waste Wild cards by re-declaring the current active color Discord thread link: https://discord.com/channels/1417099416812392641/1525690259042730155 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (2 messages)</summary> ```text [2026-07-12T02:28:23.710Z] ChrisDay: ## What happens When a character bot plays a Wild (or Wild Draw Four), it frequently declares the color that is *already* active — active color is Red, the bot plays a Wild, and sets the new color to Red again. It's legal, but it throws away the whole point of the Wild and reads as the character not actually thinking. Small thing, but it noticeably breaks immersion at an otherwise convincing table. ## Steps to reproduce 1. Start a Conversation-mode UNO game with at least one character bot. 2. Play until the active color is X and a bot holds a Wild but few/no cards of color X. 3. Watch the bot play the Wild and re-declare X, leaving the color unchanged. ## Root cause The color is chosen by the *model*, with no strategy given for it. On a bot turn the runner sends `describeForModel()`; `buildBoardSummary()` opens with `Top card: … — active color is Red.`, and neither the board summary nor `buildInstructions()` says anything about how to pick a Wild's declared color. The `play_card` tool exposes `declared_color` only as "the color you choose." So the most salient color token in the prompt is the current active color, and the model anchors on it and echoes it back. Files: `packages/shared/src/features/turn-games/uno/engine.ts` (`buildBoardSummary`, `buildInstructions`, `pickFallback`/`dominantColor`); `packages/shared/src/features/turn-games/uno/tools.ts` (`playCardToolManifest`). ## Context Sibling to #3306 / #3308 (personality-driven bot moves) — the same "bots don't really *play*" family, but this is a color-strategy gap orthogonal to personality: a perfectly in-character bot still anchors on the current color. State integrity is unaffected; this is purely move quality / immersion. [Discord message: https://discord.com/channels/1417099416812392641/1525690259042730155/1525690259042730155] [2026-07-12T02:29:35.362Z] ChrisDay: ## Proposed fix (small, engine-side, keeps character agency) Give the model the same steer the fallback already uses. When the acting seat holds a Wild/Wild4, append one line in `buildInstructions()`, e.g.: > If you play a Wild, set `declared_color` to the color you hold the most of (you have: 3 blue, 2 green, 1 red). Don't just keep the current color (Red) unless it's genuinely your strongest. The counts come straight from the existing `colorCounts(hand)` helper — a few deterministic lines, no new state, no behavior override. The character still chooses; it's just no longer flying blind. Optionally mirror the same hint in the `declared_color` description in `tools.ts`. If you'd rather enforce it, a conservative guardrail could reject a Wild play that re-declares the current color while the seat holds other colors — but the guidance nudge is lower-risk and preserves the "a scatterbrained character might pick oddly" behavior added in #3308. [Discord message: https://discord.com/channels/1417099416812392641/1525690259042730155/1525690559572869195] ``` </details> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:43:37 +07:00
  • closed this issue
  • added the
    in-pr
    bug
    labels
Author
Owner

@SpicyMarinara commented on GitHub (Jul 12, 2026):

Implementation is now owned by the combined draft PR #3516. I am reproducing the reported path and will close this issue through that PR once its fix and regression proof are complete.

<!-- gh-comment-id:4950693047 --> @SpicyMarinara commented on GitHub (Jul 12, 2026): Implementation is now owned by the combined draft PR #3516. I am reproducing the reported path and will close this issue through that PR once its fix and regression proof are complete.
Author
Owner

@SpicyMarinara commented on GitHub (Jul 12, 2026):

Fixed in #3516 (commit d10626344): UNO bot prompts now include remaining color counts and explicitly prefer the strongest held color for Wild declarations instead of repeating the active color. Regression coverage passes.

<!-- gh-comment-id:4950776004 --> @SpicyMarinara commented on GitHub (Jul 12, 2026): Fixed in #3516 (commit d10626344): UNO bot prompts now include remaining color counts and explicitly prefer the strongest held color for Wild declarations instead of repeating the active color. Regression coverage passes.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#1897
No description provided.