# The Hitchhiker's Guide to the Galaxy (Infocom Release 60, serial 861002, Z-machine V3) # VERIFIED COMPLETE SOLVE: 400/400, won=True, died=False # # Reproduce with the RNG-pinned replay harness (free, no API): # cd ~/src/zwalker # python3 scripts/replay_solve.py games/zcode/hhgg.z3 walkthroughs/hhgg_verified_400.txt --seeds 24 --out solutions/hhgg_verified.json # => hhgg_verified_400.txt: VERIFIED 400/400 at seed 1 | 466 cmds | died=False | won=True # # Ending: Marvin unjams the hatch mechanism with the toothbrush, and Arthur # walks down the landing ramp of the Heart of Gold: "You set one single foot # on the ancient dust -- and almost instantly the most incredible adventure # starts which you'll have to buy the next game to find out about. ... Your # score is 400 of a possible 400, in 521 turns." # # Why a pinned seed (no restart prelude needed -- boot draws no randomness; # two boots leave byte-identical VM memory and the seed is pinned right after # start()): this game is a thicket of scripted randomness and every branch # below is frozen by the seed, so this exact command list only wins under # seed 1 (scripts/solve_hhgg_adaptive.py re-derives a winning list for any # seed; it went 8/8 on seeds 1-8): # * the glass-case password: LINE-NUMBER<-RANDOM 6 / WORD-NUMBER<-RANDOM 3 # roll at Vogon Hold entry (vogon.zil:56-57); under seed 1 the recording # presses the case switch ("...type in the THIRD word from the second # verse"), hears "Fripping lyshus wimbgunts, awhilst moongrovenly # kormzibs." as the second verse's first line, and types "wimbgunts" # (quotes required; a wrong word explodes the case, verbs.zil:2032-2080); # * the improbability-trip destinations: each `push switch` rolls the DARK-F # PROB chain (globals.zil:801-841). Seed-1 trip order: Bugblatter lair; # 2 lair bounces; Trillian's party; Vogon-hold bounce; Zaphod's speedboat; # 2 party bounces + 2 hold bounces interleaved; Ford on Earth; the # deliberate careless-words phrase ("put stone in satchel", a failed # 4+-word parse, misc.zil:405-410) then arms FLEET-PROB (unearth.zil:456) # LAST, so the brain-death War-Chamber re-roll (I-BRAIN-DEATH, # globals.zil:1098-1113) can never happen; one more lair bounce; War # Chamber + synapse maze (particle surfaces at MAZE-COUNTER 3 through # PROB-40 blocked exits, unearth.zil:675-686); # * the whale trip is steered, not rolled: with the dangly bit in real tea # the dark is CONTROLLED (heart.zil:1722-1723) and each wasted turn # rotates DARK-EXIT-TABLE, so the recording feels the darkness each turn # and only tastes the liquid on the "warm" (whale) rotation; # * the Tree-of-Foreknowledge fruit re-rolls PICK-ONE TOOL-LIST up to 50 # times while the pick is aboard (heart.zil:474-480); with all ten tools # aboard the 51st pick stands -- seed 1 names the toothbrush, which is # why the recording ends with `give toothbrush to marvin`; # * plus Marvin's PROB-8 wanders, I-THING's 4+RANDOM(4) returns of the # Thing, and the per-turn dark-litany PROB draws, all riding the stream. # Mechanics verified against the official ZIL source # (github.com/historicalsource/hitchhikersguide, COMPILED/s4.z3 matches # r60/861002 exactly); route cross-checked against two independent IF-Archive # walkthroughs and the original InvisiClues. Synthesis notes: # logs/hhgg_notes.md; route: logs/hhgg_route.txt. # # Route summary (400 = 10+15+8+12+15+25+25+25+25+25+25+15+25+100+25+25): # light/gown/ANALGESIC 10; exactly 3 pub BEERS 15 (matter-transference # cushion); sandwich to the dog (war-chamber peace later); thumb -> Vogon # HOLD 8; babel-fish Rube Goldberg (gown on hook, towel on drain, satchel # before panel, mail on satchel) FISH 12; ENJOY POETRY 15; type "wimbgunts" # CASE 25 -> plotter; spaced, picked up by the Heart of Gold; engine-room # look-x3 SPARE DRIVE 25; small plug + dangly bit in tea substitute; trips: # lair (name/stone/towel-on-head/carve/INTERFACE 25 + chipper), party (drop # plate, examine Arthur, FLUFF in handbag, hello Phil, +25), speedboat (fluff # +key+toolbox, steer at spire, GUARDS DROP RIFLES / TRILLIAN SHOOT RIFLES # +25), Ford-on-Earth (towel to Arthur, "idiot", Prosser swap, peanuts, BEER # +15, fluff to Arthur), careless words -> War Chamber (awl; dog-fed peace; # maze PARTICLE 25 = common sense out); nutrimat interface + touch pad, # large plug into console, missiles -> whale; dangly bit into REAL TEA, # controlled dark -> whale stomach, FLOWERPOT into the Thing; plant all four # fluffs, sauna BLOOM 25, eat fruit (vision: toothbrush); tea + no tea opens # the screening door, DRINK TEA 100 (350 >= 300 survives the Pantry), PANTRY # 25; "marvin, open the hatch", Access Space with just the toothbrush, # MARVIN 25 = 400; down the ramp onto Magrathea. # # Generated by scripts/solve_hhgg_adaptive.py (adaptive recorder, RNG # seed 1); replay-verified by scripts/replay_solve.py. #% WIN_TEXT: one single foot on the ancient dust turn on light get up take gown wear gown look in pocket take analgesic take screwdriver take toothbrush s take mail s lie in front of bulldozer z z z z z z take towel s w z drink beer drink beer drink beer buy sandwich e give sandwich to dog z z z z z z z z take device press green button z z z z smell examine shadow eat peanuts remove gown hang gown on hook put towel on drain z take satchel put satchel in front of panel put mail on satchel press dispenser button take gown wear gown press switch z z z z z enjoy poetry z z z z z z z z type "wimbgunts" take plotter take towel z z z z z z z z z listen s look z z drop plotter drop device drop screwdriver drop toothbrush drop guide d s s s s s s look look take drive n n w touch pad take cup e u drop drive drop cup put small plug in plotter put dangly bit in cup push switch z z z z smell examine shadow say arthur dent e take stone put towel on head carve my name on memorial remove towel w sw take interface z z z z z z listen s s u push switch z z z z smell examine shadow z z z z listen s s u push switch z z z z smell examine shadow z z z z listen s s u push switch z z z z feel darkness taste liquid drop plate examine arthur take fluff open handbag put fluff in handbag take plate hello phil z z z z z z listen s s u push switch z z z z smell examine shadow z z z z listen s s u push switch z z z z examine darkness examine light look under seat take toolbox steer boat toward spire z z z stand n z z z z guards, drop the rifles trillian, shoot the rifles e z z z z listen s s u push switch z z z z feel darkness taste liquid z z z z listen s s u push switch z z z z smell examine shadow z z z z listen s s u push switch z z z z feel darkness taste liquid z z z z listen s s u push switch z z z z smell examine shadow z z z z listen s s u push switch z z z z examine darkness examine light open satchel take fluff take towel n give towel to arthur idiot go to prosser prosser, lie down s w buy peanuts buy beer drink beer drink beer e n give fluff to arthur z z z z z z z listen s s u put stone in satchel z push switch z z z z smell examine shadow z z z z listen s s u push switch z z z z listen s take awl z z z z n n n n n take particle z z z z listen s s s d take fluff take key u n w open panel take board put interface in nutrimat touch pad e u put large plug in large receptacle z z z push generator switch d w take tea e u drop tea remove dangly bit put dangly bit in tea i drop board drop key drop cushion fluff drop awl drop chipper drop towel drop satchel push generator switch feel darkness feel darkness taste liquid take flowerpot put flowerpot in thing z z z z z z z listen s take thing i take flowerpot s u take pocket fluff take satchel fluff open handbag take jacket fluff take cushion fluff put pocket fluff in pot put satchel fluff in pot put jacket fluff in pot put cushion fluff in pot z z z w eat fruit take toothbrush i take tea take no tea d s open door drink tea w marvin, open the hatch e d drop thing i drop flowerpot e z z z give toothbrush to marvin w d z