The bot really needs to learn how to jump. Being rooted to ground as it is, it becomes unable to solve tiny (yet hardcore somehow) maps such as Doom 2 Underhalls. Pictured here is the Doom 1 Perfect Hatred, the first map I ever saw where it’s impossible to progress without learning about the shift key.
Here’s what you see special in this picture compared to normal Doom: the bot map visualized. The dark grey lines are boundaries of bot subsectors, i.e. convex areas needed for pathfinding. What is more important here are the purple lines. All ledges are marked purple here. Everywhere the player needs to jump, there are purple lines to cross. The bot currently doesn’t have a way of determining useful jump areas. The purple lines are for now merely informative.
So how do I develop it? A first idea is to make the bot learn from coop players about jump areas, and permanently register them in a data file per level. Each time the player crosses a purple area, their movement is recorded. The bot will then ape the jumping movement on the detected positions. This just has the drawback of making the bot depend on player pioneers to find jump areas first. It’s possible to implement some self-learning too, where the bot records its own jumps, as a way of adjusting coordinates based on its experience.
Maybe this can be automated! Instead of depending on human players, generate virtual things which are subjected to most of Doom’s physics. They will run by each purple line, quasi-randomly, and detect if their speed combined with their gravity allows them to cross other ledges. This may involve complexity on deciding where to put these virtual jumpers, and accept a delay before the bot learns all chances, but is potentially better than just playing second fiddle to the humans.
Another way: just go purely analythical, based on mere formulae of player’s acceleration, floor friction and gravity. May get complicated if there are lots of factors in the physics, such as Boom wind (even if Boom is not yet supported properly…) or wallrunning, explosion jumping…
Anyway, this sounds like a nice opportunity to make the bot learn more stuff dynamically. It’s pretty important to be competent on IWADs, a good milestone.
One thought on “Teaching the bot to jump”
I don’t know if any progress has been made since this post, but I was wondering about the possibility of using some sort of math formula to calculate if the ledge is jumpable or not and depending on the result, the bot will try to jump it. It could take distance between linedefs and floor height of both sectors, plus if the sector the bot is jumping to is taller than 56 units and no linedefs are impassable, so it doesn’t try to jump to windows.
Of course this would not ensure that jumping somewhere will let the bot come back the same way (that’s true for the stair jumps at the beginning of E4M2) and could potentially trap it in a room permanently.