[fix] agent: 보상함수를 q-table 상세 설명 v4 명세에 정합화

- 동적 가중치 W: 라운드 감쇠 → 상태 5차원 가중합 clip(Σwᵢ·Sᵢ, 0.2, 0.8) (식 12~13, 기존 w1~w5 연결)
- 종료보상에 (1−W) 적용: R = W×R_price + (1−W)×R_end − λ×round (식 8)
- R_price 3단계: P<anchor 시 1+β·(anchor−P)/anchor 초과달성 보너스 추가 (식 9~11, beta 의미 재정의)
- price zone 경계는 명세(T)와 달리 anchor 유지(우선협상 규칙이 실제 의사결정 경계) — 사유 docstring 명시
- state_calculator/config 의 낡은 반대 컨벤션(anchor≥target) 주석 정정
- RewardCalculator(RewardConfig, StateConfig) 시그니처 변경 + 호출부 5곳 갱신, 테스트 기대값 정정 (76/76 PASS)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
HyeongBaeYangandClaude Fable 5 committed 2026-07-02 14:10:44 +09:00
1 parent 43ac308a5e
commit be1b4b968f
9 files changed
+57 -33

No files matched your search

+1 -1
View File
@@ -78,7 +78,7 @@ async def run(tenant_id: str, use_db: bool, interactive: bool):
return
registry = TenantEngineRegistry(loader=loader)
engine = await registry.get_engine(tenant_id)
reward_calc = RewardCalculator(engine.config.reward)
reward_calc = RewardCalculator(engine.config.reward, engine.config.state)
repo = LearningRepository(engine.company_id)
episode = EpisodeState()
session_id = uuid.uuid4()