"""alpha_machine.algo — 純算法 / file-backed state，無 Tk 依賴。

- bandit:        UCB / Thompson 採樣與 arm 統計
- self_optimizer: 100-window 成功率自動調 explore/temp/mut
- sim_counter:   每日 5000 sim 配額（EST，atomic SQLite upsert）

GUI 一律從這裡 import；machine_lib.py 不知道這些檔案存在。
"""

from .bandit import (
    arm_key, expr_op_category, expr_field_category,
    score_ucb, score_thompson, record, load_weights, save_weights,
)
from .self_optimizer import (
    SelfOptState, observe, get_exploration, load_state,
    EVAL_WINDOW, LOW_THRESHOLD, HIGH_THRESHOLD, BOUNDS,
)
from .sim_counter import (
    est_today, get_count, increment, can_proceed,
    DAILY_HARD, DAILY_WARN,
)

__all__ = [
    'arm_key', 'expr_op_category', 'expr_field_category',
    'score_ucb', 'score_thompson', 'record', 'load_weights', 'save_weights',
    'SelfOptState', 'observe', 'get_exploration', 'load_state',
    'EVAL_WINDOW', 'LOW_THRESHOLD', 'HIGH_THRESHOLD', 'BOUNDS',
    'est_today', 'get_count', 'increment', 'can_proceed',
    'DAILY_HARD', 'DAILY_WARN',
]
