2.1 KiB
2.1 KiB
README_temperature.md
Overview
temperature.py implements the Temperature system, a crucial component of the Copycat system that controls the balance between exploration and exploitation during analogical reasoning. It provides various formulas for adjusting probabilities based on the current temperature, which affects how the system makes decisions.
Core Components
Temperatureclass: Main class that manages the temperature system- Multiple adjustment formulas for probability modification
- Temperature history tracking
Key Features
- Manages temperature-based control of the reasoning process
- Provides multiple formulas for probability adjustment
- Supports temperature clamping and unclamping
- Tracks temperature history and differences
- Allows dynamic switching between adjustment formulas
Adjustment Formulas
original: Basic temperature-based adjustmententropy: Entropy-based adjustmentinverse: Inverse weighted adjustmentfifty_converge: Convergence to 0.5soft_curve: Soft curve adjustmentweighted_soft_curve: Weighted soft curvealt_fifty: Alternative fifty convergenceaverage_alt: Averaged alternativebest: Working best formulasbest: Soft best formulapbest: Parameterized bestmeta: Meta-level adjustmentpmeta: Parameterized metanone: No adjustment
Main Methods
update(value): Update temperature valueclampUntil(when): Clamp temperature until specified timetryUnclamp(currentTime): Attempt to unclamp temperaturevalue(): Get current temperaturegetAdjustedProbability(value): Get temperature-adjusted probabilityuseAdj(adj): Switch to different adjustment formula
Dependencies
- Uses
mathfor mathematical operations - Used by the main
copycatmodule
Notes
- Temperature starts at 100.0 and can be clamped
- Lower temperatures encourage more conservative decisions
- Higher temperatures allow more exploratory behavior
- The system tracks average differences between adjusted and original probabilities
- Different adjustment formulas can be used for different reasoning strategies