The settling time of AI-assisted research
There is a peculiar moment when one's own published paper, written more than a decade ago, arrives back on the desk in a new form. In my case it arrived as a question I posed to an AI coding agent: can you read this and rebuild it, end to end, from the math to the animation? I picked one of my own papers on purpose. If the agent made an error, I would notice. If it succeeded, I would have a reference implementation in Python as opposed to MATLAB of the original paper.
The preprint of the paper is available at "Finite time tracking of a fully actuated biped robot with pre-specified settling time: a second order sliding mode synthesis", which was ultimately published at ICRA 2014. The result we are aiming at is a 7-link planar biped that walks under a twisting second-order sliding-mode controller with an a priori-tuned settling time, with Lagrangian dynamics and impacts handled correctly. The deliverable I wanted from the agent was simple: a single standalone Python program that simulates and animates this gait.
This post is about finding the answer to the question:
How does a researcher use AI tools to reproduce physical-AI research the right way?
Motivation: testing where AI lands on real physical problems
There is a lot of breathless talk about "physical AI", namely, robots, simulations, control. There is also a lot of vibe-coding talk about agents that ship features. I wanted to know what happens at the intersection. Can a current-generation coding agent take a non-trivial control-theory paper, with all the algebraic complexity that physical systems carry, and produce something that actually works?
What I was not interested in was the agent producing a plausible-looking thing that breaks under inspection. The whole point of physical-AI research is that the physics has to be right; otherwise the demonstration is theatre. In some sense, we are going from the stochastic to the deterministic.
So I structured the experiment as a single conversation: hand over the paper URL, ask for a standalone Python program that animates the walking biped in the sagittal plane, and then see how many rounds of correction it takes to converge on something faithful. This is essentially a robust feedback control problem where the plant is given by a researcher and an AI coding agent in the loop with context given by a well reviewed research paper.
The journey, in three rounds
Round 1: kinematics dressed up as dynamics
The first version arrived quickly. The agent fetched the PDF, read it, identified the controller (twisting SOSM with boundary layer), the gain values from Section V, the step duration (0.53 s) and walking velocity (0.5 m/s), and produced a biped_walking.py. The animation rendered. The tracking error converged into the boundary layer. The biped walked. Back in 2012, I would have accepted it with a lot of gratitude if a prompt was all it took to achieve a quick animation!
But when I opened the python file, two things were wrong on inspection. The agent had only considered kinematics. There were no D(q), C(q,q̇), G(q) matrices anywhere and the code agent had drawn the feet as horizontal line segments rather than the triangular foot shape (heel, toe, ankle) that the reference figure shows. Worse, the torso angle was held at a constant 0.05 rad. The paper's Fig. 8 stick diagram clearly shows the torso pitching through the gait.
I sent the screenshot of Fig. 8 along with three short observations. The agent's reply opened with:
You're right on all three counts.
It then derived and added the full Lagrangian dynamics: mass_matrix(q) from the segment Jacobians, gravity_vec(q) as the gradient of potential energy, coriolis_vec(q, q̇) via Christoffel symbols of the first kind and computed the actual joint torque from the pre-feedback law Γ = D(q̈_d + u) + C + G. Sanity checks now passed at machine precision: D was symmetric, positive definite, and C(q, 0) = 0 exactly. The triangular feet were drawn correctly. The torso was now driven by a periodic reference θ_torso(s) = 0.05 + 0.10 sin(2πs).
This was much better. But it was still wrong, in a subtler way.
Round 2: the torso reference was a fiction
I knew from the paper that the cyclic walking gait was generated by an offline optimization of Haq, Aoustin, Chevallereau (ICRA 2012). I also knew, from reading that paper many times, that no separate torso reference exists in their procedure. The torso pitch is whatever the optimum trajectory says it should be, given the dynamics and constraints.
I asked the agent point blank how Haq et al. did it versus how it did it. The reply, when it came, was direct:
I cheated. I wrote
θ_torso(s) = 0.05 + 0.10·sin(2πs)to make the torso visibly move and match Fig. 8 visually, but that is not the IRCCyN procedure. In Haq et al. the corresponding curve would come out of the optimiser as a small, near-flat trajectory — not a hand-tuned sinusoid.
This was honest. It then offered two options: (1) a cheap fix (constant torso lean) or (2) a faithful reproduction (set up and solve the constrained NLP with Bézier-parameterised joints, the sthenic cost, and the cyclicity / no-take-off / no-slip / no-rotation constraints). I asked for the faithful one. The agent built trajectory_generation.py.
Round 3: making the optimisation actually run
The agent's first version of the optimisation called scipy.optimize.minimize with SLSQP, exactly as one would in MATLAB with fmincon. The sandbox where it was running could not install scipy in time, so the agent rewrote the solver from scratch as an augmented-Lagrangian outer loop wrapping a BFGS inner loop, with finite-difference gradients. Same recipe, hand-rolled.
Even then, it took three iterations of me spotting unit-scaling problems before the optimiser stopped escaping the constraint set. The decisive observation was the cost-versus-residual ratio: the sthenic cost is in units of N²·m².s (typically 10⁴), while the equality residuals were in radians (10⁻¹). A penalty parameter ρ that tightened one would not tighten the other. The fix was to scale the constraints into a comparable magnitude before applying the augmented-Lagrangian penalty. After that, in three outer iterations, the cost dropped from 17,000 to 3,400 which is about 80 % and the constraints satisfied to within 5°.
A short list of constructive uses
The pattern I have just described, namely, researcher posing the question, agent producing the artefact, researcher correcting it via application of first principles, agent acknowledging and iterating, is general. A few places where it pays off immediately:
- Reproducing one's own old papers as reference implementations to share with students or collaborators.
- Onboarding new graduate students by handing them the paper and this kind of agent-assisted reproduction as scaffolding, then asking them to extend it.
- Bridging research and practice. The reproduction here turned a 2014 paper into a runnable simulation in an afternoon. This is exactly the gap the time-constant-of-engineering-research talks about. An AI coding agent serves as a good tool to remember during the tools audit.
- Stress-testing AI tools on physical-AI research before trusting them downstream. Failures here are loud (the biped does not walk); failures in higher-level abstractions are quiet.
Concluding remarks
In control theory, settling time is the duration after which the trajectory error stays inside a small neighbourhood of zero. In this experiment with a coding agent, it took roughly three rounds of feedback before the implementation settled inside a small neighbourhood of the correct results. The agent's response time was minutes, and one can say the overall settling time of the whole activity was an afternoon.
This blog was a quick run for reproducing existing results where verification was easy. The problem of pursuing research using AI is of course a different topic and may give rise to a different settling time of AI-assisted outcomes. When it comes to pursuing a new research idea, a recent initiative comes to mind. Get Physics Done is a good tool for all researchers having some connections with Physics. It is an open-source agentic AI system for physics research that helps turn a research question into a structured workflow: scope the problem, plan the work, derive results, verify them, and package the output.
Going back to the biped, the complete repository, is available here. The final walking animation lives here.
The walking gait is not exactly the same as that reported in the original paper but it is in the plausible vicinity. Above all, it walked!
#physical-AI #control-theory #research #AI-tools #biped-robot