# Simple mobile - From data points to model?

Here is some background : I'm taking part in a programming challenge in which you control a racing pod that has to go from checkpoints to checkpoints to win a race. You are allowed to specify the thrust (in [0;100] ) of the pod and a target point.

I would like to know more about how the physic aspect of the pod is modeled inside the challenge.

So I did a first experiment : for the first 25 frames I set the thrust to 100, and the next 25 frames I set it to 0.

Here are the graphs :

I think one of the most interesting thing is the speed going negative shortly after stopping the thrust.

So from this data, with my limited knowledge of physics, I deduced that acceleration might be of the form acceleration = thrust - k.speed.

My question to you guys is, first do you recognize an obvious model to this ( considering the model simulating the pod physic shouldn't be very complex ) and secondly, can you suggest me a method to deduce the model from the data ?

If you think I should do another experiment with different conditions please let me know.

Thanks a lot.

PS : I can't post more than two links, I'll try and add acceleration graph and raw data file in a following reply.

• – Furrane May 26 '16 at 12:11
• I assume this is the "Coders strike back" challenge at Codingame? – Previous May 26 '16 at 15:04
• Absolutly, I just didn't want to look like I was advertising anything. – Furrane May 26 '16 at 17:08

Your guess is correct. If you solve $\dot{v}=T-kv$ you get $v(t)=\frac{T}{k}(1-e^{-kt/m})$ which indeed reproduces your velocity-time plot.
• @Furrane The friction is definitely linear in $v$. But on second thought, I agree that this probably isn't simply a numerical error. The physics changes when the thrust is removed. If you repeat your experiment but reduce the thrust to 10 (instead of 0) in the second period, what does the velocity-time plot look like? – lemon May 26 '16 at 13:03
• @Furrane Yes, there's certainly some thrust=0 case hard-coded. Curiously, the exponential decay in the v<0 (t>28) region is obeying the same $\dot{v}=T-kv$ law as before. So it looks like they're imposing some huge force only at the instant that you first release the thrust, and then it returns to the normal physics... – lemon May 26 '16 at 14:53