ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Improving a parser

The place to chat about ideas, writing, this forum, or anything related to Interactive Fiction that isn't specific to ADRIFT.

Please also visit the Interactive Fiction Community Forum for further discussions.

Improving a parser

Postby The0didactus » Tue Nov 06, 2018 6:17 pm

So I'm pretty happy with what I'm hearing about my game, but one CONSTANT coda is that the parser is pretty bad. This is definitely the first game I've made with a robust parser component...and the next game I plan on making is not going to be parser based, but I want to vastly improve Six Silver Bullets based on the feedback I receive from the comp.

What's the best way to improve a parser once you've got a whole game already completed? Does anyone have any general tips on parsers?

I basically lobotomized ADRIFT's parser by disabling everything that wasn't absolutely essential. This was a kludge, but a necessary one because I didn't like the "tone" of ADRIFT's parser ("Pick up the gun" "Okay, you pick up the gun"/ "Jump" "you jump in place"/ "download the data" "I don't understand what you mean"....not good in a story where I want to create an overwhelming sense of doom and claustrophobia). Thus far nothing DISASTROUSLY wrong has occurred, but nearly every review points out, rightly, that the parser is really stingy, leading to a frustrating experience.

This is probably the result of most of my testers coming from far outside the world of interactive fiction, and I expect to make great strides just by going over the transcripts of players who have generously sent them my way...but anyone have other tips?
The0didactus
 
Posts: 78
Joined: Sun Mar 30, 2014 8:20 pm
Points: 30

Re: Improving a parser

Postby Denk » Tue Nov 06, 2018 9:55 pm

I think that some of the problems are caused by people playing standard parser games have expectations to the parser, even though you tell the player under help that they should type what you have written in ALL CAPS.

I just played your game again, trying to act more standard parser like and see what responses I got.
I think there are ways to improve your game without doing a complete rewrite:

Example 1:
[Reveal] Spoiler:
"Beep.
A satisfying click, the safe unlocks. You can OPEN THE SAFE now.

> open safe

If only you could.

> open the safe

Treasures within."

Here, OPEN SAFE should have been sufficient, the word THE should be optional.

Also, there is no meaningful response to OPEN SAFE or OPEN THE SAFE if you try it before you have used the right combination. Only a "Your training will not allow this."
The same is the case for OPEN DOOR and OPEN WINDOW.


Example 2:
[Reveal] Spoiler:
"> get white passport
You pick up the White Passport.

> get black

You must be going mad. You cannot do that.

> get passport

Your training will not allow this.

> get black passport
You pick up the Black Passport."

Since you have password protected your game, I cannot see how you have implemented the passports, but I can imagine(?) that you have put "BLACK PASSPORT" in the noun field, and not BLACK in the adjective field as intended. I come to this conclusion since the game did not understand "get passport".

Also, people who are used to playing inform games expect the parser to understand GET BLACK. You can easily make ADRIFT understand this as well, by adding BLACK as an extra noun for the black passport.


Example 3:
[Reveal] Spoiler:
"> sw
You move southwest.

The Alley

Narrow and filthy.
Obscene Diagrams. Filth. Garbage. A dumpster or two. Alley is a long curve, Northeast to Southeast. Someone has drawn on the street in chalk. Their message reads TIME IS A LOADED GUN. A message for you? For everyone?

Could SEARCH the alley. Might be more here than trash.
A metal door to the East. Locked. How can you tell? Could KNOCK. Who will answer?

> knock on door

If only you could.

> knock door

Your training will not allow this.

The City Clocktower rings out in the fog. Time grows short...

> knock

You knock.
A bolt slides behind the door.
You are greeted by the barrel of a shotgun. It does not fire...yet."

A standard parser player would type KNOCK ON DOOR or just KNOCK DOOR (verb + noun) so ON and DOOR should be optional.


Example 4:
[Reveal] Spoiler:
"I knew they were gonna send someone...didn't expect it would be you. Don't move. Say something good. You got about ten seconds beforeI blow your cute little head off."

Ask about THE GREEN AGENT
Ask about THE DEAD DROP
Ask about THE FINER THINGS IN LIFE
Ask about THE RESISTANCE
Ask about THE BANK
Ask about THE RED DOSSIER
Ask about THE ORANGE AGENT
NAME the Red Agent
BRIBE the Red Agent
SEDUCE the Red Agent (Difficult)
KILL the Red Agent
LEAVE

> ask about the green agent
I'm not sure who you are referring to."

Since ASK ABOUT is common in parser games I think many parser players would type something like ASK ABOUT GREEN AGENT, not just THE GREEN AGENT. So I think you should make ASK ABOUT and THE optional words.

Similarly (I haven't tested this though) the following commands should also work: NAME AGENT, NAME RED AGENT, NAME THE RED AGENT etc. The same for BRIBE, SEDUCE and KILL.



A probably more difficult case to fix:

Example 5:
[Reveal] Spoiler:
"> x note

Paper is a dull yellow. They call this ivory? Faint watermark. A serpent eating its own tail. Orobos. Infinity and extinction. Who sent this? You must find them.

> read it
(Absolutely Nothing)

You must be going mad. You cannot do that."

I have no idea how you made "IT" not work for the note and other objects. For some reason it works for the bag of diamonds. If you could figure out how you did it and then make the word IT work for all objects again it would be good.


I hope some of these examples are useful, since they represent similar situations elsewhere in the game. Example 1-4 should be easy to fix.
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 154
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 31

Re: Improving a parser

Postby David Whyld » Tue Nov 06, 2018 10:24 pm

I think rewriting the parser is the main issue here. As I understand it, v5 should handle things like GET BOOK, GET THE BOOK, GET THE BLACK BOOK, GET BLACK BOOK, etc without any issue, but when you start deleting everything non-essential you're risking running into a whole world of problems.

The other issue is that your testers weren't familiar with IF games whereas the target audience - the IFComp players - are. As such, no matter how good a job your testers did, they're not going to pick up things that your average IF player will. It's a bit like writing something in Chinese and then showing it to a non-Chinese speaker and asking him if it's okay. Whether it is or not, he's not going to be able to tell you.
David Whyld
 
Posts: 6772
Joined: Sat Dec 18, 2004 5:15 pm
Location: United Kingdom
Points: 25

Re: Improving a parser

Postby ralphmerridew » Wed Nov 07, 2018 2:34 am

In the specific context of Tingalan and Six Silver Bullets, I'd suggest you consider removing the parser completely and instead using a hyperlink-driven system such as Twine.

You're giving the commands the player can enter and want them entered back in verbatim. (Though I don't know if that assumption is invalidated later in the game, like in _The Ascot_.)
Bloodhounds can make you laugh and cuss in the same breath. They are endearing, faithful, and can sling drool ten feet in any direction. -- Virginia Lanier
User avatar
ralphmerridew
 
Posts: 2558
Joined: Fri Dec 13, 2002 11:56 pm
Location: Missouri
Points: 10

Re: Improving a parser

Postby saabie » Wed Nov 07, 2018 6:18 am

The0didactus wrote:I basically lobotomized ADRIFT's parser by disabling everything that wasn't absolutely essential. This was a kludge, but a necessary one because I didn't like the "tone" of ADRIFT's parser ("Pick up the gun" "Okay, you pick up the gun"/ "Jump" "you jump in place"/ "download the data" "I don't understand what you mean"....not good in a story where I want to create an overwhelming sense of doom and claustrophobia)
The simplest thing would have been to go through the standard library and modify each of these restriction messages to suit the style of your game rather than deleting them completely.
saabie
 
Posts: 935
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: Improving a parser

Postby The0didactus » Wed Nov 07, 2018 12:15 pm

saabie wrote:
The0didactus wrote:I basically lobotomized ADRIFT's parser by disabling everything that wasn't absolutely essential. This was a kludge, but a necessary one because I didn't like the "tone" of ADRIFT's parser ("Pick up the gun" "Okay, you pick up the gun"/ "Jump" "you jump in place"/ "download the data" "I don't understand what you mean"....not good in a story where I want to create an overwhelming sense of doom and claustrophobia)
The simplest thing would have been to go through the standard library and modify each of these restriction messages to suit the style of your game rather than deleting them completely.


Oh, I didn't delete them. I made a higher-priority task that triggered when you typed ANYTHING.
They are all still there.

I couldn't figure out where various commands lived in the standard library.

In the specific context of Tingalan and Six Silver Bullets, I'd suggest you consider removing the parser completely and instead using a hyperlink-driven system such as Twine.


Ralph is almost certainly correct here, but unfortunately I don't want to do a TOTAL overhaul.
The0didactus
 
Posts: 78
Joined: Sun Mar 30, 2014 8:20 pm
Points: 30

Re: Improving a parser

Postby ralphmerridew » Wed Nov 07, 2018 6:38 pm

There's an option to hide library items. Uncheck it.
Bloodhounds can make you laugh and cuss in the same breath. They are endearing, faithful, and can sling drool ten feet in any direction. -- Virginia Lanier
User avatar
ralphmerridew
 
Posts: 2558
Joined: Fri Dec 13, 2002 11:56 pm
Location: Missouri
Points: 10


Return to General IF

Who is online

Users browsing this forum: No registered users and 9 guests

cron