Files
gogobee/scripts/backfill_room_sentiment.sh
prosolis c7c1b76589 Add adventure plugin, holdem CFR fixes, and wordle plugin
Adventure: Complete v1 daily idle RPG with DM-driven gameplay, equipment
shop, treasure system, TwinBee NPC, streak/grudge/party mechanics,
flavor text, and scheduled morning/evening/midnight tickers.

Holdem CFR: Fix three critical training bugs (fold not forfeiting pot,
free calls after raises, training/runtime key mismatch). Add performance
optimizations (preflop lookup table, zero-alloc equity, integer keys,
raise cap, regret pruning). Enrich abstraction with 12 equity buckets,
board texture dimension, and 6-char action history. Replace validation
with proper multi-street simulation.

Also includes wordle plugin, holdem seed tooling, and schema additions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 10:09:57 -07:00

35 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# Backfill room_sentiment_stats from existing llm_classifications data.
# Run once after deploying the room_sentiment_stats schema change.
#
# Usage: ./scripts/backfill_room_sentiment.sh [path/to/gogobee.db]
set -euo pipefail
DB="${1:-data/gogobee.db}"
if [ ! -f "$DB" ]; then
echo "Database not found: $DB"
exit 1
fi
sqlite3 "$DB" <<'SQL'
INSERT INTO room_sentiment_stats (room_id, positive, negative, neutral, excited, sarcastic, frustrated, curious, grateful, humorous, supportive, total_score)
SELECT room_id,
SUM(CASE WHEN sentiment = 'positive' THEN 1 ELSE 0 END),
SUM(CASE WHEN sentiment = 'negative' THEN 1 ELSE 0 END),
SUM(CASE WHEN sentiment = 'neutral' THEN 1 ELSE 0 END),
SUM(CASE WHEN sentiment = 'excited' THEN 1 ELSE 0 END),
SUM(CASE WHEN sentiment = 'sarcastic' THEN 1 ELSE 0 END),
SUM(CASE WHEN sentiment = 'frustrated' THEN 1 ELSE 0 END),
SUM(CASE WHEN sentiment = 'curious' THEN 1 ELSE 0 END),
SUM(CASE WHEN sentiment = 'grateful' THEN 1 ELSE 0 END),
SUM(CASE WHEN sentiment = 'humorous' THEN 1 ELSE 0 END),
SUM(CASE WHEN sentiment = 'supportive' THEN 1 ELSE 0 END),
SUM(sentiment_score)
FROM llm_classifications
GROUP BY room_id;
SQL
echo "Done. Backfilled room_sentiment_stats from llm_classifications."