Skip to content

Latest commit

 

History

History
228 lines (171 loc) · 9.39 KB

File metadata and controls

228 lines (171 loc) · 9.39 KB

Task Summary - Quick Reference

LLM Architecture: Hybrid Approach

The project uses a Hybrid LLM Architecture:

  • LLM 1 (Initializer): Generates complete game structure upfront (characters, places, clues, timeline)
  • LLM 2 (Intro Generator): Generates introduction text before game starts
  • LLM 3-4 (Runtime): Generate dynamic content on-demand (dialogue, descriptions)
  • Epilogue Generator: Generates epilogue text on game end
  • Note: No caching system - prompts are unique per context, making caching inefficient

See LLM_ARCHITECTURE.md for detailed architecture documentation.


Module Breakdown

Module Priority Difficulty Main Components
1. Core Game Engine & State Management HIGH MEDIUM State models, Time system, Game flow, Validation
2. LLM Integration Layer (Hybrid) HIGH MEDIUM-HIGH API client, LLM 1-4, Epilogue, Basic clue extraction
3. Game Content System HIGH MEDIUM Characters, Places, Clues, Timeline, Flags
4. Android UI/UX Components HIGH MEDIUM Game screens, Action UI, Conversation UI, Configuration
5. Game Logic & Validation HIGH MEDIUM-HIGH Action handlers, Timeline processing, Win/lose conditions

Detailed Task List

Module 1: Core Game Engine & State Management

Task Priority Difficulty Feasibility Dependencies
1.1 Game State Data Models HIGH MEDIUM ✅ POSSIBLE -
1.2 Time Management System HIGH MEDIUM ✅ POSSIBLE 1.1
1.3 Game Flow Controller HIGH MEDIUM ✅ POSSIBLE 1.1, 1.2
1.4 Action Validation System - - ❌ NOT PLANNED -

Module 2: LLM Integration Layer (Hybrid Architecture)

Task Priority Difficulty Feasibility Dependencies
2.1 LLM API Client HIGH LOW-MEDIUM ✅ POSSIBLE -
2.2 LLM 1: Initial Content Generator HIGH MEDIUM ✅ POSSIBLE 2.1, 3.1, 3.2, 3.3
2.3 LLM 2: Intro Generator HIGH MEDIUM ✅ POSSIBLE 2.1, 2.2
2.4 LLM 3: Dialogue Generator HIGH MEDIUM-HIGH ✅ POSSIBLE 2.1, 3.1, 2.8
2.5 LLM 4: Description Generator MEDIUM MEDIUM ✅ POSSIBLE 2.1, 2.8
2.6 LLM 5: Action Handler - - ❌ NOT PLANNED -
2.7 LLM 6: Component Updater - - ❌ NOT PLANNED -
2.7 Clue Extraction System MEDIUM MEDIUM ✅ BASIC VERSION 2.1, 3.3
2.8 LLM Response Caching System - - ❌ NOT PLANNED -

Module 3: Game Content System

Task Priority Difficulty Feasibility Dependencies
3.1 Character Management HIGH MEDIUM ✅ POSSIBLE -
3.2 Place Management HIGH MEDIUM ✅ POSSIBLE -
3.3 Clue Management HIGH MEDIUM ✅ POSSIBLE -
3.4 Timeline System HIGH MEDIUM-HIGH ✅ POSSIBLE 1.2
3.5 Flag System MEDIUM LOW-MEDIUM ✅ POSSIBLE 1.1

Module 4: Android UI/UX Components

Task Priority Difficulty Feasibility Dependencies
4.1 Main Game Screen Layout HIGH MEDIUM ✅ POSSIBLE 1.1
4.2 Text Display System HIGH LOW-MEDIUM ✅ POSSIBLE -
4.3 Action Selection UI HIGH MEDIUM ✅ POSSIBLE 4.1
4.4 Free Action Input System - - ❌ NOT PLANNED -
4.5 Character & Place Selection UI HIGH MEDIUM ✅ IMPLEMENTED 3.1, 3.2, 4.1
4.6 Conversation/Interrogation UI HIGH MEDIUM ✅ IMPLEMENTED 2.3, 4.1
4.7 Game Start & Configuration MEDIUM LOW-MEDIUM ✅ IMPLEMENTED 2.2
4.8 Tutorial Screen - - ❌ NOT PLANNED -
4.9 Game Over Screen MEDIUM LOW-MEDIUM ✅ IMPLEMENTED 5.7
4.10 Save/Load System UI LOW LOW-MEDIUM ⚠️ MIGHT IMPLEMENT 1.3

Module 5: Game Logic & Validation

Task Priority Difficulty Feasibility Dependencies
5.1 Investigation Handler HIGH MEDIUM ✅ POSSIBLE 3.2, 3.3, 1.2, 2.4, 2.8
5.2 Questioning Handler HIGH MEDIUM-HIGH ✅ POSSIBLE 2.3, 3.1, 3.3, 2.7, 2.8
5.3 Movement Handler HIGH LOW-MEDIUM ✅ POSSIBLE 3.2, 1.2
5.4 Accusation Handler HIGH MEDIUM-HIGH ✅ IMPLEMENTED (Simple) 3.1, 3.3
5.5 Free Action Handler - - ❌ NOT PLANNED -
5.6 Timeline Event Processor HIGH MEDIUM-HIGH ✅ IMPLEMENTED (Basic) 3.4
5.7 Win/Lose Condition Checker HIGH MEDIUM ✅ IMPLEMENTED 5.4, 1.2
5.8 Component Update Logic HIGH MEDIUM ✅ IMPLEMENTED (Basic) 3.1, 3.2, 3.3

Feasibility Legend

  • POSSIBLE: Standard implementation, well-understood patterns
  • ⚠️ CHALLENGING: Requires careful design, may need iteration or alternative approaches

Critical Path (Completed)

The game is fully playable with the following completed features:

  1. Foundation

    • 1.1 Game State Data Models
    • 1.2 Time Management System
    • 2.1 LLM API Client
    • 3.1, 3.2, 3.3 Character/Place/Clue Management
    • 3.4 Timeline System
    • 3.5 Flag System
  2. Content Generation (Hybrid Approach)

    • 2.2 LLM 1: Initial Content Generator - Upfront generation (complete structure)
    • 2.3 LLM 2: Intro Generator - Introduction text generation
    • 2.4 LLM 3: Dialogue Generator - Lazy loading for conversations
    • 2.5 LLM 4: Description Generator - Lazy loading for descriptions
    • Epilogue Generator - Game ending text generation
    • 2.7 Basic Clue Extraction System
  3. Game Logic

    • 1.3 Game Flow Controller
    • 5.1, 5.2, 5.3, 5.4 Core Action Handlers
    • 5.6 Timeline Event Processor (Basic logic)
    • 5.7 Win/Lose Conditions
    • 5.8 Component Updates (Basic state management)
  4. UI Integration

    • 4.1 Main Game Screen
    • 4.2 Text Display
    • 4.3 Action Selection
    • 4.5 Character/Place Selection
    • 4.6 Conversation UI (Integration with LLM 3)
    • 4.7 Game Configuration
    • 4.9 Game Over Screen

Not Planned / Removed Features

  • ❌ 1.4 Action Validation System - Not needed for predefined actions
  • ❌ 2.6 LLM 5: Action Handler - Free actions too complicated
  • ❌ 2.7 LLM 6: Component Updater - Basic timeline processing sufficient
  • ❌ 2.8 LLM Response Caching System - Inefficient (unique prompts)
  • ❌ 4.4 Free Action Input System - Not implementing free actions
  • ❌ 4.8 Tutorial Screen - Not needed
  • ❌ 5.5 Free Action Handler - Not implementing free actions

Potential Future Features

  • ⚠️ 4.10 Save/Load System - Might implement with Room database

Risk Areas

Resolved / Not Applicable

  • Action Validation (1.4, 5.5): Not implemented - not needed
  • LLM 5: Action Handler (2.6): Not implemented - too complicated
  • LLM 6: Component Updater (2.7): Not implemented - basic processing sufficient
  • Caching Strategy (2.8): Not implemented - inefficient for unique prompts
  • Free Action System: Not implemented - using predefined actions only

Current Considerations

  • LLM Response Quality: Ensuring consistent, game-appropriate responses across LLM 1-4
  • Timeline Event Processing (5.6): Basic logic implemented - sufficient for gameplay
  • Component Updates (5.8): Basic state management - working well

Low Risk

  • UI Components: Standard Android development - completed
  • Data Models: Straightforward data structures - completed
  • Basic Action Handlers: Clear logic flow - completed

Project Status

  • Core Features: Completed and playable
  • LLM Integration: LLM 1-4 + Epilogue Generator implemented
  • UI Components: All main screens implemented
  • Game Logic: All core action handlers implemented
  • ⚠️ Save/Load: Might implement in future

The game is fully playable with the current feature set. Removed features were deemed unnecessary or too complex for the current scope.


Testing Status

Unit Tests - ✅ All Passing (as of latest check)

Completed Test Coverage:

  1. ActionTimeCostsTest.kt

    • Time cost calculations
    • Movement time calculations
    • Time unit validation
  2. GameTimeTest.kt

    • Time operations (addMinutes, isAfter, isBefore, format)
    • Hours and minutes calculations
  3. GameStateTest.kt

    • Query methods (getCharacter, getPlace, getClue, etc.)
    • Update methods (updateFlag, updateTime, add/update/remove for collections)
    • Time management methods (advanceTime, event detection, processing)
    • Game logic helpers (getUnlockedCharacters, canProgressToPhase, etc.)
  4. TimelineTest.kt

    • Event query methods (getPastEvents, getFutureEvents, getEventsAtTime)
    • Upcoming events filtering
  5. CharacterTest.kt

    • Helper methods (isUnlocked, isAtLocation)
  6. PlaceTest.kt

    • Helper methods (isUnlocked, getDistanceTo)
  7. ClueTest.kt

    • Helper methods (isUnlocked)
    • Property validation
  8. PlayerTest.kt

    • Helper methods (hasClue, hasTool, addClue, addTool)

Test Files Location: app/src/test/java/com/ee309/detectivegame/domain/model/

Run Tests: ./gradlew test or run individual test files from Android Studio

Note: This status reflects the current state of unit tests for the core domain models. Additional tests will be added as new features are implemented.