Views
No views yet
run_experiment.py.
It uses a linear UAV model, an LQR controller, the exact Riccati value function,
and Monte Carlo simulations to show that advantage-estimation error scales as
C sigma^2. The repository now also contains a complete Stable-Baselines3 PPO
training and analysis pipeline for testing the same hypothesis with learned
policies.sigma = [0.00, 0.05, 0.10, 0.20, 0.30, 0.50, 0.80, 1.00]Bias = C sigma^2Performance Drop = K sigma^pC, R^2, K, and the performance exponent p.envs/uav_env.py::UAVTurbulenceEnv.[x, vx, y, vy][ax, ay]1s_{t+1} = A s_t + B a_t + E w_t
2w_t ~ N(0, sigma^2)1A = [[1, dt, 0, 0 ],
2 [0, 1, 0, 0 ],
3 [0, 0, 1, dt],
4 [0, 0, 0, 1 ]]
5
6B = [[0, 0 ],
7 [dt, 0 ],
8 [0, 0 ],
9 [0, dt]]
10
11E = [0, 0, 0, 1]1r = -(s^T Q s + a^T R a)
2Q = I
3R = 0.1 I1.
2|-- envs/
3| |-- __init__.py
4| `-- uav_env.py
5|-- training/
6| |-- __init__.py
7| `-- train_ppo.py
8|-- analysis/
9| |-- __init__.py
10| |-- compute_gae_bias.py
11| |-- evaluate_models.py
12| `-- fit_models.py
13|-- figures/
14|-- models/
15|-- results/
16|-- config.py
17|-- run_training.py
18|-- run_analysis.py
19|-- run_experiment.py
20|-- make_plots.py
21|-- README.md
22`-- requirements.txtpip install -r requirements.txtdevice="cpu"
by default.python run_training.pyconfig.py:1,000,00064 -> 6464 -> 64Tanhgamma = 0.99gae_lambda = 0.950models/.python run_training.py --sigmas 0.0 0.1 0.2 --total-timesteps 5000 --n-steps 512 --n-epochs 2python run_analysis.pyresults/ppo_evaluation.csvresults/gae_bias.csvresults/fit_statistics.csvresults/model_residuals.csvpython run_analysis.py --sigmas 0.0 0.1 0.2 --eval-episodes 3 --gae-episodes 5run_analysis.py generates all plots automatically. You can regenerate figures
from existing result CSVs with:python make_plots.pyfigures/ as both PNG and PDF:fig_advantage_bias_vs_sigmafig_ppo_return_vs_sigmafig_advantage_bias_vs_returnfig_loglog_biasfig_residual_analysisfig_training_curvespython run_experiment.pyresults_table.csvregression_stats.txtcritical_threshold.txtfigures/. The updated make_plots.py is now dedicated to the PPO analysis
CSVs produced by run_analysis.py.1@article{patil2026quadratic,
2 title = {A Quadratic Bound on PPO Advantage Bias Under UAV Turbulence},
3 author = {Sahil, Nasiruddin},
4 journal = {International Journal of Engineering Research \& Technology (IJERT)},
5 volume = {15},
6 number = {05},
7 year = {2026}
8}