Comment on How long do you think until AI writes and debugs code better than the average programmer?
ezchili@iusearchlinux.fyi 11 months ago
I’ve had 100% failure rate on simple requirements
“Make a pathfinding function for a 2d grid” - fine
“Make a pathfinding function for a 2d grid, but we can only move 15 cells at a time” - fails on lesser models, it keeps clinging to pulling you the same A* as the first one
“Make a pathfinding function for a 2d grid, but we can only move 15 cells at a time, also, some cells are on fire and must be avoided if possible, but if there is no other path possible then you’re allowed to use fire cells as fallback” - Never works
There for that last one, none of the models give a solution that fits the very simple requirement
themusicman@lemmy.world 11 months ago
Huh that’s a neat problem. My instinct was to use a (fire, regular) tuple for cost, but then what A* heuristic can you use…
I guess run it once with no cost for regular tiles and remove fire from any tiles it used. Then run with normal tile costs, but block fire tiles. That doesn’t break ties nicely of course and I’m not convinced the first pass has a good A* heuristic either…
ezchili@iusearchlinux.fyi 11 months ago
It works
I think the best option is to make sure to have ‘sorted’ the calls to the fire tiles, you can do that by having them in a separate grid or just stash them to a small local array on stack when you encounter them, and investigate those at the end of the loop
If there’s no result that’s been found under the cost limit without the fire at each point of the algorithm, you do do the recursive calls for the fire
Then once you’re back to the top level call, if there was a non-fire path you will get that result, if there wasn’t you will get that instead