This is the code for our paper "On the Nonsmooth Geometry and Neural Approximation of the Optimal Value Function of Infinite-Horizon Pendulum Swing-up". The arxiv link is https://arxiv.org/pdf/2312.17467.pdf.
The github_contour_line_xx.m code is for calculating the nonsmooth line, and github_main_xx.m code is for calculating the value function. You can run github_main_xx.m directly, or first run github_contour_line_xx.m and then github_main_xx.m.