Skip to content

Conversation

@lox
Copy link
Owner

@lox lox commented Nov 12, 2025

Replaces the boolean --pretty flag with an --output enum flag that supports three modes for better control over bot log output during testing.

Changes

New --output flag modes:

  • logs: Show all bot logs (default, current behavior)
  • bot-cmd: Show only custom bot logs from --bot-cmd, suppress built-in bot logs from --spec (useful for focusing on your bot's behavior)
  • hand-history: Pretty hand visualization with all bot logs suppressed (replaces --pretty)

Implementation:

  • Added QuietLogs field to BotSpec for per-bot log control
  • Built-in bots are quieted in bot-cmd and hand-history modes
  • Custom bots are only quieted in hand-history mode

Motivation

When testing custom bots against built-in opponents, the log output from all the pre-canned bots creates noise that makes it hard to focus on your bot's behavior. The bot-cmd mode solves this by showing only your custom bot's output while the built-in bots run silently.

Example Usage

# Focus on your bot's logs only
pokerforbots spawn \
  --spec "calling-station:3,aggressive:2" \
  --bot-cmd "./my-bot" \
  --output bot-cmd

# Watch hands with pretty visualization
pokerforbots spawn \
  --spec "complex:6" \
  --output hand-history

Testing

  • ✅ All tests passing
  • ✅ No race conditions
  • ✅ Verified all three modes work correctly

Replaces the boolean --pretty flag with an --output enum flag that supports
three modes for better control over bot log output during testing:

- logs: Show all bot logs (default, current behavior)
- bot-cmd: Show only custom bot logs from --bot-cmd, suppress built-in
  bot logs from --spec (useful for focusing on your bot's behavior)
- hand-history: Pretty hand visualization with all bot logs suppressed
  (replaces --pretty)

Implementation adds QuietLogs field to BotSpec, allowing per-bot log
control. Built-in bots are quieted in bot-cmd and hand-history modes,
while custom bots are only quieted in hand-history mode.

This makes it much easier to test custom bots without noise from the
pre-canned opponent bots.
@lox lox merged commit d4cf1a7 into main Nov 12, 2025
4 checks passed
@lox lox deleted the feat/output-mode-selection branch November 12, 2025 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants