今日已更新 305 条资讯 | 累计 19865 条内容
关于我们

I Gave an AI Agent an Impossible Target to See If It Would Cheat

Anvay Singh 2026年07月14日 02:30 0 次阅读 来源:Dev.to

TL;DR A "loop" is not an agent grading its own work. It is an external script that re-runs the agent, plus a separate check the agent cannot edit. I turned "feels smooth" into an FPS number and let the loop optimize toward it. I set the target too high to be reachable on a 60Hz screen. The loop kept failing but never faked the result. The bug was in my number, not the code. Could I get an AI agent to make my website faster without me sitting there, running it, reading the numbers, and running it again? That is what this series is about. Not how I built a website, because the website is boring on purpose, but how you wrap an agent in a loop that works toward a goal on its own, and how you stop it from cheating along the way. In this first part I want to explain what a loop actually is, because there is a common misconception, and then walk through a real one. I set this loop a target that was physically impossible to reach and watched what it did. That run taught me more than a passing test would have. This is Part 1 of 3. All three parts use the same small movie-poster website as the example, but the website is never the point. What a loop is, and what it is not I had a wrong idea about this at first, so let me clear it up. A loop is not an agent prompting itself, grading its own work, and deciding when it is done. An agent left to mark its own homework will usually tell you it passed. A loop is closer to this: an external script runs the agent, a separate check that the agent cannot edit decides whether the result is good, and that repeats until the check passes or you hit a limit. There are three parts to it that come up again and again: The driver: the script that re-runs the agent. This is the thing that removes the manual work, not the agent. The gate: the check that decides pass or fail. The agent makes changes, but it never decides when to stop. The cap: a limit, so a stuck loop gives up instead of running forever. One rule matters more than the rest. The thi

本文内容来源于互联网,版权归原作者所有
查看原文