Scott Adams interpreter discrepancies

I don’t understand the logic of Scott Adams’ interpretation in this case:

>Get Fox
Can't get fox when !carried box
>Get Box
OK
>Get Fox
I can't do that...yet!

He should take the object instead of displaying “I can’t do that…yet!”
Do you think this is a bug in the interpreter?

…name two?

In this case, it is up to you to display “OK”.

1 Like

Reading the Definition file gives some clues on this subject, but also reading the manual of The Adventure System. Reading the README file of the asfdcurs interpreter adds some more.

  • Definition file:
    A game consists of a header of 14 values each apparently 16 bit
    Header:
    0 Unknown
    12 Unknown
    A game has 16 (maybe more) binary flags, and 8 (maybe more counters). A few
    later games seem to have 2 (maybe more) values to store location numbers in
    temporarily - eg Yoho spell in Claymorgue.
    Etc.

  • You have the possibility with Adams’ interpreter to get the Time value, but not with ScottFree.
    EXm,CT num:
    Exchanges the content of counter with that of alternate counter num (0-7 [8 contains TIME]).

  • Robert Schneck mentions in his README file of asfdcurs a possible bug of ScottFree with Get.

  • And other things. Make some tests and you will find some…

1 Like

Okay, cool. (ISTR that one of those Unknowns is the checksum, which modern interpreters don’t care about, but it is a Thing.)

Actual functionality gaps are more interesting and good to know about, illustrate places where Cox and co. didn’t 100% support the union of SA game features, and certainly worth fixing with the very available source code.

The difference between the two families of terps is that the
“modern” ones loops through all the “actions” and if there is a match with the VERB and NOUN it evaluates the conditions (all after the “when”-part. If all things match then the action is executed and the parser returns and waits for user input. If there is no exact match then the AUTOGET/DROP routine is called before returning to the prompt.

The ADVENTUR/CMD on the other hand only match the VERB and NOUN. If they match AUTOGET/DROP is not called. The instructions, of course, are only executed if the conditions also match.

This will produce this behaviour for the printed code.

Is it a bug and in wich version? I don’t know? The old terp acts strange when you try to “get fox” when you have the box and the new terp acts strange when you are allowed to “get bat” without the hat.

I would recommend not to trust the AUTOGET/DROP when you are overriding it and to write all actions you want to handle and let undefined actions default to “I can’t do that…yet!”. I also think this is the way Scott Adams wrote his games.

Example from Adventureland:

action GET MUD when here mud and carried bites1
	destroy2 bites1
	get mud
	print OK
	print "BOY that really hit the spot!"

action GET MUD when here mud and carried bites
	destroy2 bites
	get mud
	print OK
	print "BOY that really hit the spot!"

action GET MUD when here mud
	get mud
	print OK
2 Likes

It’s in the documentation of The Adventure System and it’s quite obvious:

If a verb-noun match was found in at least one action entry, but the conditions were not true in any of the matched actions, then the message “I can’t do that…yet” is displayed after all of the action entries have been checked.

2 Likes

Is consistent with:

Or am I thinking wrong on this?

It was just to confirm, through documentation, what you were saying.

1 Like

I see, thanks.

(In the first quote you seems to suggest that the terp should allow the user to ‘get fox’ the second time, but I understand it as it follows the rules set out in your second quote.)

1 Like

That’s a valuable find. I can’t find this in the Adventure Editor manual that i converted to MarkDown (https://github.com/pdxiv/LuaScott/blob/master/doc/Adventure_Editor_Manual_(1981).md). Is there a different version of this document, or is this a completely different document (or did I just mess up my conversion somehow)?

You have this in your document:

This is the first player input action. If the player types in LIGHT MATCH then this action is considered. If even one of the conditions of this action are not met, then ADVENTURE continues searching the actions for another LIGHT MATCH. If it finds another, it considers that one also, and so on until it finds a true one. If no other LIGHT MATCH is found then the message “I can’t do that . . . yet!” is printed and the player is asked to respond again.

which says, as I read it, about the same thing.

There is also this quote:

When player input actions are being evaluated, the action entries are scanned in numeric order. When the verb and noun of an action entry match the player’s input, the conditions are evaluated. If all of the conditions were true, then the commands of this entry are performed. When a “true” match is made, no further player input actions are evaluated on this pass. However, if a match is made and all of the conditions were not true, then the scanning procedure continues until either a “true” match is made or all of the actions are evaluated. If a match was found but the conditions were not true, then the message “I can’t do that . . . yet!” is displayed. If no match was found, then the message “I must be stupid but I don’t understand what you mean” is display.

page 2-5:

3 Likes

Thanks! Wow, that’s a very different version of the guide. The one i originally copied was ~54 pages, whereas that one is ~136 pages. There’s a lot of good information in there.

I think I’ll quickly OCR that and put it up in the same GitHub repository. Even without proofreading I’m sure it can be useful for me at least.

1 Like

Out of curiosity, and if you don’t know, you can also consult the files advdb.txt and ADV_HLP.txt

2 Likes

I’ve added the following to scott2zil.

  • A new constant that determines how AutoGet/Drop should be handled
;"Sets if AutoGet/Drop should be handled as defined in 'The Adventure System' manual or handled as in ScottFree
  THE ADVENTURE SYSTEM
	If a verb-noun match was found in at least one action entry, but the conditions were not true in any of the 
	matched actions, then the message 'I can’t do that…yet' is displayed after all of the action entries have 
	been checked.
	AutoGet/Drop is only called if there is no verb-noun match found.
  ScottFree
	Does the same as above but tries to do an AutoGet/Drop before the message 'I can’t do that…yet'."
<CONSTANT AUTOGET-AS-SCOTTFREE <>>

The relevant part in the code that handles this is then in the routine RUN-ACTIONS and reads like this:

        ;"Word action"
		<COND (<G? .VERB-ID 0>
			<COND (<=? .ACTION-VERB-ID .VERB-ID>
				<COND (<NOT .WORD-ACTION-DONE>
					<SET CONTINUE-FLAG <>>
					<COND (<OR <0? .ACTION-NOUN-ID> <=? .ACTION-NOUN-ID .NOUN-ID>>
						<SET FOUND-WORD T>
						<COND (<EVALUATE-CONDITIONS .I>
							<EXECUTE-COMMANDS .I>
							<SET .WORD-ACTION-DONE T>
							<COND (<NOT ,CONTINUE-FLAG> <RETURN>)>
						)>
                    )>
                )>
            )>
        )>
	>

	<COND (<0? .VERB-ID> <RETURN>)>

	<COND (.WORD-ACTION-DONE <RETURN>)>

	<COND (<OR <NOT .FOUND-WORD> ,AUTOGET-AS-SCOTTFREE>
		<COND (<HANDLE-GET-DROP .VERB-ID .NOUN-ID> <RETURN>)>
	)>

	<COND (.FOUND-WORD
		<TELL ,MSG-CANT-DO-THAT-YET CR>
	)
	(ELSE
		<TELL ,MSG-DONT-UNDERSTAND CR>
	)>	

This means that the default behaviour for games built with scott2zil is to handle AutoGet/Drop as defined in “The Adventure System” manual. But this behaviour can be changed by setting the constant AUTOGET-AS-SCOTTFREE to true before compiling.

The code in scott2zil is based on PerlScott and follows it pretty closely so if @pdxiv want to do something similiar in PerlScott you probably can find the corresponding code part to change easily.

2 Likes

Cool, I might just do that! (Doing that in PerlScott/tensodoct will have to wait a little while, until I finish exploring how hard it is to make an alternative to the ScottKit compiler from scratch.)

Also, I uploaded a horribly un-proofread version of the The Adventure System manual: https://github.com/pdxiv/LuaScott/blob/master/doc/The_Adventure_System_Manual_(1982).md

1 Like

An alternative to ScottKit… Fascinating…

Another mystery, that I stumbled over again while trying to make a ScottKit compiler, is if an “autogetable” object needs to have an entry present in the noun table. In The ADVENTURE Data Base Format Allan Moluf mentions that:

The name does not have to be a noun in the vocabulary for this pick up or drop to work.

ScottFree doesn’t agree with this, and the following game file refuses to let me pick up an object, because it’s name isn’t present as a noun in the vocabulary table:

 0 
 0 
 1 
 18 
 1 
 6 
 1 
 0 
 3 
 125 
 2 
 1 
 300 
 2 
 0 
 0 
 0 
 0 
 150 
 0 
 300 
 5 
 0 
 0 
 0 
 0 
 300 
 0 
"AUT"
"ANY"
"GO"
"NOR"
"LOO"
"SOU"
""
"EAS"
""
"WES"
""
"UP"
""
"DOW"
""
""
""
""
""
""
"GET"
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
"DRO"
""
 0 
 0 
 0 
 0 
 0 
 0 
""
 0 
 0 
 1 
 0 
 0 
 0 
"forest"
""
"There are some keys on the ground"
"There's nothing here"
"Ring of skeleton keys/KEY/" 1 
""
""
 416 
 1 
 0

ScottKit automatically adds the noun for every “autogetable” object to the noun table. Since ScottKit’s interpreter is based on ScottFree which requires this, it makes sense. Every game out there works fine in ScottFree, which implies that this behavior is “as designed”. At the same time, the number of nouns is a limited resource, and it would be nice to be able to save space in this table.

Oddly, The Adventure System Manual contradicts Allan Moluf’s statement:

The name of the object must be a noun in the list of vocabulary entries for the automatic pick up and drop feature to work. The object name must also be a primary noun, not a synonym.