thompsonson Claude commited on
Commit
1b86466
Β·
1 Parent(s): 6f1dba6

feat: add entropy display to game status messages

Browse files

- Show real-time entropy during playing rounds to track belief uncertainty
- Include final entropy in completed game status alongside accuracy
- Entropy displayed in bits with 2 decimal precision for educational value
- Helps users understand Bayesian learning process and confidence levels

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. ui/gradio_interface.py +4 -2
ui/gradio_interface.py CHANGED
@@ -103,11 +103,13 @@ class GradioInterface:
103
  if state.phase == GamePhase.SETUP:
104
  status = "🎯 Ready to start new game"
105
  elif state.phase == GamePhase.PLAYING:
106
- status = f"🎲 Playing - Round {state.round_number}/{state.max_rounds}"
 
107
  else: # FINISHED
108
  correct = "βœ…" if self.game.was_final_guess_correct() else "❌"
109
  accuracy = self.game.get_final_guess_accuracy()
110
- status = f"{correct} Game finished! Final guess: {state.most_likely_target} (True: {state.target_value}) - Accuracy: {accuracy:.2f}"
 
111
 
112
  # Round information - removed for cleaner UI
113
 
 
103
  if state.phase == GamePhase.SETUP:
104
  status = "🎯 Ready to start new game"
105
  elif state.phase == GamePhase.PLAYING:
106
+ entropy = state.belief_entropy
107
+ status = f"🎲 Playing - Round {state.round_number}/{state.max_rounds} - Entropy: {entropy:.2f} bits"
108
  else: # FINISHED
109
  correct = "βœ…" if self.game.was_final_guess_correct() else "❌"
110
  accuracy = self.game.get_final_guess_accuracy()
111
+ entropy = state.belief_entropy
112
+ status = f"{correct} Game finished! Final guess: {state.most_likely_target} (True: {state.target_value}) - Accuracy: {accuracy:.2f} - Entropy: {entropy:.2f} bits"
113
 
114
  # Round information - removed for cleaner UI
115