Commit graph

82 commits

Author SHA1 Message Date
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
41dff2865a Easy way to restart an activity without quitting.
modified:   app.py
	modified:   research/activity27-tic-tac-toe.yaml
	modified:   research/activity28-killer-squares.yaml
2024-08-25 10:05:57 -04:00
ba37cb448c new file: research/activity28-killer-squares.yaml 2024-08-24 20:11:03 -04:00
db983f6d4b mathplotlib tic tac toe board.
modified:   research/activity27-tic-tac-toe.yaml
2024-08-24 16:15:05 -04:00
df54e6b4aa conditionally run processing_script
modified:   app.py
	modified:   research/activity22-odds-or-evens.yaml
	modified:   research/activity24-math-plot.yaml
	modified:   research/activity27-tic-tac-toe.yaml
	modified:   research/guarded_ai.py
2024-08-24 14:31:46 -04:00
691e4ab054 working tic tac toe
modified:   app.py
	modified:   research/activity27-tic-tac-toe.yaml
2024-08-24 13:38:38 -04:00
e95a150f3a modified: research/activity26-magic-8-ball.yaml 2024-08-24 09:21:51 -04:00
863cec2e86 modified: app.py
new file:   research/activity26-magic-8-ball.yaml
2024-08-21 08:06:56 -04:00
1095df37e1 modified: app.py
new file:   research/activity25-20-questions.yaml
2024-08-20 17:38:48 -04:00
3e183da802 modified: research/activity24-math-plot.yaml 2024-08-14 08:10:05 -04:00
c7086f6ee9 plot even more lines like sin(x)
modified:   research/activity24-math-plot.yaml
2024-08-11 18:24:16 -04:00
dc03ce9d5e math plotting!!! try out these equations:
( x^2 - 4x + 3 )
    ( x^2 - 2x + 1 )
    ( 2^x - 1 )

	modified:   app.py
	modified:   requirements.txt
	new file:   research/activity24-math-plot.yaml
2024-08-11 17:03:03 -04:00
5c9ef230ae modified: app.py
modified:   research/activity23-math.yaml
2024-08-11 13:39:30 -04:00
f09d24aefc make math progressively more difficult.
modified:   ../app.py
	modified:   activity23-math.yaml
2024-08-11 11:27:32 -04:00
7ac9c4583c new file: activity23-math.yaml 2024-08-11 09:44:15 -04:00
14dd105d03 woot upgraded guarded to support odds-or-evens game.
modified:   ../app.py
	new file:   activity22-odds-or-evens.yaml
	modified:   guarded_ai.py
2024-08-11 08:43:47 -04:00
be61486f38 modified: research/activity19-rock-paper-scissors.yaml 2024-08-10 19:23:14 -04:00
f923570f5a prompt engineering
modified:   app.py
	modified:   research/activity19-rock-paper-scissors.yaml
2024-08-10 19:15:19 -04:00
2609ff993d limited_effort should not be treated as correct.
modified:   app.py
	modified:   research/guarded_ai.py
2024-08-10 17:23:04 -04:00
f5df195e9b black and also set_language isn't "correct" anymore.
so it doesn't move the student on.

	modified:   app.py
	modified:   migrations/env.py
	modified:   migrations/versions/190d5ef26e20_add_token_count_to_message.py
	modified:   migrations/versions/a9e886c56482_create_room_table.py
	modified:   migrations/versions/d737de68d6fa_add_metadata_field_to_activitystate.py
	modified:   research/activity21.yaml
	modified:   research/guarded_ai.py
2024-08-10 17:00:52 -04:00
5f4cf76372 modified: activity21.yaml 2024-08-10 16:07:23 -04:00
3a6c62cf22 hopefully we get some python examples
modified:   ../app.py
	modified:   activity21.yaml
2024-08-10 15:55:46 -04:00
9a4f2a8b30 violent python activity21.yaml
modified:   ../app.py
	new file:   activity21.yaml
2024-08-10 15:42:31 -04:00
058b0161df allow increment to go backward with n-1 and also support any int c for the
increment or decrement.

	modified:   ../app.py
	modified:   guarded_ai.py
2024-08-10 15:00:28 -04:00
e3d3bf0303 n+1 in yaml to accumulate integers.
modified:   ../app.py
	new file:   activity20-n-plus-1.yaml
	modified:   guarded_ai.py
2024-08-10 14:39:37 -04:00
87faba6379 modified: guarded_ai.py 2024-08-10 13:40:22 -04:00
4f7caffe17 guarded_ai.py can also play rock-paper-scissors.yaml 2024-08-10 13:36:31 -04:00
0d908b65d4 fully functional activity19-rock-paper-scissors.yaml
modified:   ../app.py
	new file:   activity19-rock-paper-scissors.yaml
	modified:   ../templates/base.html
2024-08-10 13:24:26 -04:00
cebb2c2ec7 prompt engineering 2024-08-10 10:22:54 -04:00
4132afe9d1 prompt engineering
modified:   ../app.py
	modified:   activity0.yaml
2024-08-09 19:32:04 -04:00
af60dd8045 limited_effort for activity0.yaml example
modified:   activity0.yaml
2024-08-09 09:13:18 -04:00
3b8309a432 all languages translation to simulated gaurded_ai
modified:   guarded_ai.py
2024-08-09 08:41:46 -04:00
17777d727d support all the languages!
modified:   app.py
	modified:   research/activity0.yaml
2024-08-09 08:20:48 -04:00