5. Artificial… Intelligence? Not much to talk about here really. The bots use the level quite well in my opinion and make quite formidable opponents, though I didn't exactly make them do anything that special. I just made sure that they could translocate or jump to almost everywhere that a human player can, and made sure their attack routes were varied using AssaultPaths. If you've not checked it out before, check out Blitz's excellent tutorial on bot-pathing: http://blitz.unrealplayground.com/tutorials/bots.html Unfortunately, I did run into one major bot problem even still. If you're interested in this kinda stuff, read on, otherwise you may aswell skip the rest of this page as it may bore you :) If you grabbed the enemy flag, then went back to your base and went to any of the upper levels, the enemy bots would come into the flag room but would not come up to get you, running back and forth on the spot instead (whether our flag was there or not). This could often end up with me up on my grate in the flagroom, looking down on 4-5 enemy bots running back and forth on the spot! (See the red arrows in the pic below) Of course this looked very silly, and I needed to find out why they were doing this. Basic tests using showdebug didn't help me much, so I consulted the help of our AI coder at work, who already had his PC set up for debugging unreal engine code. We discovered that it was only bots on Adept skill level or above that were showing this behaviour... the "dumber" bots would come up and get you no problem. After a couple of sessions stepping through the AI code, the problem appeared to be the following: The more skilled bots would get to the flag area, then head off on their way up to where the flag carrier was. Very quickly after that they would do some kind of re-evaluation and realize that the player could get back to the flagbase before they got up there, so they would change their mind and head back to the flagbase again. From there on the loop continued, back and forth, back and forth. So I did some tests - things like making sure there was only one way up to the flag carrier, making sure the flag carrier wasn't visible, giving the bots a direct "ramp" up to the area... we noticed that in a couple of places, the bots would get up to your location fine. "showdebug" told us that this seemed to be when your RouteCache (your route back to the flagbase) followed their exact RouteCache (their route to you - the flag carrier). So I tried removing all downward paths from the upper levels except one, and voila! it worked! The bots no longer had any problems coming up to get me, because I guess they thought it was safe to go up now (now that they thought my route down would follow their path anyway). So yea... problem solved! (or rather, worked around to a satisfactory level). I was very surprised that I'd never read about anyone encountering that problem before... maybe it's something Epic can look into for a patch...
1. Introduction
|