Jump to content

Talk:Hunt the Wumpus

From Rosetta Code

Details

These rules actually conflict with the original wumpus rules, and leave some issues unspecified. Would it be acceptable to implement something closer to the original? --Rdm (talk) 07:41, 8 May 2015 (UTC)

I'd like to modify my Javascript source to something more similar to the original, if you point me to the differences you noticed. Also, what is not specified? I'd love to edit the description. Last thing: The only conscious conflict I've made, just for a matter of semplicity, is the ability to only shoot to nearby rooms.--Pistacchio (talk) 10:16, 8 May 2015 (UTC)

Ok, sure... well, I started coding up a J simplification, and so I extracted the original intro text (without the press return to continue stuff), and it looked like this:

<lang J>INTRO=:0 :0

WELCOME TO 'HUNT THE WUMPUS'
 THE WUMPUS LIVES IN A CAVE OF 20 ROOMS. EACH ROOM

HAS 3 TUNNELS LEADING TO OTHER ROOMS. (LOOK AT A DODECAHEDRON TO SEE HOW THIS WORKS-IF YOU DON'T KNOW WHAT A DODECAHEDRON IS, ASK SOMEONE)

    HAZARDS:
BOTTOMLESS PITS - TWO ROOMS HAVE BOTTOMLESS PITS IN THEM
    IF YOU GO THERE, YOU FALL INTO THE PIT (& LOSE!)
SUPER BATS - TWO OTHER ROOMS HAVE SUPER BATS. IF YOU
    GO THERE, A BAT GRABS YOU AND TAKES YOU TO SOME OTHER
    ROOM AT RANDOM. (WHICH MAY BE TROUBLESOME)
    WUMPUS:
THE WUMPUS IS NOT BOTHERED BY HAZARDS (HE HAS SUCKER
FEET AND IS TOO BIG FOR A BAT TO LIFT).  USUALLY
HE IS ASLEEP.  TWO THINGS WAKE HIM UP: YOU SHOOTING AN

ARROW OR YOU ENTERING HIS ROOM.

    IF THE WUMPUS WAKES HE MOVES (P=.75) ONE ROOM
OR STAYS STILL (P=.25).  AFTER THAT, IF HE IS WHERE YOU
ARE, HE EATS YOU UP AND YOU LOSE!
    YOU:
EACH TURN YOU MAY MOVE OR SHOOT A CROOKED ARROW
  MOVING:  YOU CAN MOVE ONE ROOM (THRU ONE TUNNEL)
  ARROWS:  YOU HAVE 5 ARROWS.  YOU LOSE WHEN YOU RUN OUT
  EACH ARROW CAN GO FROM 1 TO 5 ROOMS. YOU AIM BY TELLING
  THE COMPUTER THE ROOM#S YOU WANT THE ARROW TO GO TO.
  IF THE ARROW CAN'T GO THAT WAY (IF NO TUNNEL) IT MOVES
  AT RANDOM TO THE NEXT ROOM.
    IF THE ARROW HITS THE WUMPUS, YOU WIN.
    IF THE ARROW HITS YOU, YOU LOSE.
   WARNINGS:
    WHEN YOU ARE ONE ROOM AWAY FROM A WUMPUS OR HAZARD,
    THE COMPUTER SAYS:
WUMPUS:  'I SMELL A WUMPUS'
BAT   :  'BATS NEARBY'
PIT   :  'I FEEL A DRAFT'

)</lang>

So... different (more concise!) messages, bats are non-lethal, and the wumpus sometimes moves.

Also, looking at the implementation, this was unspecified: initially none of the player nor the hazards are co-located. --Rdm (talk) 12:14, 8 May 2015 (UTC)

Yeah, I really don't see how this task got out of draft status. At the time that happened, there were actually more submissions following the rules of the original game than there were using the task spec. Right now it's about half-half, but several of the submissions that chose to follow the task spec have also made up their own rules, so very few exactly match the spec. I think it would make a whole lot more sense to just link to the original source and description that was published in Creative Computing magazine. Or at least put the task back into draft status until there is more of a consensus on what the rules should be. --j4_james (talk) 20:37, 10 June 2018 (UTC)

move?

I suggest moving the title of this page to Hunt the Wumpus, ie without capitalising the "the". Thebigh (talk) 11:00, 24 May 2020 (UTC)

Original game behavior

Here are some details about the original game that are not explicitly specified but can be read from the source code published in Creative Computing magazine and/or the article (starting on page 247 of the magazin) by Gregory Yob.

  • The rooms have numers 1..20, there is no room 0.
  • Player, bats, pits and Wumpus start in six different rooms. All six rooms are chosen randomly.
  • At the end of the game (no matter if won or lost) the player has the option to re-start the game with the same start constellation.
  • When player enters room with bat, player is moved to some random room. The bat stays in its original room - think of the bat returning to its room after moving the player.
  • Immediately after being moved by a bat, the player's room is checked again. If again in a room with a bat, the player is moved a second time (and so on...)
  • When the player is near to two bats, the message "BATS NEARBY!" will be shown twice. Similarly, if the player is near to two pits, "I FEEL A DRAFT" is printed twice.
  • When the player chooses to fire an arrow, they can choose how far (= how many rooms) the arrow shall fly. The arrow can fly 1..5 rooms.
  • After selecting how far the arrow shall fly, the player has to enter as many room numbers as they have chosen the arrow to fly. They have to enter all room numbers before anything else happens.
  • For the route of the arrow, the player can enter arbitrary sequences of numbers (which do not even have to be room numbers) with only one exception: the player may not enter a number that is identical to the penultimate number. For example, after entering 1 2 3 the number 2 would not be accepted. The player is then requested to enter another number.
  • After the player has entered all numbers for the route of the arrow, the arrow starts flying through as many rooms as the player has selected.
  • The arrow starts from the room of the player and in each step moves to an adjacent room from its last position.
  • When the number that the player has entered for the respective step of the arrow is not a number of an adjacent room, it is randomly chosen to which adjacent room the arrow flies. In this case it is, however, possible that the arrow returns. That is, while the player is not allowed to enter the sequence 4 3 4 (see above), the arrow can still take this route if the player (being in room 2) entered 4 3 100.
  • If the player entered a non-sensical route for the arrow, and this leads (as described before) to a randomly chosen adjacent room, then still the rest of the route given by the player is considered for the further flight of the arrow. For example, if the player (being in room 2) enters 4 3 100 5, and the arrow flies through rooms 4 3 and then randomly into 4, then it will continue from 4 to 5 as 5 was given by the player for the fourth step of the route.
  • Whenever the arrow reaches a room, it is checked whether in that room there is the wumpus or the player. If the wumpus is hit, the game immediately ends, and the flight of the arrow also stops - remaining parts of the route are ignored.
  • Only after the arrow finished its flight without hitting the wumpus or the player, the wumpus wakes up and (possibly) moves.

...

Cookies help us deliver our services. By using our services, you agree to our use of cookies.