2 ms·
The question of statefulness reminds me of some not-immediately-intuitive observations from game development. Say you're working on potentially-visible-set com
by CamperBob2 8y ago
The question of statefulness reminds me of some not-immediately-intuitive observations from game development. Say you're working on potentially-visible-set computation for a first-person shooter. Where do you spend your optimization efforts? Do you put a lot of work into taking advantage of object coherence between frames, for instance? Chances are good that something that's visible in one frame will remain visible in the next, right? So if you start with that assumption you might think you could save some time by not bothering to test any surfaces on that object for visibility until some nominally-unrelated condition is met, such as the player turning rapidly in place.
You can waste a lot of time thinking about optimizations like that, but at some point it'll occur to you that it's a giant waste of time to optimize for anything but the worst case, where visibility information computed during one frame is completely unusable in the next frame for whatever reason. Otherwise all that your clever frame-coherence hacks can ever do is speed up the rendering of the sorts of frames that weren't going to dominate the player's perception of the game's performance anyway. An engine that renders 95% of frames at 60 FPS and 5% at 43 FPS is going to look pretty terrible, so you're usually better off putting work into the slowest frames rather than wasting time looking for hacks and shortcuts that make the fast frames even faster.
Likewise, yes, you can assume that the car will almost never be traveling backwards on the left side of the road or whatever, so the temptation to take advantage of that is going to be high. But the cases where that assumption breaks down will hurt the user's experience badly, possibly disastrously. So you're better off without relying too much on assumptions that contain phrases like "hardly ever" or "most of the time" or "typically."
- deleted 8y ago[deleted]
- Piskvorrr 8y agoThe problem is a nigh-unbounded problem space: so many variables that there are myriads of corner cases.
- CamperBob2 8y agoThe AI people would argue that simply following the prime directive ("Don't hit anything") covers a multitude of driving sins, and they're not wrong in a technical sense. But the prime directive doesn't cover all of them. Driving defensively involves much more than just not hitting stuff. My favorite example is a humorous image that went around several years ago, a photo that depicted someone driving in a Miata or similar convertible with the top down. The convertible was driving behind a sewage truck, the kind that has a large tank with a hose attachment to clean out septic tanks. The sewage truck, in turn, was heading straight for an overpass that obviously had nowhere near enough clearance. An alert human driver would have no problem anticipating what was about to happen, but the oblivious one in the Miata was clearly about to find out the hard way. Every time I find myself idly wondering if would be fun to work on self-driving cars, I flash back to that image. Then I get back to work on whatever I'm actually supposed to be doing.