Adventure (430 points): Finished!   15 comments

Perhaps you were frustrated by long hours mapping the maze of twisty passageways, all different, especially once finding out the “vending machine” at the end only serves as a way to remove a treasure and reduce the possible high score. Perhaps you always wanted to do this:

Dead End

There is a massive and somewhat battered vending machine here. The instructions on it read: “Drop coins here to receive fresh batteries.”

ATTACK MACHINE

As you strike the vending machine, it pivots backward along with a section of wall, revealing a dark passage leading south.

S

You are in a long, rough-hewn, north/south corridor.

Only ATTACK works. You can’t “PUSH” or “MOVE” or anything like that.

Past the vending machine is a small secret area:

You are in a large chamber with passages to the west and north.

A formidable ogre bars the northern exit.

While attacking the ogre in normal circumstances is futile, if you have a dwarf following you around it can come to your advantage:

ATTACK OGRE

The ogre, who despite his bulk is quite agile, easily dodges your attack. He seems almost amused by your puny effort.

One sharp nasty knife is thrown at you!

The ogre, distracted by your rush, is struck by the knife. With a blood-curdling yell he turns and bounds after the dwarf, who flees in panic. You are left alone in the room.

In any case, I managed to secure the 20 necessary treasures, place them in the well house, and then waited around the cave until the endgame started. If you’ve never played any version of Adventure to the end, here’s what that looks like:

The sepulchral voice intones, “The cave is now closed.” As the echoes fade, there is a blinding flash of light (and a small puff of orange smoke). . . . As your eyes refocus, you look around and find…

You are at the northeast end of an immense room, even larger than the Giant Room. It appears to be a repository for the “Adventure” program. Massive torches far overhead bathe the room with smoky yellow light. Scattered about you can be seen a pile of bottles (all of them empty), a nursery of young beanstalks murmuring quietly, a bed of oysters, a bundle of black rods with rusty stars on their ends, and a collection of brass lanterns. Off to one side a great many dwarves are sleeping on the floor, snoring loudly. A notice nearby reads: “Do not disturb the dwarves!” An immense mirror is hanging against one wall, and stretches to the other end of the room, where various other sundry objects can be glimpsed dimly in the distance.

This leaves an absurd puzzle I’ve already written about to finish things off:

BLAST

There is a loud explosion, and a twenty-foot hole appears in the far wall, burying the dwarves in the rubble. You march through the hole and find yourself in the main office, where a cheering band of friendly elves carry the conquering adventurer off into the sunset.

You scored 410 out of a possible 430, using 504 turns.

Your score puts you in Master Adventurer Class B.

To achieve the next higher rating, you need 1 more point.

I lost some points due to

Saving my game three times. Each save was a 5 point loss.

and

Passing the 350-turn mark (which causes a deduction) and the 500-turn mark (which causes another deduction). The latter was particularly frustrating; after getting all treasures the standard procedure is to wait in the cave for it to “close”, which easily took at least 50 turns.

I’m not entirely convinced a 350-turn win is possible, especially with the closing wait time built in? I did use “routing” trying to make each foray in the cave as efficient as possible, but I was still a bit off. The trickiest part to time was the vending machine foray as mentioned earlier, because you have to dive into the maze with a dwarf in tow.

Also, the dwarves just seemed more generally aggressive in this game compared to the last. I did make a couple honest no-save attempts but each time I was skewered; death is very random.

Frank thoughts: none of the new additions are improvements. While it is indeed interesting to use the bird for more than one thing, and indeed satisfying to have the vending machine mean something, and even somewhat enjoyable to optimize for points, the 430-point version of Adventure is not as balanced as the 350-point version. While the same difficulty of puzzles might be welcome in, say, Philosopher’s Quest, the entire texture of that game radiated evil, while 350-point Adventure is friendly and bright. Spice was added to a dish that didn’t need it; what Don Woods really needed to do (and still, perhaps, might do?) is write an entirely new game.

There’s been one “enhanced” port of 430-point Adventure, written for Android.

Posted May 31, 2017 by Jason Dyer in Interactive Fiction

Tagged with

15 responses to “Adventure (430 points): Finished!

Subscribe to comments with RSS.

  1. A very surprising conclusion. One would think that adding additional depth to an essentially familiar game could only make it better. It’s quite startling to realise that, even when this is done by the original author, it can have a negative overall effect.

  2. “I’m not entirely convinced a 350-turn win is possible, especially with the closing wait time built in?”

    I was able to do it using Eric Raymond’s “Open Adventure” reimplementation, but it was borderline cheating:

    For one thing, it allows you to pick a random seed for the game. So I made multiple runs through the beginning of the game, until I got a run where the dwarf and the pirate appeared right when I needed them. I looked at the generated log for the random seed, and then used that for all subsequent runs.

    I made liberal use of the secret exits, where you can type the name of a nearby room and go there instantly. Not only did that allow me to bypass rooms, it side-stepped the randomness of some exits.

    You can shorten before the dungeon closes by trying to exit after you get the warning that it’s closing soon.

    This brought me down to some 360 moves. I realized I could shorten one of treasure-gathering trips by a few moves by doing things in a different order, and do some other trimming. That left me at 351 moves. Darn it!

    Finally I realized that I hadn’t actually killed a single dwarf, because they only showed up when I was a few moves from the exit. So left the axe on the ground, which meant I didn’t have to drop it later for the forest trip. Success! 430 points in 349 moves.

    I’m sure I didn’t pick the optimal route through the game, but it still seems highly dependent on dumb luck. So it’s possible, but I’d hardly call it reasonable.

  3. Since I figured it could be a useful test case for them, I’ve left my walkthrough and transcript as a bug report/feature suggestion. You can find it at https://gitlab.com/esr/open-adventure/-/issues/61

    Torbjörn Andersson's avatar Torbjörn Andersson
  4. Just an update to say that Ryan Sarson’s improvement on my walkthrough is now part of the Open Adventure test suite: https://gitlab.com/esr/open-adventure/-/blob/master/tests/win430.log with a transcript in the corresponding win430.chk file.

    The problem with mine was that I started the “fee fie foe foo” incantation before finding the final treasure (in my case, the rare spices), but didn’t finish it until I got back to the Giant Room. This was because if I did it after discovering the spices the dungeon would close before I got back, and if I did it all before I would be two moves short of getting a perfect score. But it turns out that you’re not supposed to be able to do that, because any command (even an invalid or empty one) that’s not part of the incantation is supposed to break it.

    (At the time of writing, that bug is still present in Open Adventure, but there may be a fix incoming.)

    Ryan found a way to shave off a few moves from my solution so that he could do the incantation properly, and then proceeded to verify it against Don Wood’s C implementation by running it “about 300 times using a bash script” before the random number generator smiled on him and allowed the solution to work there as well. For the curious, the main difference between his and mine was that he made a single trip (without even picking up the lamp) to move the emerald and retrieve the pyramid, where I made it part of my first treasure gathering run so I had to juggle my inventory a bit more.

    One funny thing was that, in addition to proving that the game *can* be finished with a perfect score (something I had just taken for given, but it turns out you weren’t the only one who had tentatively concluded that it was impossible!), it exposed a bug in Open Adventure where the wrong message was printed at the very end: It told me I could get a higher rating if I got another 9570 points, instead of telling me that getting a higher rating would be “a neat trick”. But that has been fixed now.

    The ending message suggests that a <340 move solution may be possible, but I'm not going to look for it. I'm half-tempted to go on some speedrunning forum, arrogantly state that it's impossible, and then just sit back and watch them solve it for me.

    Torbjörn Andersson's avatar Torbjörn Andersson
  5. Hello! I’m new here as of today. I’m the Ryan Sarson that Torbjörn Andersson mentioned above.

    I was able to beat “the Dungeon-Master himself”… “You scored 430 out of a possible 430, using 329 turns.”

    I posted the walkthrough at https://gitlab.com/esr/open-adventure/-/issues/61#note_1634736158

  6. Congratulations. From what I understand it’s actually possible that you guys may be the first people ever to actually get a maximum score on Adventure 430, thanks to its stringent time limit! My own best was 428 moves, and 428 points.

    (Now to try and do it on the original version rather than a port which lets you deliberately pick a particular random seed…)

  7. > (Now to try and do it on the original version rather than a port which lets you deliberately pick a particular random seed…)

    When I did mine (which turned out to not be a valid 430 point solution since, as I mentioned above, I accidentally exploited a bug in open-adventure to save a move), I did play it without picking a random seed until I had gotten past the ogre and found the pirate treasure. It was only when I realized how heavily it depended on the pirate and dwarf showing up at just the right time that I decided to re-use the seed after that.

    After that, the only luck I needed was to always be able to retreat from the dwarves before they killed me. (That meant I never had to pick up the axe, giving me an extra inventory slot to use for treasure.) So I guess it’s not impossible, if you’re willing to replay the game a lot to get that early lucky part right.

    Mind you, I never even tried to improve my solution to legitimately get 430 points. I just wanted to finally play the game.

    Torbjörn Andersson's avatar Torbjörn Andersson
  8. I just wrote a rather lengthy comment here but it has failed to show up. I was taken to the wordpress login page, where I logged in and it said my post went through. But because I don’t see it here, I tried again and now it says, it’s a “duplicate”. Can someone explain to me what happen? Also, I have the original comment copied (because I’ve learned over the years to never trust these comment/login processes), so if I am to re-post, please let me know how. Thanks!

  9. Third time lucky? Below is my original comment:

    I have spent an embarrassingly long time analyzing this game. I first discovered Adventure as part of the BSD games package that came with my Linux distro. (It’s also where I found Nethack, a game I’ve spent probably ten times as long as Adventure analyzing, lol.) Adventure became my main time waster during the COVID lockdown.

    I started with the 350 point version and began developing a huge spreadsheet and Trizbort map. Essentially, I went through advent.dat line-by-line. I then moved on to the 430 point version and that’s when I found esr’s Open Adventure. I was new to coding C and this was a great project for me to learn from. I went line-by-line through adventure.text, comparing esr’s version to the Adventure 2.5 version I found at https://rickadams.org/adventure/e_downloads.html. I submitted several bug reports to esr… he’s been quite patient with my newbie approach to contributing to an open source project.

    Throughout this process I became convinced a 350 turn run to get 430 points was not possible. I came across Don Woods’ quote in https://gitlab.com/esr/open-adventure/-/blob/master/history.adoc?ref_type=heads, “I set the requirement at what felt like a hard but fair number of turns, then applied several sneaky tricks to shave off another twenty. I hacked up a wrapper around the game (still in Fortran, most likely, but I forget) that would try each initializing the RNG using each second of a given day, while feeding in a script that either worked or aborted early if anything went wrong (such as a dwarf blocking my path). As I recall, it took less than a day’s worth of RNG seeds to find one that worked. I verified my script could work given a favorable RNG, and stuck that number in the message.” Even then, I told myself after Woods had said this that changes must have been made to the original code that prevented a 350 turn run!

    Only after Torbjörn posted his solution did I then know it was possible. The main sticking point, which I’ve seen on this forum, as well as other websites which have posted solutions, is that it seemed like the 50 turns needed after seeing “Cave closing soon.” was impossible to avoid. And the 15 turns “added” when the player “panics” seemed to make things worse for speedrunning. Even the comments of the original source code are misleading, “Start closing the cave, and then sit back and wait for him to try to get out. If he doesn’t within clock2 turns, we close the cave; if he does try, we assume he panics, and give him a few additional turns to get frantic before we close.” The detail Torbjörn revealed to me was that the panic code ~changes~ the clock to 15, it doesn’t ~add~ 15 turns, so if it is triggered at the moment the cave closing message is seen, the turn counter goes from 50 to 15, saving 35 turns!

    It was then only a matter of tweaking my original path through the game to get to 330 (and then 329!) turns and, much like Woods, I ran it with a bash script to get a favourable RNG. The main difference is that Woods said it “took less than a day’s worth of RNG seeds to find one that worked”, whereas I’m able to crunch through 100,000 runs in less than 15 minutes. If I didn’t get a result in that time, I would re-work my path.

    As mentioned by others before, the main key to speedrunning Adventure is luck with the dwarves and pirate – you need luck to avoid getting killed, to get the chest, and to get by the ogre. You also need luck to take advantage of the randomized Bedquilt shortcuts. The RNG here is not too bad, for the most part, however.

    Lastly, during my analysis, I realized there is possibly one other way to save one more turn – prevent the pirate from stealing from you. You then save the turn where you have to pick up the stolen treasure. The chest placement can be triggered by seeing the pirate after all the other treasures have been ~seen~. You would have to rely heavily on RNG. Hope to collect and deliver all the treasures but the chest before the pirate sees you. After he sees you and you find the chest (now the last treasure seen), you’ll have 30 turns to deliver the chest to the building. Unfortunately, I think the RNG here is near impossible. I ran a few test scenarios for a few million iterations and it never returned a result. I will leave this for future generations of adventure players to see if it’s actually possible :)

    Anyway, tl;dr: it is possible to beat the Dungeon-master himself and get a sub-330 turn 430 point game!

    • Cool to see this.

      The tricky thing with Adv430 especially, compared to other versions, is that most of the new items are located at quite a wide distance from each other, so it’s tricky to optimize the new stuff. Compare this to, say, Adv440, where the five new treasures are all located relatively near to each other so it’s easy to scoop several of them up at once without disrupting the familiar loop of Adv350.

      Now I wonder how fast Adv440 could be beaten if anyone’s up for it. Same for the larger versions, although in a lot of those the main impetus for turn count optimization (the lamp timer) is a non-factor. (Someone apparently managed to beat Adv770 in 999 moves at one point, and I have no clue how they managed *that*…)

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.