mirror of
https://github.com/imbue-bit/OpenClaw-PwnKit.git
synced 2026-08-14 09:02:51 +00:00
fix: tighten convergence threshold to prevent false-positive early stop
Changed threshold from -500.0 to -500.5. The fitness returns -500.0 - (100/nll) on full match, so real matches always score < -500.0. But partial matches with max keyword+substring bonuses (500 total) could theoretically reach -500.0 with very low NLL, causing premature stopping.
This commit is contained in:
@@ -150,7 +150,7 @@ class CMAESTokenOptimizer:
|
||||
es.tell(solutions, fitnesses)
|
||||
print(f"[Gen {gen}] fitness: {best_loss:.4f} | cache_hits: {cache_hits} | trigger: {repr(best_trigger_text)}")
|
||||
|
||||
if best_loss <= -500.0:
|
||||
if best_loss <= -500.5:
|
||||
print("[!] Attack converged - full target string found in output!")
|
||||
break
|
||||
|
||||
|
||||
Reference in New Issue
Block a user