latitudegames / AIDungeon

Infinite adventures await!
http://www.aidungeon.io/
MIT License
3.18k stars 555 forks source link

[BUG] Action token and newlines are not added for speech #227

Open Herohtar opened 4 years ago

Herohtar commented 4 years ago

🐛 Bug Report

Describe the bug When entering an action (ie, walk across the street) it is formatted to have the following form:

\n> You walk across the street.\n

However, when entering speech like "I'm going over there" it only gets formatted like this:

You say "I'm going over there"

Expected behavior Action formatting should be consistent for the model to handle them appropriately. Speech actions should have the newlines and > added just like non-speech actions:

\n> You say "I'm going over there"\n
Sporking commented 4 years ago

Also, speech should have a period added inside the quotes, as per normal English rules, unless the user typed a period themselves. This might have an effect on the AI, since it would match more text from typical dialog in books that might have been part of the AI's non-adventure-game-related training set.

Also, if the user's speech ended with a question mark, it might be better to say "You ask", and if it ends with an exclamation point, it might be better to say "You exclaim".

Also, it would be worth experimenting a bit to determine whether this form:

You say "That looks like a dragon."

produces better results from the AI than this form:

"That looks like a dragon." you say.

or this form:

"That looks like a dragon," you say.

since the latter forms are somewhat more natural English spoken dialog (as would be typical in a book, for instance), while the first form might be more typical in some text adventure games.