Skip to content

Bot chats with the player #144

@Clubserg

Description

@Clubserg

Feature: Bot-to-User Chat (Dynamic Strategy Messaging)

Description

Implement a dynamic messaging system where the bot communicates with the player via the game chat. The bot will send predetermined messages triggered by its current game state and winning probability. This adds a layer of personality and feedback to the player-vs-machine mode, making the AI feel more interactive.

Requirements

  • State Detection: Use the Rust module's logic to determine how close the bot is to winning or losing based on the current YEN notation layout.
  • Message Mapping: Create a library of predetermined messages categorized by bot status (e.g., Aggressive/Winning, Neutral, Defensive/Losing).
  • Automated Messaging: Trigger a chat message through the WebSocket whenever the bot calculates its move, ensuring the message appears in the UI.
  • Configuration: Messages should be easily editable and support internationalization (i18n) if implemented.

Tasks

  • Define the logic thresholds in the TypeScript backend to categorize the bot's "confidence" based on Rust module feedback.
  • Create a JSON file or constant containing the message pool for different game scenarios.
  • Integrate the bot's chat trigger into the existing play method flow.
  • Ensure the frontend Chat component correctly distinguishes between human messages and bot-generated messages (e.g., using a distinct "Bot" label or color).
  • Test the timing to ensure the bot chats immediately before or after its move is displayed.

Technical Notes

  • Communication: The bot's move suggestion (via the Rust module) will serve as the trigger for selecting the appropriate message category.
  • Variety: Ensure a random selection from the message pool so the bot doesn't repeat the same phrase every turn.
  • Scope: Focus on the "classic version" of Game Y first before expanding to other variants.

Evaluation Criteria Alignment

  • Originality: Goes beyond basic requirements to create a more immersive AI experience.
  • Techniques used for strategy generation: Connects the architectural strategy module (Rust) directly to the user interface (Chat).
  • Functionality: Expands the "player-vs-machine" requirement with interactive feedback.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No fields configured for Task.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions