From 8cee47fcc958c86600b571fa785c7db0adf2a6ff Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Wed, 23 Apr 2025 16:17:05 -0400 Subject: [PATCH] modified: research/activity29-battleship.yaml --- research/activity29-battleship.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/research/activity29-battleship.yaml b/research/activity29-battleship.yaml index d44689a..6184884 100644 --- a/research/activity29-battleship.yaml +++ b/research/activity29-battleship.yaml @@ -137,10 +137,17 @@ sections: title: "Take a Shot" question: "Choose a position to fire at (0-99)." tokens_for_ai: | + 1) If the user reply is *only* digits, and corresponds to a grid cell (0–99), + treat it as a valid move: + If the response matches the regex /^\d+$/ and 0 ≤ int(response) < 100, categorize as 'valid_move'. + + 2) Otherwise fall back to the usual buckets: If the user wants to restart or play again, categorize as 'restart'. If the user wants to exit, categorize as 'exit'. - If the move is valid, categorize as 'valid_move'. - If the move is invalid, categorize as 'invalid_move'. + Otherwise, categorize as 'invalid_move'. + + Note: by ordering the digit-check *first*, you guarantee that “1”, “42”, etc. + always lands in 'valid_move' no matter what the LLM would otherwise decide. feedback_tokens_for_ai: | Important: Use the metadata to fill in the brackets and provide a conversational tone.