buck-converter: the draft controller against the accepted one
Scenario s1: 12 V in, 4 ohm load halving to 2 ohm at 10 ms. Target 5 V. Both runs come from the built plimsoll/sandbox-sim image through the project API; the fingerprints below are the SHA-256 of each trajectory as recorded from that image.
The simulator is written in C, compiled to WebAssembly and shipped in that image: its source, EXTERNAL · source repo ↗. A controller is a separate program that reads the simulator's observations each tick and sets its input. This page runs two hand-written controllers against it: a draft that makes a plausible mistake and fails, and an accepted one that passes the environment's scoring program. Published: the accepted controller, EXTERNAL · source repo ↗; its C port (the same trajectory to the bit), EXTERNAL · source repo ↗; and all four scenarios with their fingerprints, EXTERNAL · source repo ↗. The draft controller and the scoring program are not published. Every simulator in the image, EXTERNAL · source repo ↗.
Work in progress. These charts show two hand-written reference controllers. No AI-generated controller is plotted for this environment yet.
Table view (100 rows)
| milliseconds | draft output_voltage_V | draft inductor_current_A | draft action | accepted output_voltage_V | accepted inductor_current_A | accepted action |
|---|---|---|---|---|---|---|
| 0 | 0.0000 | 0.0000 | 1.0000 | 0.0000 | 0.0000 | 0.0000 |
| 0.2 | 9.9210 | 1.4026 | 0.0000 | 0.1890 | 0.2181 | 0.0202 |
| 0.4 | 1.7299 | 2.4837 | 1.0000 | 0.5314 | 0.3109 | 0.0495 |
| 0.6 | 7.9802 | -1.3221 | 0.0000 | 0.8924 | 0.4010 | 0.0785 |
| 0.8 | 4.3611 | 6.6769 | 1.0000 | 1.2428 | 0.4830 | 0.1076 |
| 1 | 4.5368 | -4.6600 | 1.0000 | 1.5831 | 0.5640 | 0.1360 |
| 1.2 | 7.5445 | 3.3777 | 0.0000 | 1.9180 | 0.6461 | 0.1639 |
| 1.4 | 3.2392 | 2.9440 | 1.0000 | 2.2510 | 0.7290 | 0.1917 |
| 1.6 | 5.6705 | -3.1687 | 0.0000 | 2.5838 | 0.8122 | 0.2194 |
| 1.8 | 7.0808 | 3.7298 | 0.0000 | 2.9168 | 0.8956 | 0.2472 |
| 2 | 3.4651 | 2.9780 | 1.0000 | 3.2500 | 0.9790 | 0.2749 |
| 2.2 | 5.2598 | -3.4020 | 0.0000 | 3.5833 | 1.0624 | 0.3027 |
| 2.4 | 7.1669 | 2.7016 | 0.0000 | 3.9166 | 1.1457 | 0.3305 |
| 2.6 | 3.9750 | 4.3375 | 1.0000 | 4.2500 | 1.2290 | 0.3583 |
| 2.8 | 4.3226 | -3.1502 | 1.0000 | 4.5833 | 1.3124 | 0.3860 |
| 3 | 7.1535 | 1.1361 | 0.0000 | 4.9167 | 1.3957 | 0.4138 |
| 3.2 | 4.9565 | 6.0722 | 0.5870 | 5.0610 | 1.2609 | 0.4214 |
| 3.4 | 3.5691 | -1.0917 | 1.0000 | 5.0519 | 1.2512 | 0.4199 |
| 3.6 | 6.7312 | -0.6927 | 0.0000 | 5.0243 | 1.2447 | 0.4187 |
| 3.8 | 6.1711 | 5.2608 | 0.0000 | 5.0072 | 1.2460 | 0.4174 |
| 4 | 3.3628 | 1.2842 | 1.0000 | 5.0002 | 1.2483 | 0.4167 |
| 4.2 | 5.8672 | -2.4071 | 0.0000 | 4.9987 | 1.2496 | 0.4166 |
| 4.4 | 6.9370 | 3.4181 | 0.0000 | 4.9990 | 1.2500 | 0.4166 |
| 4.6 | 3.7665 | 3.6290 | 1.0000 | 4.9996 | 1.2501 | 0.4166 |
| 4.8 | 4.6367 | -3.5597 | 1.0000 | 4.9999 | 1.2501 | 0.4167 |
| 5 | 7.1337 | 1.4655 | 0.0000 | 5.0000 | 1.2500 | 0.4167 |
| 5.2 | 4.7779 | 5.7760 | 0.9442 | 5.0000 | 1.2500 | 0.4167 |
| 5.4 | 3.6431 | -1.2773 | 1.0000 | 5.0000 | 1.2500 | 0.4167 |
| 5.6 | 6.7424 | -0.5791 | 0.0000 | 5.0000 | 1.2500 | 0.4167 |
| 5.8 | 6.1417 | 5.2523 | 0.0000 | 5.0000 | 1.2500 | 0.4167 |
| 6 | 3.3833 | 1.3287 | 1.0000 | 5.0000 | 1.2500 | 0.4167 |
| 6.2 | 5.7766 | -2.5182 | 0.0000 | 5.0000 | 1.2500 | 0.4167 |
| 6.4 | 6.9573 | 3.2214 | 0.0000 | 5.0000 | 1.2500 | 0.4167 |
| 6.6 | 3.9021 | 3.9154 | 1.0000 | 5.0000 | 1.2500 | 0.4167 |
| 6.8 | 4.4140 | -3.1879 | 1.0000 | 5.0000 | 1.2500 | 0.4167 |
| 7 | 7.0916 | 1.0813 | 0.0000 | 5.0000 | 1.2500 | 0.4167 |
| 7.2 | 5.0830 | 6.1958 | 0.3341 | 5.0000 | 1.2500 | 0.4167 |
| 7.4 | 3.5101 | -0.7784 | 1.0000 | 5.0000 | 1.2500 | 0.4167 |
| 7.6 | 6.6026 | -0.9733 | 0.0000 | 5.0000 | 1.2500 | 0.4167 |
| 7.8 | 6.3593 | 4.8901 | 0.0000 | 5.0000 | 1.2500 | 0.4167 |
| 8 | 3.3947 | 1.7815 | 1.0000 | 5.0000 | 1.2500 | 0.4167 |
| 8.2 | 5.5816 | -2.8047 | 0.0000 | 5.0000 | 1.2500 | 0.4167 |
| 8.4 | 7.0299 | 2.8726 | 0.0000 | 5.0000 | 1.2500 | 0.4167 |
| 8.6 | 4.0251 | 4.2874 | 1.0000 | 5.0000 | 1.2500 | 0.4167 |
| 8.8 | 4.2360 | -2.8187 | 1.0000 | 5.0000 | 1.2500 | 0.4167 |
| 9 | 7.0497 | 0.7382 | 0.0000 | 5.0000 | 1.2500 | 0.4167 |
| 9.2 | 5.2970 | 6.3581 | 0.0000 | 5.0000 | 1.2500 | 0.4167 |
| 9.4 | 3.4555 | -0.3501 | 1.0000 | 5.0000 | 1.2500 | 0.4167 |
| 9.6 | 6.4582 | -1.3097 | 0.0000 | 5.0000 | 1.2500 | 0.4167 |
| 9.8 | 6.5117 | 4.5763 | 0.0000 | 5.0000 | 1.2500 | 0.4167 |
| 10 | 3.3941 | 2.2338 | 1.0000 | 4.8898 | 1.2544 | 0.4378 |
| 10.2 | 5.3120 | -1.0578 | 0.0000 | 4.5363 | 2.4133 | 0.3648 |
| 10.4 | 6.3270 | 2.0475 | 0.0000 | 4.6884 | 2.4523 | 0.3967 |
| 10.6 | 6.1283 | 4.0554 | 0.0000 | 4.8626 | 2.4908 | 0.4065 |
| 10.8 | 5.6884 | 5.2384 | 0.0000 | 4.9512 | 2.5046 | 0.4127 |
| 11 | 5.1928 | 5.8158 | 0.1143 | 4.9880 | 2.5043 | 0.4156 |
| 11.2 | 4.8548 | 5.2997 | 0.7904 | 4.9997 | 2.5024 | 0.4166 |
| 11.4 | 4.6056 | 4.5639 | 1.0000 | 5.0019 | 2.5010 | 0.4168 |
| 11.6 | 4.4360 | 3.8767 | 1.0000 | 5.0014 | 2.5003 | 0.4168 |
| 11.8 | 4.3515 | 3.3187 | 1.0000 | 5.0007 | 2.5001 | 0.4167 |
| 12 | 4.2614 | 2.7541 | 1.0000 | 5.0003 | 2.5000 | 0.4167 |
| 12.2 | 4.2164 | 1.8154 | 1.0000 | 5.0001 | 2.5000 | 0.4167 |
| 12.4 | 4.3306 | 1.0290 | 1.0000 | 5.0000 | 2.5000 | 0.4167 |
| 12.6 | 4.4531 | 0.3494 | 1.0000 | 5.0000 | 2.5000 | 0.4167 |
| 12.8 | 4.7050 | -0.4531 | 1.0000 | 5.0000 | 2.5000 | 0.4167 |
| 13 | 5.0058 | -0.5375 | 0.4885 | 5.0000 | 2.5000 | 0.4167 |
| 13.2 | 5.2766 | -0.0426 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 13.4 | 5.5312 | 0.5039 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 13.6 | 5.7292 | 1.0746 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 13.8 | 5.8798 | 1.6484 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 14 | 5.9815 | 2.2463 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 14.2 | 6.0225 | 2.8475 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 14.4 | 6.0064 | 3.4473 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 14.6 | 5.9272 | 4.0458 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 14.8 | 5.7825 | 4.6306 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 15 | 5.5722 | 5.1975 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 15.2 | 5.2933 | 5.7404 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 15.4 | 4.9823 | 5.6100 | 0.5354 | 5.0000 | 2.5000 | 0.4167 |
| 15.6 | 4.7018 | 4.8927 | 1.0000 | 5.0000 | 2.5000 | 0.4167 |
| 15.8 | 4.4819 | 4.1501 | 1.0000 | 5.0000 | 2.5000 | 0.4167 |
| 16 | 4.3283 | 3.3892 | 1.0000 | 5.0000 | 2.5000 | 0.4167 |
| 16.2 | 4.2456 | 2.6170 | 1.0000 | 5.0000 | 2.5000 | 0.4167 |
| 16.4 | 4.2383 | 1.8404 | 1.0000 | 5.0000 | 2.5000 | 0.4167 |
| 16.6 | 4.3104 | 1.0676 | 1.0000 | 5.0000 | 2.5000 | 0.4167 |
| 16.8 | 4.4651 | 0.3065 | 1.0000 | 5.0000 | 2.5000 | 0.4167 |
| 17 | 4.7049 | -0.4346 | 1.0000 | 5.0000 | 2.5000 | 0.4167 |
| 17.2 | 4.9983 | -0.5523 | 0.5034 | 5.0000 | 2.5000 | 0.4167 |
| 17.4 | 5.2833 | -0.0365 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 17.6 | 5.5284 | 0.5057 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 17.8 | 5.7291 | 1.0700 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 18 | 5.8811 | 1.6517 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 18.2 | 5.9803 | 2.2457 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 18.4 | 6.0232 | 2.8465 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 18.6 | 6.0063 | 3.4484 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 18.8 | 5.9270 | 4.0452 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 19 | 5.7828 | 4.6305 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 19.2 | 5.5720 | 5.1978 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 19.4 | 5.2934 | 5.7402 | 0.0000 | 5.0000 | 2.5000 | 0.4167 |
| 19.6 | 4.9824 | 5.6102 | 0.5352 | 5.0000 | 2.5000 | 0.4167 |
| 19.8 | 4.7018 | 4.8925 | 1.0000 | 5.0000 | 2.5000 | 0.4167 |
Fingerprints, scenario s1 (12, 4, 0.01)
draft: 47088af604d881f25629d234b5de86f7e36b154bb4a1c08df70022d5923706c3
accepted: 9bcc0a3a963d11853ba0bd1a7bc3850a00d55115b6a2ee3de2cdd51ad69006f7