AutoDoom available to download

UPDATED LINK TO HOMEPAGE: AutoDoom.net

 

I've decided to make AutoDoom builds available for download. In case you don't know, it's a bot for Doom.

Currently it only works in vanilla Doom levels that contain fairly simple geometry, like most of Doom.wad.

Just launch it like you'd do any Doom port and start a new game. You can even make it record vanilla-compatible demos using the "-vanilla" command-line parameter.

Download:
2016-03-22 Windows


HOW TO USE: the executable is called "eternity.exe", but it's really AutoDoom. Download and extract the contents of the ZIP into a separate folder and start with "eternity -iwad path\to\doom2.wad" for example.

Source code: https://github.com/ioan-chera/AutoDoom

Edited by printz
2 people like this

Share this post


Link to post

Yay finally!

Now to combine it with OBLIGE and set up a 24/7 stream!

Share this post


Link to post
Linguica said:

Yay finally!

Now to combine it with OBLIGE and set up a 24/7 stream!

This is a rad idea, actually.

Does this support Dehacked patches? I doubt so, but if it does, tagging on random ones would be icing on the cake.

Share this post


Link to post
Linguica said:

Yay finally!

Now to combine it with OBLIGE and set up a 24/7 stream!


I have more ideas:

*Extensive configuration settings, which include the following:
**Option to choose which levels and wads you want to include in a run.
**Option to turn on and off visual indicators (what direction player is being shot
at, monster making noises behind you. You might want to add the zdoom text
obituaries as well.
**Completely free mode: Only resources from Freedoom, other free content levels,
and OBLIGE levels will be able to run. This option would also be available as a
option for compiling, in which case loading of other wads is disabled.
**Censorship features (all graphics, non satanic graphics [think Quake Live], non
hell graphics; normal gore, reduced and/or recolored gore [think the GBA ports
of Doom, as well the idea of stuff like corpses on pikes removed],
no gore [think Chex Quest], no monsters), as well as password protection for
said features. I know this is a strange request, but since I was hoping that
this could be used as a screensaver in the vein of the old Windows 3d maze,
which a lot of children stared at for who knows how long...
**If a known map uses imagery which is restricted by those features, such levels
would be disabled from playback.
**OBLIGE random generation settings that would honor the censorship flags (for
example, if no monsters is enabled, all that would be generated are mazes.
**the ability to be run as a screensaver

I would love for an open source replacement of the 3d Maze screensaver with lots of options...

Share this post


Link to post

It's a normal source port. Make your own iwad and add pwads like normal.

Share this post


Link to post
Linguica said:

Yay finally!

Now to combine it with OBLIGE and set up a 24/7 stream!


you better have tarnsman and vanillazi crew offering commentary ;)

Share this post


Link to post

Any confirmation on what iwad maps it can and cant complete?

Share this post


Link to post

It's actually very bare bones now (this is why I didn't even bother setting a version number), so it may lose many levels due to any kinds of reasons. Most prominently they are:

- circle strafing into an acid pit (during combat only)
- bad combat skills
- running into an exploding barrel
- unawareness of jumping areas (not there yet)

If it wins, it probably means the level is too easy :)

I plan to improve this and upload better versions as I progress. As I do, I will update this thread. But what if this thread dies and the only one who posts updates is I? Will I be accused of bumping it, or is it accepted on this forum?

Anyway, feel free to try any easy skill level Doom 1 maps that don't involve jumping.

Maps with problems:
E1M3: circle-strafing into acid pits
E2M6: the exit switch is too deep and is not found because of this.
E3M4: I suspect it falls into the smashers to pick up invulnerability? Worst irony.
E3M6: needs to jump to get to the blue key
E4M2: jumping required
E4M9: jumping required
E4M6: jumping required

Share this post


Link to post

Can you maybe give a quick overview of the algorithms underlying it? I noticed it outputting JSON files (uh, OK?) and also that on one big map I tried it mostly worked fine but about 30 minutes in suddenly it slowed down to like 1 FPS, which I dunno if it was caused by a memory leak or what.

Also, I wish it would make player input totally cancel / override bot input, in case you're watching it go and want to help it along with something it's stuck at. Like in one map it got into an endless loop trying to pick up a backpack and running over a teleporter instead, and I had to, like, fight with the bot to try and make it avoid the damn thing.

Share this post


Link to post
Danfun64 said:

**Censorship features (all graphics, non satanic graphics [think Quake Live], non
hell graphics; normal gore, reduced and/or recolored gore [think the GBA ports
of Doom, as well the idea of stuff like corpses on pikes removed],
no gore [think Chex Quest], no monsters), as well as password protection for
said features. I know this is a strange request, but since I was hoping that
this could be used as a screensaver in the vein of the old Windows 3d maze,
which a lot of children stared at for who knows how long...


You're worried about pixelated blood and gore in this day and age? Come on..

Share this post


Link to post
Linguica said:

Can you maybe give a quick overview of the algorithms underlying it? I noticed it outputting JSON files (uh, OK?) and also that on one big map I tried it mostly worked fine but about 30 minutes in suddenly it slowed down to like 1 FPS, which I dunno if it was caused by a memory leak or what.

Also, I wish it would make player input totally cancel / override bot input, in case you're watching it go and want to help it along with something it's stuck at. Like in one map it got into an endless loop trying to pick up a backpack and running over a teleporter instead, and I had to, like, fight with the bot to try and make it avoid the damn thing.

On level setup (map init):

1. It generates a map in memory based on the wad map, with walls dilated to the player radius. Any areas thinner than 32 units get merged into contiguous walls. Currently solid static things are also dilated and baked into the map. A solid thing is considered static if none of its frames ever move it or make it passable. I tried to be comprehensive with this.
2. It runs GLBSP (by Andrew Apted) over this map to generate nodes (for easy lookup) and fully closed subsectors (to have convex leaves)

I plan to implement dynasegs and dynaBSP for ALL moving things (or at least barrels), and also save static geometry maps in separate WAD files, just like how the OpenGL ports do.

Type am_drawnodelines 1 in the console to see the bot map.

On first run, it can take awhile, but it's then cached in a file that's then gzipped.

Now that we have subsectors in a map where the player thing can be represented as a simple dot (because all obstacles have already been dilated by its radius), we can easily scan it like a graph.

On gameplay:
* the bot does Dijkstra graph search on the map, subsector by subsector. For each subsector, it checks if there are items to pick or switches worth pressing. If so, it makes a path.
* if the path gets obstructed or the bot is off its path, or the path goal is reached (item picked or linedef triggered), it starts a new search.

Some data is also saved:
* monster damage/kill (threat) ratio, so it will know which monsters are more dangerous.
* item effects table (the JSON you saw). In theory it should know how much an item gives and what is the maximum, so it won't try to pick up medikits it doesn't need.

Share this post


Link to post

Nice to see this released.

Glaice said:

You're worried about pixelated blood and gore in this day and age? Come on..

Censorship is appropriate if it's considered for use as a screensaver. Consider it being used in a workplace for example. Satanic imagery or even just gore may be considered inappropriate.

Share this post


Link to post

The executable doesn't work on my 32-bit Windows 7. First it terminated with a message that "msvcp140.dll is missing". I downloaded the .dll from dll-files.com, placed it into AutoDoom's folder, and run the executable again. The executable terminated saying that "vcruntime140.dll is missing", and I repeated the download-place-retry procedure, and then for the third time after it said "api-ms-win-crt-runtime-l1-1-0.dll is missing". Since the fourth time, it keeps saying that "entry point of ucrtbase.abort couldn't be found in api-ms-win-crt-runtime-l1-1-0.dll". I even tried one different version of the .dll, no improvement.

Share this post


Link to post
scifista42 said:

The executable doesn't work on my 32-bit Windows 7. First it terminated with a message that "msvcp140.dll is missing". I downloaded the .dll from dll-files.com, placed it into AutoDoom's folder, and run the executable again. The executable terminated saying that "vcruntime140.dll is missing", and I repeated the download-place-retry procedure, and then for the third time after it said "api-ms-win-crt-runtime-l1-1-0.dll is missing". Since the fourth time, it keeps saying that "entry point of ucrtbase.abort couldn't be found in api-ms-win-crt-runtime-l1-1-0.dll". I even tried one different version of the .dll, no improvement.

I have Visual Studio Community 2015 installed and it launches for me, maybe you need the latest VC++ redistributable?

https://www.microsoft.com/en-us/download/details.aspx?id=48145

Share this post


Link to post
printz said:

the bot does Dijkstra graph search on the map, subsector by subsector.

So it moves between, like, subsector centroids? Do you do any path smoothing or anything? Also, how do you dilate 2-sided walls?

Also, what's the sort of logic for the bot's decision making? Does it just look for something in the immediate vicinity to do? If it can't see anything interesting, how does it decide where to move?

Share this post


Link to post

This qualifies as a mod? I thought it's a source port.

It actually uses adjoining segs as path nodes, but checks the subsectors for any objects of interest. So when it has to move, it picks the nearest point on the next seg, making the path quite straight.

Two-sided linedefs and corners are dilated using so-called "metasectors" (unrelated to Quasar's metaobjects). They are like Doom sectors, but hold references to multiple classic sectors. A metasector's floor is equivalent to its highest sector floor, and ceiling equivalent to its lowest sector ceiling. This lets the bot move correctly on ledges.

It chooses goals when it finds the first thing worth doing. There are a few priorities to consider, from the most important to the least:

1. Objects that are not in pits
2. Secret exits
3. Normal exits
4. Objects in pits

Exits are less priority than most objects because the bot wants to explore as much as possible. This is the same reason secret exits are preferred. Objects in pits have less priority than exits just to prevent the bot from falling to baits in acid pits. This was an issue in E1M3 where it fell for that secret door opener just at the start.

If there's nothing to do, it will just start trembling randomly. Doing this is actually necessary, because sometimes the bot can be stuck in a corner just outside the playable area, due to round-off errors. EDIT: if you saw the game getting real slow, it might have been because the bot got stuck at that point, trying each tic to find a goal in nearly the entire level.

Share this post


Link to post

Made a sample video showing off a level it worked pretty well on:

Share this post


Link to post
printz said:

On level setup (map init):

1. It generates a map in memory based on the wad map, with walls dilated to the player radius. Any areas thinner than 32 units get merged into contiguous walls. Currently solid static things are also dilated and baked into the map. A solid thing is considered static if none of its frames ever move it or make it passable. I tried to be comprehensive with this.
2. It runs GLBSP (by Andrew Apted) over this map to generate nodes (for easy lookup) and fully closed subsectors (to have convex leaves)

I plan to implement dynasegs and dynaBSP for ALL moving things (or at least barrels), and also save static geometry maps in separate WAD files, just like how the OpenGL ports do.

Type am_drawnodelines 1 in the console to see the bot map.

On first run, it can take awhile, but it's then cached in a file that's then gzipped.

Now that we have subsectors in a map where the player thing can be represented as a simple dot (because all obstacles have already been dilated by its radius), we can easily scan it like a graph.

On gameplay:
* the bot does Dijkstra graph search on the map, subsector by subsector. For each subsector, it checks if there are items to pick or switches worth pressing. If so, it makes a path.
* if the path gets obstructed or the bot is off its path, or the path goal is reached (item picked or linedef triggered), it starts a new search.

Some data is also saved:
* monster damage/kill (threat) ratio, so it will know which monsters are more dangerous.
* item effects table (the JSON you saw). In theory it should know how much an item gives and what is the maximum, so it won't try to pick up medikits it doesn't need.

Sounds like a very solid foundation and approach. (I wish I had done it first!)

Not sure what non-movement AI you've got in place. I've always wanted to make AI that could effectively 'score' the situation - threats vs. rewards, staying alive as a priority, saving bullets for small guys, cells for big monsters, etc. Weighing all the currently-visible and previously-visible options, and choosing the best course of action. It's interesting: Solid pathfinding, combined with a simple evaluation/scoring cycle, goes a long way towards believability.

Empirical programming can be useful here. Basically, you set up contrived scenarios in an otherwise isolated place in a map. Then, see what your bot does. Adjust a bit, rinse, repeat.

Another very cool setup is to have a network setup, with one box running version A of your bot, and the other running version B, and try to get version B to be able to always beat version A. Letting Doom play Doom! Awesome!

I haven't checked it out yet, but this is exciting. Best of luck getting it to work as good as you expect. Bravo!

Share this post


Link to post
kb1 said:

Sounds like a very solid foundation and approach. (I wish I had done it first!)

Quake 3 Arena bots also have game world dilation (called area awareness system and in 3D), though my idea to do it in Doom came independently (it made sense, considering that sector-based bars are just as walls as other walls). What I got inspired from Q3A was to use BSP to obtain the convex final shapes.

Share this post


Link to post
printz said:

Is this a Win7 executable? It doesn't seem to work on Windows XP. If so, is it possible for someone to compile it for XP (or at least provide instructions on how to do so?)

Share this post


Link to post

It gets stuck in TNT MAP01 trying to berserk-punch the monsters above the wall. But it kicked some butt for a while in TNT MAP09 (in UV) until dying.

In the video Linguica posted it does pretty good but why doesn't it dodge single projectiles effectively. Isn't that kinda simple if it has room to strafe and if it's just one projectile?

But yeah, is there a way to disable the bot, take control and then reenable it?

Share this post


Link to post
vadrig4r said:

maybe you need the latest VC++ redistributable?

https://www.microsoft.com/en-us/download/details.aspx?id=48145

The installer refused to finish installation because I'm on an unsupported version of Windows 7 (without SP1), but I managed to find and download the dlls individually, put them into AutoDoom's folder and got it working.

The bot is cool, but there's obvious room for improvement. For one thing, he seems to ignore damaging floors, so that maps with lots of them make him die early and embarrassingly. For another thing, once he sees monsters, he prefers to keep firing at the monsters with his current weapon (say, pistol) until they all die, even though there is a much stronger weapon (say, shotgun) right in front of him that he would step forward to pick up. Also, the bot really sucks at fighting (even single) Revenants.

Share this post


Link to post

Judging from Ling's video, the bot:
- intentionally steps in damaging floors so as to be able to pick up medikits
- doesn't know how to use the berserk fist
- switch weapons for no good reasons

Share this post


Link to post
scifista42 said:

For one thing, he seems to ignore damaging floors, so that maps with lots of them make him die early and embarrassingly.

This is untrue. He steps into nukage for dubious reasons, but he very intentionally avoids nukage by walking on the surrounding tiny platforms better than a regular player would be able to.

For another thing, once he sees monsters, he prefers to keep firing at the monsters with his current weapon (say, pistol) until they all die, even though there is a much stronger weapon (say, shotgun) right in front of him that he would step forward to pick up.

I had the opposite issue: he'd pointlessly use up all CG ammo when using the SG would make more sense, then pick up shellboxes with 46 shells in stack.

But I've talked with printz and obviously all the focus is on robust movement right now, not handling weapons or fight strategies. We all know how to improve the bot's behaviour to handle the battle scenarios we see on screen, but the rules should be as generic as possible. The more cases you include to your switch scenario, the more you risk the bot will be completely wrong instead of just clueless.

Share this post


Link to post
dew said:

This is untrue. He steps into nukage for dubious reasons, but he very intentionally avoids nukage by walking on the surrounding tiny platforms better than a regular player would be able to.

Run him on this map, then.

Share this post


Link to post

Currently there's no nukage awareness (other than trying to avoid picking items from death pits).

Share this post


Link to post
Linguica said:

Made a sample video showing off a level it worked pretty well on:

That's pretty stinking cool.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now