[update] Automatic Wolfenstein — alpha02

Hello!

UPDATE 16/11/2012: alpha02 release, now both Win32 and Mac

See original introduction here:

Before trying to muck myself into AutoDoom, bot for Doom, I've been working on a bot for Wolfenstein 3D, which is far simpler to program. So far, it can finish any non-extreme map with complete (100%) stats, and even win some episodes and sign itself at the high scores roster :P

This is an alpha release, which means that it overall works, but I still need to improve some tactics, add others and do anything else until I'm really satisfied. I'd love to see feedback on bugs and errors, especially in custom maps.

Download here

Here is the download.

Make sure to choose the version matching your installed Wolf3D version. If mistaken, don't worry, it will just abort with an error.

You can try it with mods too, as long as those mods don't have their own executables. To find mods, start from here. It would be interesting to see what challenges have been found (though hypercomplex engine-hacky maps like in Temporary Insanity are right out of my plans :) )

ALPHA02 updates

- The bot can now run for cover, and not just by moving backwards. For this, it strafes a lot now. Now it has a chance to finish E4M10! though it might need the chaingun...
- Smooth movement, no longer auto-levelled on the centre of the tile. It feels more natural now.
- Shouldn't stop moving any more. If it has to wait too much, it will move anyway.
- More conserving usage of ammo, by switching to the machinegun when wasteful with the chaingun. Now it has a chance to finish E5M2.
- Now it will not get stuck, waiting for user input, if a threat remains stuck nearby but out of sight. It will stop waiting and will move ahead.
- Mac OSX binary available (Snow Leopard minimum required).

TODOs

- Intelligent secret maze solver. It's very complex, because I have to consider lots of situations — E4M2/E6M10 choice mazes, multi-push walls, indifferent outcomes etc.
- Better projectile dodger and knife user. It's more complicated than simply pointing, shooting and running for cover.
- A fully implemented screensaver. Currently there's a screensaver WIP for Windows on the SVN, compilable with VS2008 (for instance). It should result into a .SCR. Why it's not released? It doesn't properly act like a screensaver. For one, it leaves one monitor uncovered (in multi-monitor display). For two, it doesn't let the computer go into power saving mode!

When these things get completed, the project will be considered feature complete. I want the bot to have some basic logic in its electronic head. Further plans might be to integrate this into ECWolf, which will bring up further challenges. Or modify this bot to be less deterministic and more biological-like.

Thanks to Moritz "Ripper" Kroll for the Wolf4SDL code base!

Below is a demo video for ALPHA02 (new):

Share this post


Link to post

This bot already plays Wolf3D much better than I could ever hope to. Nice!

Share this post


Link to post
printz said:

- Speed-running behaviour. Currently it moves quite jerkily in diagonal corridors.

Heh, that got me! It doesn't move THAT jerkily :)

And hey, that was a real great watch! I liked watching this bot sweep through SOD02, which isn't exactly an easy level. It not only moves fast, but also takes almost no damage. Does it support graphic change mods? Anyways, I will keep looking forward for the next versions.

Share this post


Link to post

If only I could turn on my Super Nintendo and find Super Mario World beaten when I return home.

Share this post


Link to post

I tried this a few nights ago from SVN, and it's really neat (Wolf3d makes me nauseous, so I could only watch it for about two and a half maps).

I think more natural movement is the main thing this needs, there is a tendency to hug the left walls, and perhaps it should wait a little bit before shooting through an opening door.

P.S. what's the 'markov' stuff in there (Markov chains) ?

Share this post


Link to post

Impressive. Watching it navigate reminds me of doing maze-solving programming problems. It also gave me some ideas about how to be slightly better at Wolf3D (I suck at it).

Share this post


Link to post

This is absolutely incredible. And it also completes everything differently all the time, great watch. Could you please shed any light on how it works for us non-coding math nerds? :)
Also, the gameplay looked humanly enough for me, 2:07 at your video is hilarious and smart. I'd actually love to see it robotized further, by making it move with strafe-50 (or however it's called in wolf) all the time.

Share this post


Link to post

whoa that's pretty incredible, printz!

Share this post


Link to post

Why does it shoot into thin air sometimes? (1:42 of your video)

Share this post


Link to post
jongo said:

This is absolutely incredible. And it also completes everything differently all the time, great watch. Could you please shed any light on how it works for us non-coding math nerds? :)

What I'd like to know is:
- what happened in the dog room in E5M1 (that 1%)
- why it pushes secret walls and then doesn't enter the secret chambers right away, but steps back.

Awesome stuff :)

Share this post


Link to post

Thanks for the replies!

I'd like to know if whichever executable variant you downloaded worked properly. I only got to test the Wolf v1.4 AcTiVisioN and the SOD executables.

Also, do you have any performances issues? If you have, please post your processor and maybe your RAM too. I'm using 2.1GHz Intel Core 2 Duo and 1GB RAM. It only slows down when I record videos for youtube using CamStudio.

1ntru said:

I liked watching this bot sweep through SOD02, which isn't exactly an easy level. It not only moves fast, but also takes almost no damage.

Actually SOD02 is quite easy because most Nazis come from forward or in low numbers, giving the bot enough time to react without complicated movements. I should have posted a level where the bot was gambling with death.

Does it support graphic change mods?

Yes, it supports any mod without a custom executable, and that includes level mods, graphics mods, sound mods, music mods. It isn't the kind of robot that sees Wolfenstein and knows how to react. It's just an actor inside the game which knows how to traverse the level.

andrewj said:

P.S. what's the 'markov' stuff in there (Markov chains) ?

Heh. I'm merely using Markov chain probability lists to make it write random (but English readable) text at the high score.

Aliotroph? said:

Impressive. Watching it navigate reminds me of doing maze-solving programming problems.

That's what it is. Wolfenstein 3D is like a board game, making it quite easy for the computer to calculate. In comparison, Doom has no tiles, but convex polygons, and the third dimension makes it quite a lot harder to compute.

jongo said:

This is absolutely incredible. And it also completes everything differently all the time, great watch. Could you please shed any light on how it works for us non-coding math nerds? :)

Well, it simply does a Dijkstra (or I should rather use breadth-first) search to find the nearest item/secret/Nazi, and hunts them down by following the resulting path. Every one of those can only be collected once, then it's gone, so it's merely a job of cleaning things up. This is unlike Doom, which has repeatable switches, making things more complicated. When faced with Nazis, the bot enters the combat branch and goes to target, shoot or retreat.

I'd actually love to see it robotized further, by making it move with strafe-50 (or however it's called in wolf) all the time.

Wolfenstein 3D seems to have the speed capped at about that kind of strafe-running, yes. Note that it is forbidden in Wolf to strafe-turn. It's either one or the other. This makes things a bit more complicated for the computer.

david_a said:

Why does it shoot into thin air sometimes? (1:42 of your video)

It shoots to alert guards. I found it useful in levels where huge ambushes await (like E4M9), and this helps reduce them.

Share this post


Link to post

I've always wanted to create something like this. I think it's really awesome that you have.

I think it'd be incredible to see something like this for Doom, and I've often thought about trying to come up with a way to do it. You've already mentioned some of the challenges though. I hate you for getting further with this than I ever would have. :P

Well done.

Share this post


Link to post
vdgg said:

- why it pushes secret walls and then doesn't enter the secret chambers right away, but steps back.

I suppose it counts as two different objectives:
#1: activate secret
#2: collect item

It accomplishes objective #1, but then it cannot accomplish objective #2 right away since it has to wait for the pushwall to complete its movement. So, it does something else in the meantime -- or start to, at least, until the pushwall completes its move and it goes back in.

It makes the behavior rather amusing when there are several pushwalls in a row (secrets within secrets).

On the other hand, if it doesn't need the items in the secret room (maybe it's just some medikits and it hasn't sustained damage yet) then I guess it can complete the level without feeling the need to actually enter the area opened. Triggering the pushwall is enough to register the secret if I'm not mistaken.

Share this post


Link to post
printz said:

I'd like to know if whichever executable variant you downloaded worked properly. I only got to test the Wolf v1.4 AcTiVisioN and the SOD executables.


Been using autowolf-alpha01--w11-apogee.zip and it seems fine. No noticeable performance issues.

Share this post


Link to post

I wonder if it's possible for this thing to solve the Aardwolf secret wall puzzle.

Share this post


Link to post

I don't know if it's able to successfully defeat Hans Grosse during that puzzle. The retreating code is not complete and it tends to get stuck on corners. Otherwise, Grosse is as good as dead.

Second, it depends which pushwall is closer: the one which blocks the aardwolf, or the other?

Third, there's the horror of the bot going directly to a pushwall to block itself in, just after finding the Aardwolf sign or placeholder.

Fourth, no, I haven't implemented any intelligent wall pushing strategies, so the puzzles in E4M2, E4M7 (to get the gold key in case you need it) and E6M10 (in the depth of the slimy dungeon) are not solved. I'll be looking into it, but sounds like heavy use of AI here (unless I can teach it to learn empirically like an animal -- scores didn't get 100%? try not to push this wall next time, see if it's better).

Share this post


Link to post

Just watched this go through episode 3. It successfully killed Hitler, but died many times to the ghosts on the secret level. :P

Share this post


Link to post
Siggi said:

Just watched this go through episode 3. It successfully killed Hitler, but died many times to the ghosts on the secret level. :P

Did he try to avoid them, at least? Was he killed by a monster encroaching during combat with regular Nazis? Or do you mean the Hitler ghosts?

Share this post


Link to post

The pacman ghosts on level 10. I think it did make an effort to avoid them, however I wasn't paying enough attention at the time to tell you exactly how it died. All I know is it died more than 5 times, and things were looking so bad that I was very surprised when it eventually finished the level. I suspect it got killed by the ghosts while fighting with normal nazis.

Share this post


Link to post

I would love to have a version of this to use as a screensaver that always just plays Wolfenstein 3D on loop. :P

Share this post


Link to post
AgentSpork said:

I would love to have a version of this to use as a screensaver that always just plays Wolfenstein 3D on loop. :P


SECONDED.

Share this post


Link to post

You're all praising the AI's superior killing ability with no thought to the genie you just popped out of that bottle. Look what you've done: You've just programmed a kill bot with a fetish for hoarding gold you mad bastard.

Share this post


Link to post
Captain Red said:

You're all praising the AI's superior killing ability with no thought to the genie you just popped out of that bottle. Look what you've done: You've just programmed a kill bot with a fetish for hoarding gold you mad bastard.


If you use it on the FormGen mission packs (aka "Lost Episodes"), then instead it's hoarding bombs and nuke components.

Share this post


Link to post

Using 1.1 Apogee

1. How to let the bot play any map from scratch? (e.g.E6M7)? I tried the -goobers parameter, warped to E6M7, saved the game. Then executed Autowolf, loaded the game and... GetNewActor: no free spots in objlist!

2. Episode 2: the bot finished maps 1,10,2 (almost under par time) and 3. On map 4 in one moment he refused to move (full health, the map was almost finished) and stayed in one position for a long time. Probably forever. I quit.

3. Episode 5: the first surprise: E5M1 was handled differently than in your YouTube video. No low health moments, but the time was 2:59. I waited anxiously for the next map for that tons-of-blue-SS-behind-the-barrels scene. The tactics was good (shoot, retreat, replenish health and ammo), but due to too many missed shots the bot eventually failed.

4. Episode 4: E4M3 was beaten (including 23-nazi room), that buggy E4M10 of course cannot be beaten Max-style, so I had to stop there.

Share this post


Link to post

Same version, same problem with stopping happened to me. The first time i encountered it in E6M10, it just stopped randomly and refused to move. 2nd time was somewhere in E3 - the bot activated some secret and attempted to move, but at that moment the secret wall moved onto the same spot the bot tried to move into. He tried for about 0.5sec, then stopped and never moved after that (well, for 2-3mins, then i quit). I can point out more precise position if you need it, i just don't remember the maps in wolf well :)

Share this post


Link to post
vdgg said:

Using 1.1 Apogee

1. How to let the bot play any map from scratch? (e.g.E6M7)? I tried the -goobers parameter, warped to E6M7, saved the game. Then executed Autowolf, loaded the game and... GetNewActor: no free spots in objlist!

I don't know about -goobers, but to warp I use "--tedlevel xy --hard" at the command-line, where x is episode-1 and y is level-1. That should work if you want to start with a direct level. It might fail in E6M7 due to wasting ammo on those pesky officers and having nowhere to go that doesn't mean more Nazis prepared. The error is suspicious, because I'm not adding new actors.

2. Episode 2: the bot finished maps 1,10,2 (almost under par time) and 3. On map 4 in one moment he refused to move (full health, the map was almost finished) and stayed in one position for a long time. Probably forever. I quit.

It's possible it was waiting for a mutant around the corner to show up, but that mutant was blocked by another obstacle. Currently the bot avoids facing mutants, due to imminent damage threat. If it gets stuck forever (which happens when the mutant is blocked by a deaf guard or sprite obstacle), just use your keys to move it. You still have some limited control.

3. Episode 5: the first surprise: E5M1 was handled differently than in your YouTube video. No low health moments, but the time was 2:59. I waited anxiously for the next map for that tons-of-blue-SS-behind-the-barrels scene. The tactics was good (shoot, retreat, replenish health and ammo), but due to too many missed shots the bot eventually failed.

I probably need to program it to strafe-shoot in order to be efficient in that scene. It's a very powerful tactic when you're a mouse user.

Thanks for the information.

jongo: do you remember anything more about it getting stuck in Episode 3? There are no mutants there. Do you believe it might be E3M7 where it's a pushwall it tries to move to block an extra life, then goes pick that extra life, then normally runs out before it's stuck?

Share this post


Link to post

jongo: do you remember anything more about it getting stuck in Episode 3? There are no mutants there. Do you believe it might be E3M7 where it's a pushwall it tries to move to block an extra life, then goes pick that extra life, then normally runs out before it's stuck?

Exactly, E3M7, it happens in the secret which is inside the wooden room with lots of doors to the left and to the right. Inside of it there is an extra life, and the bot got blocked there again now that i've run this map for the 2nd time. I didn't see that he gets stuck earlier because the only thing that was visible was the wall to the left and the moving wall in front (he was standing on the life and looking back), and it didn't occur to me that the way to the right is blocked too. I should've looked better before posting:)

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