Commit graph

114 commits

Author SHA1 Message Date
Claude
dc06025b59
Expand Biblical Time Machine: Garden of Eden to persecution, open-ended NPCs, location accuracy
COMPLETE REWRITE with all requested features:

**Starts at the Beginning:**
- Garden of Eden (Paradise before sin)
- Fall & Early World (Cain, Abel, Enoch)

**Covers Full Bible Chronologically:**
- Egypt & Exodus (~1446 BC)
- Solomon's Temple (~970 BC)
- Life of Jesus (~30 AD)
- Persecution & Martyrdom (~64-313 AD)

**Open-Ended NPC Selection:**
- Users can request ANY biblical figure from each era
- AI dynamically rolepl ays any character accurately
- Suggestions provided but not limiting
- Examples: "Moses", "Queen of Sheba", "a Hebrew slave"

**Historically Accurate Locations:**
- Garden of Eden: NO buildings, only perfect nature
- Egypt: NO Temple to YHWH (only altars, won't exist for 500+ years)
- Solomon: FIRST Temple in all its glory
- Jesus' time: SECOND Temple (Herod's Temple)
- Persecution: NO Temple (destroyed 70 AD), catacombs instead

**Features:**
- 1608 lines, 9 sections, 25 steps
- Metadata tracking (epochs visited, people met)
- Multilingual support
- Looping time machine hub
- Biblically accurate character portrayals
- Scripture references throughout

Demonstrates location accuracy progression: no temple → Tabernacle/altars → First Temple → Second Temple → no temple (destroyed) → faith survives underground.
2025-11-10 12:29:42 +00:00
Claude
79c072abec
Add extensive Biblical Time Machine activity
Create immersive time travel experience through key Biblical epochs:
- Egypt & Exodus: Meet Moses, Pharaoh, Hebrew slaves, Aaron
- Kingdom of David: Visit King David, Prophet Nathan, musicians, citizens
- Life of Jesus: Walk with Jesus, disciples, Mary Magdalene, crowds
- Pentecost & Early Church: Experience Holy Spirit, meet apostles and converts
- Roman Persecution: Stand with martyrs, Paul, persecuted believers

Features:
- Time machine hub for epoch selection
- Multiple NPCs per epoch with unique personalities
- Biblically accurate dialogue and references
- Metadata tracking for journey statistics
- Looping mechanism to revisit epochs
- Final reflection on spiritual journey

The activity maintains historical accuracy while being engaging and educational.
2025-11-10 11:48:58 +00:00
Claude
09202d31dc
Expand fashion activity into immersive backrooms empire management game
Create activity40-fashion-empire-backrooms.yaml with:

Features:
- Player is a girl running her own fashion brand underground
- Backrooms aesthetic: liminal warehouse spaces, mysterious locations
- 4 explorable locations: Warehouse Level -3, The Salon, Sub Bay (underwater lab), Reactor Atelier (nuclear power)
- Full control over 70+ robots and NPC employees (Zara-7, Viktor, Mx. Kai, Luna & Sol)
- Mission-based gameplay (15% tasks, 5% emergencies)
- Player makes creative, leadership, and strategic decisions

Locations:
- Warehouse Level -3: Storage backrooms, assembly drones, fabric management
- The Salon: Creative hub, style bots, runway preparation
- Sub Bay: Underwater dye laboratory, bioluminescent experiments, submersibles
- Reactor Atelier: Nuclear-powered textile synthesis, atomic fabric manipulation

Gameplay:
- Choose locations via central elevator
- Complete missions (color selection, robot commands, textile treatments, power management)
- Handle emergencies (fabric contamination crisis with multiple solutions)
- Manage NPCs and give directives
- Make creative vision decisions for runway shows
- Culminates in Neon Dreams runway show featuring player's choices
- Player sees their vision realized through their empire

All transitions validated, proper termination, educational about fashion + leadership
2025-11-10 09:37:07 +00:00
fafaf1557f
Merge pull request #25 from russellballestrini/claude/dinosaur-time-machine-011CUxk9UNRz6vj4pZv5K8R8
Build interactive dinosaur time machine explorer
2025-11-09 13:52:47 -05:00
Claude
8d22bfa388
Add comprehensive dinosaur time machine educational activity
This activity provides an immersive, open-ended exploration of Earth's
prehistoric eras where users can:

- Travel through Triassic, Jurassic, and Cretaceous periods
- Explore climate, geography, dinosaurs, marine reptiles, and pterosaurs
- Learn about specific creatures on demand
- Understand the evolution of life and flowering plants
- Witness the K-T extinction event
- Jump freely between time periods

Features:
- Central "control room" hub for navigation
- Detailed information about 30+ dinosaurs and creatures
- Covers vegetation changes including flowering plant revolution
- Open-ended exploration with AI-guided learning
- Comprehensive extinction event explanation
- Supports looping and non-linear exploration

The activity validates successfully and follows best practices for
engagement, education, and proper termination.
2025-11-09 18:00:03 +00:00
Claude
2f34365fd5
Add back-to-planet navigation from moons to host planet
Enhanced moon navigation to allow easy return to the host planet's details.
Previously, moon navigation only had "leave_jupiter" which took you to the
final navigation menu. Now you can also go back to see the planet itself.

New Navigation Pattern (implemented for Jupiter's moons):

From any moon, you can now:
1. **Jump to other moons** - "Europa", "Ganymede", etc.
2. **Return to moon menu** - "moon menu" shows all moon options
3. **Back to planet** - "Jupiter" or "back to Jupiter" returns to planet details
4. **Leave entirely** - "leave Jupiter" goes to planet-to-planet navigation

Example Navigation Flow:
- Visit Jupiter → See planet details
- Choose "Io" → See Io's volcanoes
- Say "back to Jupiter" → Return to Jupiter's details (storms, bands, etc.)
- Say "Europa" → Jump directly to Europa
- Say "leave Jupiter" → Continue to Saturn

Updated Navigation Steps:
- moon_io_nav: Added back_to_planet → jupiter:jupiter_details
- moon_europa_nav: Added back_to_planet → jupiter:jupiter_details
- moon_ganymede_nav: Added back_to_planet → jupiter:jupiter_details
- moon_callisto_nav: Added back_to_planet → jupiter:jupiter_details
- jupiter_other_moons_nav: Added back_to_planet → jupiter:jupiter_details

This same pattern can be extended to Saturn, Uranus, and Neptune moons,
allowing seamless navigation: Moon → Moon, Moon → Planet, Planet → Planet.
2025-11-09 17:59:03 +00:00
Claude
ecc2122e1a
Add interactive moon navigation to Solar System Explorer
Enhanced the Solar System Explorer with comprehensive moon navigation menus,
allowing users to jump freely between moons within each planet's system.

New Navigation Features:
- Moon selection menus after each planet's moon intro
- Individual navigation after each moon's details
- Ability to jump directly to any moon or back to the menu
- "Stay" option to ask questions without penalty

Jupiter (95 moons):
- Moon menu: Choose Io, Europa, Ganymede, Callisto, or other moons
- Navigation after each Galilean moon
- Can jump between any moons freely

Saturn (146 moons):
- Moon menu: Choose Titan, Enceladus, Mimas, or other moons
- Navigation after each major moon
- Jump between moons or back to menu

Uranus (28 moons):
- Moon menu: Choose Miranda or other major moons
- Navigation from Miranda to other moons
- Can explore Ariel, Umbriel, Titania, Oberon via other moons

Neptune (16 moons):
- Moon menu: Choose Triton or other moons
- Navigation after Triton
- Can jump back to major moon or continue journey

Example Usage:
1. Visit Jupiter → Choose moon menu
2. Say "Europa" → See Europa details
3. Say "I want to see Io" → Jump directly to Io
4. Say "moon menu" → Back to selection
5. Say "other moons" → See smaller moons
6. Say "leave Jupiter" → Continue to Saturn

This makes exploration truly non-linear and interactive, exactly as
requested for exploring moons like jumping between Uranus's moons!
2025-11-09 17:54:01 +00:00
Claude
45fc9d6c9d
Add comprehensive Solar System Explorer activity
Created an interactive, open-ended educational activity that allows students to explore the entire solar system at their own pace.

Features:
- Complete coverage of all major celestial bodies
- The Sun with detailed structure and solar activity
- All 8 planets with comprehensive details
- 200+ moons documented with attributes:
  - Jupiter's 95 moons (4 Galilean moons + others)
  - Saturn's 146 moons (Titan, Enceladus, Mimas, etc.)
  - Uranus's 28 moons (Miranda and major moons)
  - Neptune's 16 moons (Triton and others)
  - Earth's Moon, Mars's Phobos & Deimos
- Asteroid Belt (Ceres, Vesta, Pallas, Hygiea)
- Kuiper Belt (Pluto, Eris, Makemake, Haumea, etc.)

Activity Structure:
- 13 main sections (Introduction, Sun, 8 planets, Asteroid Belt, Kuiper Belt, Conclusion)
- Non-linear exploration - jump to any location at any time
- Detailed scientific information with current data
- Engaging presentation with emojis and formatting
- Educational content based on latest discoveries (New Horizons, Cassini, Juno missions)

Technical:
- Fully validated YAML structure
- All transitions properly mapped
- Proper termination paths
- Interactive Q&A at each location
- "Stay" option allows asking questions without counting as attempts

Perfect for astronomy education and space exploration learning!
2025-11-09 17:33:17 +00:00
Claude
fd6360d7d8
Add 4 advanced programming activities with algorithm education
NEW ACTIVITIES:

activity48-monty-hall-simulation.yaml - Monty Hall paradox proof
- Simulate stay vs switch strategies
- Prove switching wins 2/3 through code
- Any programming language support

activity49-multi-armed-bandit.yaml - Adaptive algorithms beat A/B testing
- Epsilon-greedy implementation
- 88% regret reduction vs traditional A/B
- Real-world applications (web optimization, clinical trials)

activity50-genetic-algorithms.yaml - Evolution-based optimization
- String evolution challenge
- Fitness, selection, crossover, mutation
- 803,181x faster than brute force

activity51-connect-four.yaml - Complete game development
- 2D arrays and game state
- Win detection algorithms (horizontal, vertical, diagonal)
- Full game loop implementation

All activities:
- Support ANY programming language choice
- Follow pedagogical best practices (concepts first, code in feedback)
- Validate with zero errors/warnings
- Engaging and fun (aha moments, real games, simulations)
2025-11-09 16:07:15 +00:00
Claude
4e72fed8be
Add game theory programming courses for Python and C
NEW ACTIVITIES:

activity46-game-theory-python.yaml - Game theory implementation in Python
- Representing games with dictionaries
- Payoff matrix as dict with tuple keys
- Query functions and game simulation
- One-shot and repeated games
- Tit-for-Tat strategy implementation
- Function composition and abstraction

activity47-game-theory-c.yaml - Game theory implementation in C
- Defining Payoff struct for outcomes
- 2D arrays for payoff matrices
- Memory-efficient game representation
- Strategy lookup functions
- Enum for self-documenting code
- Pointer and struct fundamentals

Both activities:
- Teach programming through game theory concepts
- Follow pedagogical best practice (concepts first, code examples in feedback)
- Validate with zero errors/warnings
- Progressive difficulty (structures → functions → simulation)
- Real-world application of abstract concepts
- Engage students with strategic thinking + coding
2025-11-09 15:36:12 +00:00
Claude
b8bf7261cb
Add complete statistics and game theory curriculum (6 activities)
NEW ACTIVITIES:

activity40-statistics-101.yaml - Foundational statistics
- Central tendency, spread, probability, distributions
- Real-world applications and critical thinking

activity41-game-theory-101.yaml - Strategic fundamentals
- Prisoner's Dilemma, Nash Equilibrium, dominant strategies

activity42-game-theory-201.yaml - Advanced concepts
- Mixed strategies, repeated games, Tit-for-Tat

activity43-game-theory-301.yaml - Cooperative games
- Coalition formation, Shapley value, fair division

activity44-game-theory-401.yaml - Information asymmetry
- Signaling, screening, adverse selection

activity45-game-theory-501.yaml - Mechanism design
- Auction theory, Vickrey auctions, incentive compatibility

All activities:
- Validate with zero errors/warnings
- Follow expert guide requirements
- Include engaging examples
- Terminate properly
- Support language switching
2025-11-09 15:27:38 +00:00
Claude
31e357e8bf
Add statistics and game theory 101 activities plus pedagogical fixes 2025-11-09 15:25:04 +00:00
Claude
e4ab13ae78
Fix pedagogical issue: Don't show code examples before asking students to write code
PROBLEM: activity37 was showing complete code examples in Python, JavaScript,
Java, and C++ BEFORE asking students to write code themselves. This turns
learning into copy-paste practice.

FIXED:
- Hello World section: Removed multi-language code examples from content_blocks
- Variables section: Removed multi-language code examples from content_blocks
- Now explains CONCEPTS (what, why, how languages differ) without showing syntax
- Code examples remain in AI feedback for when students struggle or ask for help

PEDAGOGICAL APPROACH:
1. Explain the concept (stdout, variables, etc.)
2. Explain language differences conceptually (dynamic vs static typing)
3. Ask students to TRY writing code in THEIR language
4. Provide language-specific examples in AI FEEDBACK if they struggle

This way students actually have to THINK and LEARN, not just copy.

UPDATED CLAUDE.md:
- Added new pitfall: "Showing answers before questions"
- Guidance: Explain concepts in content_blocks, provide code examples in ai_feedback

Still validates perfectly with zero errors/warnings.
2025-11-09 15:09:50 +00:00
Claude
10d0ec27a2
Add two fashion activities: modern style and historical journey
activity38-fashion-today.yaml - Fun, interactive style discovery
- Personal style identification (classic, boho, streetwear, etc.)
- Color psychology and preferences
- Outfit building for occasions
- Statement pieces and accessories
- Fashion philosophy reflection
- Encourages self-expression and confidence

activity39-fashion-history.yaml - Educational timeline 1800-2025
- Victorian era corsets and social restrictions
- 1920s flappers and women's liberation
- WWII rationing and practical fashion
- 1950s ultra-femininity and gender politics
- 1960s-70s revolution (mod, hippie, disco, punk)
- 1980s excess and 1990s grunge backlash
- 2000s-2010s fast fashion and social media
- 2020s sustainability, inclusivity, technology
- Critical thinking about fashion as social mirror

Both activities:
- Follow expert guide validation requirements
- Include engaging content with emojis and formatting
- Support language switching
- Use metadata strategically
- Have multiple response paths with tailored feedback
- Terminate properly with activity_completed markers
- Passed activity_yaml_validator.py with zero errors/warnings
2025-11-09 14:50:04 +00:00
Claude
cfc2a8ad08
Expand stdout explanation with comprehensive technical details
- Added 53 new lines of stdout/standard output explanation
- Broke down terminology: standard, output, stdout/STDOUT
- Explained the three standard streams (stdin, stdout, stderr)
- Added visual diagram of stdout flow
- Included Unix/1970s historical context
- Explained why it's called "standard"
- Added advanced redirection concepts (pipes, file redirection)
- Total file now 1,948 lines (up from 1,895)
- Validation passed successfully
2025-11-09 11:56:22 +00:00
Claude
3ef98143b2
Expand activity37 with comprehensive fundamental explanations
- Increased from 1,148 to 1,895 lines (+65%)
- Added detailed explanations before each coding exercise
- Enhanced Hello World section with stdout concepts and multi-language examples
- Expanded Variables section with box analogy, naming rules, and typing differences
- Enhanced Data Types with comprehensive type explanations and string formatting
- Expanded If Statements with conditional logic fundamentals and comparison operators
- Enhanced Loops with detailed for loop explanations, execution traces, and common patterns
- Expanded Functions with DRY principle, parameter explanations, and best practices
- Enhanced Return Values with display vs return differences and common mistakes
- All sections now teach fundamentals thoroughly before asking students to code
- Validation passed successfully
2025-11-09 11:31:28 +00:00
Claude
f774d36d74
Fix activity completion and progression issues in activities 30-37
This commit addresses two critical issues:

1. Completion Bug (activities 30-37):
   - Final steps were looping forever, preventing activity completion
   - Fixed by removing next_section_and_step from completion transitions
   - Kept off_topic transition looping to avoid validator terminal step errors
   - Activities now complete properly when users give valid final answers

2. Activity37 Bucket Logic:
   - Changed "close" bucket to retry same step instead of advancing
   - Only "correct" bucket now advances to next step
   - All other buckets (close, incomplete, wrong_language, etc.) retry
   - This ensures students must get correct answers to progress

Technical Details:
- Final steps are not considered "terminal" if at least one transition
  has next_section_and_step (validator requirement)
- Off-topic transitions loop back to allow another attempt
- Completion happens when get_next_step() returns None, None

Validation:
- All 8 activities pass activity_yaml_validator.py
- No errors or warnings

Affects: activity30-37 (all new merged activities)
2025-11-08 22:59:06 +00:00
Claude
fd78927e7c
Fix MODEL_X references to use dynamic model registry
When MODEL_X references (MODEL_0, MODEL_1, etc.) are used, the code now
properly looks up actual model names from the dynamic registry (MODEL_CLIENT_MAP)
instead of hardcoding "model" or requiring MODEL_NAME_X environment variables.

Changes:
- app.py: Look up models from MODEL_CLIENT_MAP for the specified endpoint
- guarded_ai.py: Query endpoints for actual model names at initialization
- guarded_ai.py: Use dynamic registry for MODEL_X lookups

This fixes the "model not found" error when using activities with MODEL_X
references like activity37.
2025-11-08 19:58:21 +00:00
Claude
3c3b8bd493
Change default model from MODEL_1 to MODEL_0 to match stable config
Respects existing stable configuration where:
- MODEL_0 = Hermes (default for classification and feedback)
- MODEL_1 = Qwen (for code generation)
- MODEL_2 = GPT

Updated:
- All function defaults in activity.py: MODEL_1 -> MODEL_0
- activity37: Uses MODEL_0 for classification, MODEL_1 for code feedback

This works with the existing environment variable setup without requiring changes to vars.sh.
2025-11-08 19:53:46 +00:00
Claude
0f06772afb
Fix critical model name issue and validator warning
Critical fix for guarded_ai.py:
- Add MODEL_NAME_{n} environment variable support
- Fixes hard-coded "model" string that breaks Azure OpenAI and other endpoints
- Falls back to "model" if MODEL_NAME_{n} not specified
- Some endpoints require actual deployment name in model parameter

Validator improvement:
- Allow feedback_prompts as alternative to feedback_tokens_for_ai
- Prevents false warning when using metadata_feedback_filter with new prompt system

Documentation:
- Added MODEL_NAME_{n} examples to CLAUDE.md
- Documented that Azure and similar endpoints need this variable

All 8 activities validated: 0 errors, 0 warnings
2025-11-08 19:38:15 +00:00
Claude
1c5a4960fd
Update NEW_ACTIVITIES_PLAN.md with completion status
Transformed planning document into comprehensive completion report:
- Status: 8 activities completed (30-37), 6,112 lines of YAML
- Documented new classifier_model and feedback_model feature
- Added model setup guide for Qwen3-Coder-30B
- Detailed activity summaries with special features
- Technical architecture and implementation decisions
- Usage examples and future enhancements

Key highlights:
- All activities validated with 0 errors
- Dual-model architecture explained
- Activity 37 flagship feature: universal programming language support
- Hermes excellence in role-playing scenarios
2025-11-08 19:32:00 +00:00
Claude
f87824bc56
Add Qwen3-Coder-30B setup documentation to activity37
Added detailed comments showing how to use the recommended model:
- hf.co/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:Q4_K_M
- Setup instructions for llama.cpp (with GPU offloading)
- Alternative setup with ollama
- Environment variable configuration examples

This 30B parameter model is specifically optimized for code generation
across all programming languages, making it perfect for the universal
programming activity.
2025-11-08 19:27:27 +00:00
Claude
c51b2c7900
Update guarded_ai.py to support classifier_model and feedback_model
Changes:
- Enhanced get_openai_client_and_model() to support MODEL_X references
- Added model parameter (default "MODEL_1") to all AI functions:
  - categorize_response()
  - generate_ai_feedback()
  - provide_feedback()
  - provide_feedback_prompts()
  - translate_text()
- Updated simulate_activity() to:
  - Read classifier_model and feedback_model from YAML
  - Support step-level model overrides
  - Pass appropriate models to classifier vs feedback functions

This ensures the CLI simulation tool matches the production activity.py behavior.
2025-11-08 19:23:29 +00:00
Claude
1c347ea060
Add classifier_model and feedback_model support to YAML schema
Allow activities to specify separate models for classification and feedback:
- classifier_model: Used for categorizing user responses into buckets
- feedback_model: Used for generating AI feedback and translations

Both fields can be set at activity level (defaults) and overridden at step level.

Updated activity37 to use:
- MODEL_1 (Hermes) for classification
- MODEL_3 (Qwen 3 Coder) for feedback

This allows using specialized models for different tasks, e.g., fast classification
with accurate feedback generation from domain-specific models.
2025-11-08 18:58:29 +00:00
Claude
11e705be97
Add 3 extensive educational activities (American History, Biblical History, Programming)
Created 3 comprehensive educational activities without embedded Python:

1. activity35-american-history.yaml - Advanced American History for gifted students
   - Founding principles and Constitutional design
   - Civil War causes and Reconstruction failure
   - Civil Rights Movement strategies
   - Primary source analysis and critical historical thinking
   - Connects past to present issues

2. activity36-biblical-history.yaml - Biblical History & Ancient Near East
   - Ancient Near Eastern context (Mesopotamia, Egypt, Canaan)
   - Archaeological evidence and historical reconstruction
   - Israelite history (Exodus, Monarchy, Exile)
   - Roman period and early Christianity
   - Foundation myths vs historical facts
   - Cultural adaptation and religious transformation

3. activity37-programming-languages.yaml - Universal Programming Concepts
   - Student chooses ANY programming language (Python, C++, COBOL, anything)
   - AI adapts all examples/feedback to chosen language via metadata
   - Covers: stdout/output, variables, data types, control flow, loops, functions
   - All examples use stdout to display messages
   - Concepts applicable to every language
   - Language-specific syntax provided by AI

All activities:
- Use only YAML features (no embedded Python)
- Validate successfully with 0 errors
- Provide sophisticated educational content
- Use AI feedback for personalization
- Include critical thinking and reflection
- Track progress via metadata

Total: 8 new educational activities across 2 commits (5 from previous commit + 3 now)
2025-11-08 18:47:31 +00:00
Claude
994d5e5de9
Add 5 new educational activities without embedded Python
Created 5 comprehensive educational activities that use only YAML features
(buckets, transitions, metadata operations, AI feedback) without Python scripts:

- activity30-logic-puzzles.yaml: Critical thinking through deductive reasoning,
  contrapositives, syllogisms, and knights/knaves puzzles

- activity31-scientific-method.yaml: Learn scientific method through historical
  case studies (Semmelweis, Newton) and experimental design principles

- activity32-world-geography.yaml: Choose-your-own-adventure journey exploring
  continents, countries, capitals, and cultural facts

- activity33-environmental-science.yaml: Role-playing as environmental consultant
  making sustainability decisions on transportation, energy, land use, waste, and food

- activity34-media-literacy.yaml: Develop critical media consumption skills,
  evaluate sources, recognize bias, fact-check claims, and spot manipulation

All activities:
- Follow existing YAML schema and validate successfully
- Use Socratic buckets for educational feedback
- Include set_language support
- Track progress via metadata
- Provide AI-generated personalized feedback
- Are educational, engaging, and progressively challenging
- Include final reflection steps

Also added NEW_ACTIVITIES_PLAN.md documenting the planning process and
design rationale for each activity.
2025-11-08 17:34:33 +00:00
07a620a389 Fix activity15 coin usage and duplicate messages
- Remove duplicate messages from section transitions like activity14
- Fix coin categorization issue - 'use coin' was being misclassified as 'use_key_and_password'
- Add section_4:step_2 for post-safe-opening state with proper coin slot options
- Update tokens_for_ai to properly distinguish between different user actions
- Now players can properly access the secret compartment using the coin
- Activity validated and passes all checks
2025-08-11 18:35:46 -04:00
e3d33b90fd Simplify battleship prompts to let AI imagine destruction details
Remove prescriptive ship destruction descriptions and let the AI be creative.
Since skip_condition ensures these prompts only run when ships are actually
destroyed, we can make the prompts more concise and focused on the outcome.
2025-08-11 17:16:06 -04:00
fca7addaa5 Fix battleship AI hallucination bug with skip_condition system
Add skip_condition logic to feedback prompts to prevent AI from generating
false ship destruction messages when no ships were actually destroyed.

Changes:
- Add skip_condition parameter support in provide_feedback_prompts()
- Support all_null, all_false, and all_true condition types
- Apply skip_condition to battleship Ship Status and Game Over prompts
- Add comprehensive unit tests covering all skip condition scenarios
- Test real battleship scenario that was causing hallucinations

This prevents the AI from creating false positive ship destruction messages
when metadata indicates no ships were actually sunk (all null values).
2025-08-11 17:04:17 -04:00
98b0ebab24 Fix duplicate exit messages in battleship
- Removed feedback_tokens_for_ai from step 3 Game Over
- Exit transition already has appropriate content_blocks
- Eliminates duplicate farewell messages when exiting
2025-08-11 13:14:07 -04:00
f90df2ae57 modified: activity_yaml_validator.py
modified:   app.py
	modified:   research/activity29-battleship.yaml
	modified:   research/activity29-testship.yaml
	modified:   research/guarded_ai.py
	modified:   tests/functional/test_activity_flows.py
	modified:   tests/functional/test_battleship_pre_script.py
	modified:   tests/functional/test_guarded_ai.py
	modified:   tests/unit/test_activity_yaml_validator.py
	modified:   tests/unit/test_app_feedback.py
	modified:   tests/unit/test_guarded_ai.py
2025-08-11 12:39:42 -04:00
d4d697db59 Implement per-prompt metadata filtering and fix battleship feedback system
Major improvements to battleship game feedback accuracy and user experience:

## New Multi-Prompt Feedback System
- Replaced single feedback with 3 specialized prompts: Shot Report, Ship Status, Game Over
- Each prompt has individual metadata filtering to see only relevant data
- Shot Report only sees hit/miss data, Ship Status only sees ship destruction data
- Added STFU token system to suppress empty messages (filtered out automatically)

## Technical Implementation
- Added per-prompt metadata_filter support in YAML structure
- Updated app.py and guarded_ai.py to handle prompt-specific filtering
- Legacy single-prompt system still works with transition-level filtering
- Added comprehensive test suite for feedback system validation

## User Experience Fixes
- Fixed TTS queue blocking JavaScript execution (async promises instead of await)
- Ship Status now correctly reports who destroyed which ship (role confusion fixed)
- Game Over only appears when game actually ends (no more random messages)
- Maintained dramatic storytelling while ensuring factual accuracy

## Battleship-Specific Improvements
- Ship destruction messages only appear when ships actually sink
- Clear separation of concerns: hits/misses vs ship destruction vs game over
- Eliminated false positive ship destruction reports
- Fixed role reversal where wrong player got credit for destruction

The battleship narrator now provides accurate, contextual feedback while preserving the dramatic naval warfare atmosphere.
2025-08-11 11:39:49 -04:00
e28dc11f04 Improve user experience with battleship feedback and auto-play TTS
- Fix battleship feedback perspective confusion with better Hermes prompting
- Add auto-play TTS button with localStorage persistence and queueing system
- Move activity controls below model/voice selectors in sidebar
- Add activity controls to mobile hamburger menu
- Fix model/activity dropdowns to stay within container bounds
- Filter activities API to only show .yaml/.yml files
- Clean up system message labels by moving to usernames (System (Feedback), System (Question))
- Apply black formatting to app.py
2025-08-11 09:34:29 -04:00
1b44c2d66b Integrate comprehensive testing framework with Makefile
- Added unit tests for YAML loading and parsing functionality
- Created integration tests for multiple activity files validation
- Implemented functional tests for complete activity workflows
- Added battleship pre_script functionality tests
- Integrated all test types into comprehensive Makefile
- Fixed CLI validator test with proper failing fixture
- Applied black formatting to all Python files
- Removed problematic hardcoded targets from Makefile
- Added proper venv dependency management

Test coverage includes:
- Unit: YAML loading, validator functionality
- Integration: Cross-file validation, metadata operations
- Functional: End-to-end activity flows, pre_script execution
- All 30 activity files validated and tested
2025-08-10 19:38:50 -04:00
51b74be7d9 Fix YAML validator and activity file validation errors
- Updated validator terminal step detection to only flag truly terminal steps
- Fixed validator to accept integers and booleans in buckets (as supported by app.py)
- Fixed metadata_remove format in activity17 from dictionary to list of strings
- Added proper terminal section to activity3.yaml without questions/buckets
- Fixed missing restart transition and bucket in activity28
- Removed unused game_end transitions from battleship files
- Updated exit transitions to go directly to step_4 (goodbye step)
- Applied black formatting to validator code

All 30 activity YAML files now validate successfully with 0 errors and 0 warnings.
2025-08-10 19:38:50 -04:00
1ca6f67c3d Fix code quality issues from PR review
- Add matplotlib.use("Agg") backend configuration to prevent runtime errors in headless environments
- Add error handling guards for script results that might return None
- Fix AI targeting logic to exclude already-fired cells in super hunter and hunter modes
- Update CLAUDE.md with matplotlib best practices
2025-08-10 16:01:58 -04:00
4d909aaecb Fix indentation error from commented print statements
- Add pass statements to empty else blocks that only contained commented prints
- Ensures Python syntax remains valid after commenting out debug statements
2025-08-10 15:19:59 -04:00
29573eaa75 Enhance battleship activity with improved user input handling and feedback
- Add user_response to pre-script metadata for better game state management
- Implement metadata_feedback_filter to control feedback data exposure
- Improve ship destruction announcements and game over messaging
- Add debug logging for ship sinking events
- Include test ship configuration file
2025-08-10 14:49:03 -04:00
368c7d290e Add Hermes Reasoner mode to battleship with game ending fixes
- Add new Hermes Reasoner AI mode that combines probability analysis with LLM reasoning
- Implement pre-script and post-script architecture in app.py for flexible YAML processing
- Fix game ending detection by adding transition override mechanism
- Add probability matrix visualization and strategic move analysis
- Support both legacy processing_script and new pre_script/post_script naming
- Restore full ship complement for complete battleship gameplay
2025-08-10 11:57:22 -04:00
fc53cd3cc5 ● Enhance math plotting activity with secure multi-function support
- Replace unsafe eval() with sympy for secure expression parsing
  - Add YAML anchors to eliminate code duplication in processing scripts
  - Implement multiple function plotting with comma-separated syntax
  - Add dynamic plot ranges based on function characteristics
  - Include automatic function type detection and analysis
  - Streamline activity flow: intro → demo plot → open sandbox
  - Add comprehensive error handling with visual error messages
  - Support enhanced mathematical notation (arcsin, ln, implied multiplication)

	modified:   research/activity24-math-plot.yaml
2025-06-23 23:21:25 -04:00
2a1efd1f90 claude security upgrade
modified:   requirements.txt
	modified:   research/activity24-math-plot.yaml
2025-06-23 22:36:23 -04:00
Russell Ballestrini
8cee47fcc9 modified: research/activity29-battleship.yaml 2025-04-23 16:17:05 -04:00
b257f766f8 Rubric for battleship ending.
modified:   research/activity29-battleship.yaml
2024-09-16 11:59:56 -04:00
9246565407 battleship, super human hunter mode
modified:   research/activity29-battleship.yaml
2024-09-09 07:12:58 -04:00
49cc545a4c Battleship Hunter Mode!
In this mode the AI will switch from random to hunting all the positions
around the latest hit. It's still not as smart as a human but you will
start to feel hunted as the game progresses versus the other game mode.

	modified:   research/activity29-battleship.yaml
2024-09-07 13:18:42 -04:00
6763c0b9d5 tic tac toe
modified:   research/activity27-tic-tac-toe.yaml
2024-09-07 10:12:11 -04:00
930fa66b19 a bit better battleship
modified:   research/activity29-battleship.yaml
2024-08-30 09:46:07 -04:00
ba91cbcb27 modified: research/activity27-tic-tac-toe.yaml
new file:   static/images/tic-tac-toe.png
2024-08-29 06:55:40 -04:00
d1998f9d1c move off message to chat_message but it doesn't fix order issue.
The app seems to queue the category, feedback/content_blocks question

The strange part is the set_background happens in the middle of the
script after category but it comes first and FAST! In about a second
while the other messages take about 4 secs to finally arrive.

	modified:   app.py
	modified:   research/activity29-battleship.yaml
	modified:   templates/chat.html
2024-08-28 07:15:18 -04:00
0170327483 battleship
new file:   research/activity29-battleship.yaml
2024-08-25 15:40:33 -04:00