Spaces:
Sleeping
Sleeping
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>
- 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 |
-
|
|
|
|
| 107 |
else: # FINISHED
|
| 108 |
correct = "β
" if self.game.was_final_guess_correct() else "β"
|
| 109 |
accuracy = self.game.get_final_guess_accuracy()
|
| 110 |
-
|
|
|
|
| 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 |
|