# Эксперимент: Feasible Action Mapping Safety Layer (#526) { "worked": true, "confidence": 9, "verdict": "Built an exact finite-horizon predictive safety layer that projects an unconstrained scalar action onto the state-dependent feasible interval for a bounded point-mass system. The mechanism manifested: feasible outputs had maximum projection distance 0, outside-distance slopes were -1/+1 with error 3.3e-16, the velocity-dependent boundary shift matched theory within 5.6e-17, and all 10,000 feasible random projections were certified. In the stress test clipping had 84 one-step violations while predictive projection had 0; the toy controller also achieved mean reward -51.20 versus -52.77 for clipping, though this is not a broad RL result.", "metrics": { "baseline": "Coordinate clipping: mean reward -52.7703, 0.0 violations/episode in the particular 30-episode closed-loop test; 84 violations in 10,000 random one-step stress cases.", "idea": "Predictive feasible projection: mean reward -51.2000, 0.0 violations/episode; 0 violations in 10,000 feasible random projections and mean projection distance 3.1837 in the closed-loop test. Core predictions: maximum inside distance 0, outside slope error 3.3e-16, boundary-shift residual 5.6e-17, certified fraction 1.0." }, "how_to_run": "/home/maxwelhelp/main/bin/python3 safety_layer_experiment.py", "files": [ "safety_layer_experiment.py", "results.json" ], "limitations": "This is an exact-model scalar constant-acceleration toy system, not PPO, a neural policy training experiment, or a nonlinear environment. Recursive feasibility across replanning steps, solver failures, model mismatch, differentiability, computational timing, and backup-controller behavior were not tested; the clipping closed-loop scenario happened not to produce violations despite the random stress test exposing its weakness." }