|
|
|
|
|
by danbruc
992 days ago
|
|
Why is that cheating? But it is still very slow, I got it down to 0.42 seconds. function controlFunction(block)
{
const t = Math.round(block.T / 0.02);
return (t <= 10) ? +50
: (t <= 18) ? -50
: (t == 19) ? -22.4538198550841
: (t == 20) ? -27.5461801449159
: 0;
}
Misses the target by 6.1E-16 at an velocity of 6.3E-15. But yes, this should probably randomize the initial conditions or parameters like friction and gravity a bit so that you actually have to control the system. |
|