feat(weight-evolver): run_simulation이 active W를 score_combination에 전달

This commit is contained in:
2026-05-22 03:12:24 +09:00
parent 1db8a0063d
commit 11b3700959

View File

@@ -25,6 +25,7 @@ from .db import (
) )
from .analyzer import build_analysis_cache, build_number_weights, score_combination from .analyzer import build_analysis_cache, build_number_weights, score_combination
from .utils import weighted_sample_6 from .utils import weighted_sample_6
from .weight_evolver import get_active_weight
def run_simulation( def run_simulation(
@@ -54,6 +55,7 @@ def run_simulation(
# ── 1. 통계 캐시 및 가중치 구성 (시뮬레이션 전체에서 재사용) ──────────── # ── 1. 통계 캐시 및 가중치 구성 (시뮬레이션 전체에서 재사용) ────────────
cache = build_analysis_cache(draws) cache = build_analysis_cache(draws)
weights = build_number_weights(cache) weights = build_number_weights(cache)
active_weights = get_active_weight() # None → analyzer uses fixed default
# ── 2. 후보 생성 및 스코어링 ────────────────────────────────────────────── # ── 2. 후보 생성 및 스코어링 ──────────────────────────────────────────────
candidates: List[Dict[str, Any]] = [] candidates: List[Dict[str, Any]] = []
@@ -69,7 +71,7 @@ def run_simulation(
continue continue
seen_keys.add(key) seen_keys.add(key)
scores = score_combination(nums, cache) scores = score_combination(nums, cache, weights=active_weights)
candidates.append({ candidates.append({
"numbers": sorted(nums), "numbers": sorted(nums),
**scores, **scores,