Skip to content

Enforce story-based puzzles with unique answers and progression instructions - #1

Draft
WilliamsMiao with Copilot wants to merge 4 commits into
mainfrom
copilot/implement-story-questions
Draft

Enforce story-based puzzles with unique answers and progression instructions#1
WilliamsMiao with Copilot wants to merge 4 commits into
mainfrom
copilot/implement-story-questions

Conversation

Copilot AI commented Nov 26, 2025

Copy link
Copy Markdown

Current puzzle system generates questions without enforcing story-content derivation, accepts vague answers at 50% threshold, and lacks clear post-solution guidance.

Changes

Puzzle Generation (AIService.js)

  • Prompt now requires puzzles extracted from specific chapter events/dialogue/clues
  • Demands 3-5 core keywords for unique answer validation
  • Added next_steps field for explicit player guidance

Answer Validation (AIService.js)

const VALIDATION_CONFIG = {
  KEYWORD_WEIGHT: 0.7,        // was 0.6
  CORRECT_THRESHOLD: 0.7,     // was 0.5
  HIGH_CONFIDENCE_THRESHOLD: 0.85,
  NEAR_THRESHOLD: 0.4
};
  • Increased threshold from 50% → 70% to reject incomplete answers
  • Example: "匕首" (dagger) now correctly rejected, "镀金的匕首" (gilded dagger) accepted

Feedback & Progression (GameEngine.js, server.js)

  • Validation returns structured feedback with next_steps
  • Chapter progression broadcasts puzzle solution + action guidance
  • Format: 📍 **下一步行动**:{specific instruction}

Database Schema (database.js)

ALTER TABLE chapter_puzzles ADD COLUMN next_steps TEXT DEFAULT ""
  • Migration runs automatically on existing databases
  • Backward compatible

Result

Puzzles now strictly derive from story content, require specific answers (70%+ match), and provide explicit next actions on completion.

Original prompt

现在确认几个问题:
1、问题必须基于故事内容提出
2、问题的答案必须唯一,且可以验证
3、玩家给出正确回答后,要给出明确的指示,然后推进故事发展

Summary of Conversation History

Recent Agent Commands

  1. Agent Command: @agent Continue: "Continue to iterate?"
    • Result: This command was executed multiple times, indicating the user's desire to continue the conversation and further iterate on the project.

Recent Tool Results

  • The user has been actively discussing various issues and improvements related to the game development project, specifically focusing on the interaction between players and the story machine (AI).
  • The user highlighted several problems, including:
    1. The need for the AI to generate questions based on the story content.
    2. Ensuring that the AI recognizes correct answers and provides clear feedback to players.
    3. The importance of having a structured story outline generated at the beginning of the game to guide players.
    4. Assigning specific tasks to players that require interaction with certain elements in the game.

Active Work When Token Budget Exceeded

  • The agent was actively working on addressing the user's concerns regarding the AI's functionality and the overall game flow. The user emphasized the need for:
    • Questions to be based on the story content.
    • Unique and verifiable answers to those questions.
    • Clear instructions and story progression after players provide correct answers.

Connection to Overall User Goals

  • The user's overarching goal is to enhance the gameplay experience by ensuring that the AI interacts meaningfully with players, provides relevant clues, and maintains a coherent narrative structure. The recent discussions and commands reflect a focus on refining the AI's capabilities to improve player engagement and satisfaction within the game.

This summary encapsulates the key points of the conversation, emphasizing the user's intent to iterate on the game design and the specific functionalities of the AI that need improvement.
TITLE: Improving story-driven gameplay mechanics

Created from VS Code via the GitHub Pull Request extension.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits November 26, 2025 10:07
… and clear next steps

Co-authored-by: WilliamsMiao <181537281+WilliamsMiao@users.noreply.github.com>
Co-authored-by: WilliamsMiao <181537281+WilliamsMiao@users.noreply.github.com>
Co-authored-by: WilliamsMiao <181537281+WilliamsMiao@users.noreply.github.com>
Copilot AI changed the title [WIP] Add AI-generated questions based on story content Enforce story-based puzzles with unique answers and progression instructions Nov 26, 2025
Copilot AI requested a review from WilliamsMiao November 26, 2025 10:17
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