summaryrefslogtreecommitdiff
path: root/ep_run
diff options
context:
space:
mode:
Diffstat (limited to 'ep_run')
-rw-r--r--ep_run/casc_eq_train.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/ep_run/casc_eq_train.py b/ep_run/casc_eq_train.py
index fb9dca5..cca37b5 100644
--- a/ep_run/casc_eq_train.py
+++ b/ep_run/casc_eq_train.py
@@ -68,6 +68,9 @@ ap.add_argument('--drift_adapt', type=float, default=0.0) # >0: adaptive drift
ap.add_argument('--beta_cap_rho', type=float, default=0.0) # >0: LOOP-GAIN CAP on beta — if per-sweep residual
# ratio rho^ exceeds this, bscale *= 0.8 (beta backs off
# under the wall-2 ceiling); recovers x1.02 when rho^ low
+ap.add_argument('--cap_floor', type=float, default=0.05) # hard bottom of the rho-cap; 0 = pure ceiling-tracking
+ # (cap follows the measured ceiling all the way down; a
+ # pinned bottom above the true ceiling = disguised wall-2)
ap.add_argument('--relax_tol', type=float, default=0.0) # >0: ADAPTIVE relax — sweep until rel. state change < tol
# (or --kmax), geta backtracks x0.6 on residual GROWTH (rho>=1
# signal), then one final graphed round. 0 = legacy fixed-K.
@@ -445,7 +448,7 @@ def ep_step(x, y):
# EFFECTIVE beta is continuous across any floor change (the 0.09-at-20k bug, RESULT 37)
pf = GOV.get('prev_floor')
if pf is not None and fl != pf and pf > 0 and fl > 0:
- GOV['cap'] = min(max(GOV.get('cap', 1.0) * pf / fl, 0.05), args.beta_ride)
+ GOV['cap'] = min(max(GOV.get('cap', 1.0) * pf / fl, args.cap_floor), args.beta_ride)
GOV['prev_floor'] = fl
beta_t = beta_t * GOV.get('cap', 1.0) # wall-2 loop-gain cap OVERRIDES the floor (the ceiling
# can sit below the floor near the wall; survival first)
@@ -504,7 +507,7 @@ def ep_step(x, y):
if _legal(gdrift):
ok_retry = True
if args.beta_ride > 1.0: # the failed trial IS the ceiling measurement
- GOV['cap'] = max(GOV.get('cap', 1.0) * 0.5 ** (_h + 1), 0.05)
+ GOV['cap'] = max(GOV.get('cap', 1.0) * 0.5 ** (_h + 1), args.cap_floor)
break
if ok_retry:
pass
@@ -534,7 +537,7 @@ def ep_step(x, y):
rho_use = GOV['rho_ema'] = 0.9 * GOV.get('rho_ema', rho_g) + 0.1 * rho_g
GOV['cool'] = max(GOV.get('cool', 0) - 1, 0)
if res_g > 0.02 and rho_use > args.beta_cap_rho:
- GOV['cap'] = max(GOV.get('cap', 1.0) * 0.85, 0.05) # attack (gentler than v1)
+ GOV['cap'] = max(GOV.get('cap', 1.0) * 0.85, args.cap_floor) # attack (gentler than v1)
if args.ride_cool > 0: GOV['cool'] = args.ride_cool # ride-v2(c), opt-in
elif (res_g < 0.01 or rho_use < 0.5 * args.beta_cap_rho) and GOV['cool'] == 0:
# recover; with beta_ride > 1 the governor CLIMBS past the schedule — beta finds