[net.ai] Could a computer play zork?

mjs (03/23/83)

One way a computer (program) could play zork is through a generic
"expert system".  We have been using such a system called "RITA" (Rand
Intelligent Terminal Agent) for a while here, and while the
specification of rules is done in a language that very closely
resembles English, the "knowledge engineer" (rules author) would have
to know (and be able to code) how to play a game like zork or
adventure.  For instance, the rules would have to be able to recognize
whether or not the current location has been visited, whether there are
any (movable) objects present, etc.  Here's a rule that might be useful
in such an agent.

rule new_room:
if there is not a room whose name is the name of the current_room
then create a room whose name is the name of the current_room
and whose objects is the objects of the current_room
and whose exits is the exits of the current_room
and whose description is the description of the current_room;

A skeleton of the data structure I would use to represent a room looks
something like this:

object room:
	name is "West of House",
	description is "You are standing west of a white house....",
	exits is ((direction, room_name), ...),
	objects is ("mailbox");

In this fragment, things inside parentheses represent members of a
list, and exits is a list of 2-element lists.

Now that it's been suggested, I may (in my copious spare time (both
seconds of it per day)) actually implement an adventure runner.

The documentation of RITA and ROSIE, its successor, are available
through NTIS, and I can dig up the reference numbers to post to the net
if there's enough interest.

		Martin Shannon, Jr.
Phone:		(201) 582-3199
Internet:	mjs@mhb5b.uucp
UUCP:		{allegra,rabbit,alice,mhb5b,mhb5c}!mjs
USPS:		600 Mountain Avenue Room 5F-120
		Murray Hill, NJ 07974

daleh (04/01/83)

	From your description, it does seem possible to program a computer
	to traverse the rooms in Zork, but could it win (can you make RITA
	want to win), i.e., program it to solve the problems, without telling
	it what to do with the objects....

	Dale Henrichs
	tektronix!daleh

dann (04/05/83)

 I think having a computer play Zork is an example of the old
 human-superhuman fallacy.  Zork is quite difficult even for human
 beings, there is no reason to believe this will not be the case 
 for humans.

 Some of the issues that would have to be faced:

 a.  Goal specification:  How does the computer know what to do?  Obviously,
     grabbing all the treasure is a good thing, but the real trick is 
     getting to the end game.  How can you tell the program that getting
     killed by a grue is *not* a GOOD THING?

 b.  The most difficult problem is Zork is that it is open ended.  There
     is not a fixed set of commands, instead the player draws upon 
     real world knowledge, hints from other players, divine inspiration,
     and the Dec Professional Magazine.  How would a rule based system 
     be expected to solve the echo room (divine inspiration) or open 
     the egg in a non-destructive manner?

     Expert systems only work well in environments where there exists a 
     well-defined set of rules.  The set of rules for Zork is probably
     the set of all knowledge possessed by the average college freshman
     (or maybe, upon reflection, somewhat larger).   The
     rule-based system would have to know that torches can be lit, 
     shovels are used to dig, food can be eaten, doors can be opened.... 


     GPS type programs work in environments where all the operators are
     known and can be applied according to some reasonable set of 
     heuristics.  Even if all the operators for Zork were known, the 
     search tree would be HUGE!


c.   How would a program be devised to function in an environment where
     luck plays a part?  The Troll occasionally kills the explorer,
     the Thief appears randomly.  It's hard to deduce rules that 
     are only sometimes true.



     This does not mean that I believe a computer can not play Zork.
I am merely expressing my opinion that we are 5-100 years away
from the point where this would be an acceptable (do-able) research 
project.  Whoever writes a Zork playing program will have his
lifework cut out for him.  I suspect that only someone who has won
at Zork will be able to do it and the program will contain 
a lot of this experience implicitly.  A well-written (non-fudged)
program would be able also win generic programs such as Adventure.


					dann

newman (04/06/83)

I believe the Troll can be fought in such a way that he never kills you.
The Thief apparently can be dealt with (although I've never done it!)
without him killing you or stealing anything. Maybe there isn't as much
of a problem with randomness as was suggested?