Teaching the bot to jump

etrn20-1

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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s