bandrami
My control systems prof said every engineer has done an inverted pendulum problem in school and nobody in their career has ever been asked to balance an inverted pendulum. So our final was a thermostat instead.
RhysU
Possibly useful: A header-only proportional-integral-derivative (PID) controller.

https://github.com/RhysU/helm

nebster
The "Ball on Platform: Edge Balance" one seems super interesting to me.

Is the sample solution just hardcoded or is there some maths behind it to make it work from any location/initial speed?

function_seven
I'm still on the first level playing with various 'P's and 'D's (no 'I's yet), but I think I have a novel scheme!

    function controlFunction(block)
    {
      let L = Math.floor;
      let x = block.x;

      // Use Collatz. L(x+½) is the closest integer. 
      return 
        -(L(x+0.5) % 2 === 0
                        ? x/2     // Even, we chop it
                        : 3*x + 1 // Odd, we triple-plus-one it. 
         );
    }
It's not very good, but it does beat or tie some of my earnest attempts to get below 8 seconds.
01100011
Some sort of 'high score' would be nice so I can understand how close my solution is to the ideal.

Pretty neat website overall. Seems like I'll be wasting some time on it.

fisherjeff
Ugh, nerd sniped on a Sunday. Great.
jstanley
This is brilliant, what a good idea.

On the "Cruise Control Intro" challenge it's not made clear what the output of the controlFunction is. Am I returning a throttle position? A delta to the throttle position? Something else?

I didn't have any trouble until I got to "Ball on Platform: Balance" which seems to be multiple steps more difficult than the previous ones.

lqr
If the author is here: I would really enjoy leaderboards!
SkyMarshal
Related: Sabine Hossenfelder made a video back in December on use of AI/ML in Chaos Control which is pretty interesting. TLDR: scientists have known it’s possible to control or steer chaotic systems since the 1990s at least, but AI/ML have recently given them new tools for doing so. One interesting use case example is using ML to control in real-time the plasma in a tokomak reactor. More:

https://backreaction.blogspot.com/2022/12/how-chaos-control-...

forgotusername6
After a course on balancing PID controllers in university, our professor said that something like 90% of PIDs would be on out of the box factory settings..
dominicdoty
This is very cool, I like the increasing complexity levels.

I actually made a similar thing based on writing your own autopilot for a Lunar Lander [1]. It's hard to make the difficulty increase linearly though. I like the use of different scenarios in this one.

[1] https://lunar.unnecessarymodification.com/

pbazarnik
Can't get better than 0.88sec?

  function controlFunction(block)
  {
  const max_force=1000000000;
  const margin=0.01;
  const friction_comp=0.2;

  if(block.x<-1-(margin/2))
   return max_force*(1+friction_comp);
  else if(block.x<-1.15*margin)
   return -max_force;
  else
   return -block.x;
}
kavouras
Shouldn't this have some thrust limits? I'm not sure if they are added later(I've only seen the first example), but it would make the problems more realistic, interesting and related to control theory.
nullc
What's people's record on the first puzzle? My current is 0.42 seconds. (I haven't bothered even loading any of the other puzzles yet)
benreesman
An “obvious in hindsight” (I missed it) application of control theory in general and PID controllers in particular is exploring more of a corpus when the fleet is less loaded in an IR setting.

@ajtulloch might be the world’s leading expert in making 100 billion bucks in 2 months with a device that can be built out of mechanical parts.

c7DJTLrn
Terry Davis did a nice introduction to PID controllers in his own physics engine SimStructure: https://www.youtube.com/watch?v=25hLohVZdME
ivolimmen
I cheated on level one and entered:

function controlFunction(block) { let x = 5; if (block.dx > 0) { x = block.dx; } if (block.T > 1.75) { return 0; } return 2 * x; }

Aeolun
Yay, a new elevator saga!
bagels
I put in large constant forces, but the acceleration doesn't seem to depend on the force (on the inclined car level)
i_am_a_peasant
Wish using C was an option, I don't know enough about javascript to start approaching these problems :/
goku12
This is really nice! Does anybody know if the source is available? Or something similar with source?
Asymo
Tutorial #3 0.72s

function controlFunction(block) { return -500 * block.x -60 * block.dx; }

bagels
I put in large constant forces, but the acceleration doesn't seem to depend on the force.
whatever1
This is great!
edge17
very cool!
juangburgos
[dead]
pidtuner
[dead]
sr.ht