for damage traps (weapon traps/spike traps etc) this means they still work, but enemies know they are there and will try to avoid the general area (5 on 5 area with the trap in the center gets +-100 pathing points added per tile (like in traffic designation) or something like it
Those extra pathing costs would only hurt FPS and not solve the AI issue.
It also does nothing against the deadliest trap I ever made:
1: pathing cost does not work like that, its not like pathing cost makes it step on X additional "unseen" tiles when it calculates it, it just makes a number go up faster, favoring other paths over the current one if they are shorter... and even if it did... since trapping and goblins are a small but very important part of the game, they should be able to have an AI that is able to make semi-smart decisions... gobbos running in a meatgrinder hoping it will jam from all the gobbo goo is the main problem of sieges atm
You don't actually know how A* works, do you?
By artificially increasing the pathing cost of a tile like this, if that path
is the only path, which is will be, because of how people play Dwarf Fortress,* the pathing algorithm's "number of tiles checked for lowest cost" skyrockets.
For every tile of "this is the only path" that has a path cost of 100 instead of 2, the algorithm
adds to memory and spends CPU on fifty** normal cost tiles.
*Come on, seriously, how many untrapped paths to you give the gobos to get into your fortress? How many of the trapped paths are more than 1 block wide? More than 3? 5?
**This is actually a lower-bound. The actual number is higher, as the path-cost has to be even, which means that
each and every other possible path is 50 tiles longer......in
every direction.