Skip to content

Commit 1b86466

Browse files
thompsonsonclaude
andcommitted
feat: add entropy display to game status messages
- 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 <[email protected]>
1 parent 6f1dba6 commit 1b86466

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ui/gradio_interface.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,13 @@ def _get_interface_state(self) -> tuple[str, plt.Figure, str]:
103103
if state.phase == GamePhase.SETUP:
104104
status = "🎯 Ready to start new game"
105105
elif state.phase == GamePhase.PLAYING:
106-
status = f"🎲 Playing - Round {state.round_number}/{state.max_rounds}"
106+
entropy = state.belief_entropy
107+
status = f"🎲 Playing - Round {state.round_number}/{state.max_rounds} - Entropy: {entropy:.2f} bits"
107108
else: # FINISHED
108109
correct = "✅" if self.game.was_final_guess_correct() else "❌"
109110
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+
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"
111113

112114
# Round information - removed for cleaner UI
113115

0 commit comments

Comments
 (0)