The Obsession with Paths
After browsing through the GameDev.net AI forum, I've come to one conclusion, when it comes to game AI, everyone (most) are obsessed with pathfinding. To tell you the truth, I don't think much about pathfinding in the first place, considering it is one of like the first few things you learn when you take any college level AI course. Ironically, pathfinding is not that much AI than just an algorithm or heuristic to solve a problem. Hell, its more like a solution to a graph theory problem, which means its more applied math than AI. And when you talk about pathfinding, you talk about A*, which ironically is pretty dang archaic. Its a shame no one has come up with anything better, but that's not really possible, since A* is pretty optimal on its own. Technically, A* has many other merits in game theory along with other things like alpha pruning and min-max, but why every single game developer and beginner game developeris obsessed with it is beyond my comprehension.
Well, technically, I do understand why everyone is so hung up on A*, just because its optimal and fairly easy to implement, not to mention being implemented to death. A* is capable of giving you the BEST path given enough information and processing time, but the question I ask is, is it worth it? I've even heard people saying that you can just do A* to look like n steps ahead, but then.....oh well, I'd say, what's the point. There are so many other ways of doing pathfinding out there now that its actually kind of funky to be stuck with A*.
In most cases, there is no need for an absolute optimal solution. Most people don't walk straight lines towards a target anyways. So, why haven't gaming people picked up on ant colonies or tabu search even to do pathfinding? I guess some worry about computational overhead and storage overhead, etc. If you really are worried about these, then you really don't care too much about good AI. Plus, how much more space would it require? Compared to some games that have megabytes and megabytes of texture, implementing these algorithms will obly take up a few more kilobytes max of extra memory storage. Computational complexity is not an issue either. So you spare some time and crunch about 5% - 10% fewer polygons, but that's where optimization comes in on the graphics end. So you lose like 10 - 20fps in a game that runs at 120fps and where most ordinary people set their refresh rate to no more than 75Hz. Sometimes, some things just don't make too much sense for me.
"But its running at 100fps instead of 120fps, that's horrible!!!"
"Dude, the average person perceives only around 60fps and if you start seeing scanlines with your monitor set at 100Hz, you need to go outside and do something else instead of sitting in front of a monitor for 10 hours a day like me. And even I don't see scanlines at 60Hz."
But seriously though, how can we implement path finding in games with something other than A*? How do we work with Ant Colony Optimization? How do we incorporate Tabu search? What about Simulated Annealling? And where the hell am I getting these names?
More answers next time, after I finish some more coding and start procrastinating again. But don't worry, its not as bad as you think.
