Official Codex Discord Server

  1. Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.
    Dismiss Notice

procedural dialogue generation?

Discussion in 'Codex Workshop' started by Twiglard, Feb 21, 2019.

  1. Twiglard Savant

    Twiglard
    Joined:
    Aug 6, 2014
    Messages:
    970
    Location:
    wild pale yonder
    Can state-of-the-art natural language processing feasibly be used to generate dialogue, at all?

    Of course, one could go for multiple versions of the same text, using different phrasings for the working class, nobles, bandits and use placeholders. But this is the old approach that doesn't scale well and produces bad results anyway.

    Are there any particular papers on generative NLP I could use? Best if a solution is purely symbolic, or at least hidden markov model-based. Neural networks are opaque after training :(
     
    • No No x 3
    • hopw roewur ne hopw roewur ne x 2
    • Funny Funny x 1
    ^ Top  
  2. Ysaye Learned

    Ysaye
    Joined:
    May 27, 2018
    Messages:
    404
    Location:
    Australia
    Probably not yet, certainly not enough to meet the stern requirements of a codexer's expectations of what dialogue should be provided as to be described as adequate.
     
    ^ Top  
  3. Gunnar Savant

    Gunnar
    Joined:
    Jul 10, 2016
    Messages:
    740
    Caves of Qud guys use procedural generation for building histories and also to create text in books. That sounds much simpler to do than procedural speech generation. And it sucks. So probably not.
     
    ^ Top  
  4. Bester ⚰️☠️⚱️ Patron Vatnik

    Bester
    Joined:
    Sep 28, 2014
    Messages:
    6,920
    https://blog.openai.com/better-language-models/

    Read the example that their model produced:

    Of course it's one thing to write dialogue through AI, it's another to actually understand the implications of what is being said, so it can affect the world accordingly.
     
    • Thanks! Thanks! x 1
    • Informative Informative x 1
    ^ Top  
  5. Tigranes Prestigious Gentleman Arcane

    Tigranes
    Joined:
    Jan 8, 2009
    Messages:
    9,401
    Yeah, the new OpenAI thing is an example of something you could use to write dialogue in the future.

    The problem for fantasy/fiction games is to have the right training data that they can talk about Quds and Ballsuckers instead of Humans and Dogs, which isn't as simple as just exchanging the names. Possibly for Forgotten Realms it could be done, but you wouldn't really have a coherent lore, just a sprawling mass of plausibly FR/D&D sounding nonsense (which might be all you want).

    You'd also be assigning each specific piece of dialogue to this AI, reading it through, then putting it all together, meaning a fair amount of 'managerial' work involved.

    (Or, instead, you could use GPT-2 above to shitpost on the Codex...)
     
    ^ Top  
  6. MajorMace Arbiter

    MajorMace
    Joined:
    May 6, 2018
    Messages:
    1,089
    Location:
    Souffrance, Franka
    Procedural degeneration*
     
    • Brofist Brofist x 2
    • Participation Award Participation Award x 2
    ^ Top  
  7. Burning Bridges Enviado de meu SM-G3502T usando Tapatalk

    Burning Bridges
    Joined:
    Apr 21, 2006
    Messages:
    24,240
    Location:
    Tampon Bay
    You can apply procedural generation to any form of art, it comes out more or less as

    [​IMG]
     
    • Brofist Brofist x 4
    • incline incline x 1
    • Yes Yes x 1
    • When words are not enough When words are not enough x 1
    ^ Top  
  8. MRY Prestigious Gentleman Wormwood Studios Developer

    MRY
    Joined:
    Aug 15, 2012
    Messages:
    5,011
    Location:
    California
    Emily Short has written extensively on this topic, and collected a large variety of links as well. So I'd recommend her blog: https://emshort.blog.
     
    • Brofist Brofist x 1
    • Thanks! Thanks! x 1
    • Prestigious Prestigious x 1
    ^ Top  
  9. laclongquan Arcane

    laclongquan
    Joined:
    Jan 10, 2007
    Messages:
    1,868,188
    Location:
    Searching for my kidnapped sister
    Dear god no!

    OP's bright idea can be expressed like this "can this code generate more shitty dialog for gamers to ignore?"

    Game Writings are serious feature that nothing/noone can fix once it's written. You NEED actual writers to do it, and go through it, to make halfway decent writings for gamers to tolerate. Not auto-generated texts.
     
    • Brofist Brofist x 3
    • Disagree Disagree x 1
    ^ Top  
  10. Twiglard Savant

    Twiglard
    Joined:
    Aug 6, 2014
    Messages:
    970
    Location:
    wild pale yonder
    Within a full-blown RPG, this would be an awful idea. It's different for a procedurally-generated world with NPCs given tasks by priority scoring code. I'm worried that doing variations would lead to combinatorial explosion in the end.

    Maybe dialogue could be Morrowind-style as a substitute, without paying any attention to tone or language used. Neutered language like in MW is easier to manage and keep from being totally awful.

    Overall this is probably harder than keeping NPC towns from breaking down for stupid reasons.
     
    • hopw roewur ne hopw roewur ne x 1
    ^ Top  
  11. redactir Artist Formerly Known as Prosper

    redactir
    Joined:
    Jul 16, 2018
    Messages:
    696
    The good and bad writing comments are offtopic. It's like worrying about the font being pretty or stylized.

    Here's all you need.
    item 1) The discussion about dialog itself. The choice of one thing over another, and reference to the past.
    item 2) A working live mapping of a table of dialog options to external conditions.
    item 3) A video game which exists in the first place. It serves the role to destroy the conversation or shape events the table refers to in item 2.
    item 4) A constant mini-game for the dialog to further restrict the dialog. The life and death of why some things if true are talked about over others which are true. (usually thought of as the agency component)
     
    • Informative Informative x 1
    ^ Top  
  12. rusty_shackleford Arcane

    rusty_shackleford
    Joined:
    Jan 14, 2018
    Messages:
    20,690
    Dwarf Fortress does this to a much greater extent. It's pretty alright, but it's also heavily constrained and guided. It also simulates the lives of a lot of "great" figures which add to the history.
     
    ^ Top  
  13. J1M Arcane

    J1M
    Joined:
    May 14, 2008
    Messages:
    10,873
    If the dialog is meaningless, maybe don't include it. Games these days have too much writing (possibly because that's the only thing diversity hires can do).
     
    ^ Top  
  14. adrix89 Arbiter

    adrix89
    Joined:
    Dec 27, 2014
    Messages:
    694
    Location:
    Why are there so many of my country here?
    It depends on what you need to use it for.

    If you want it in a completely procedural sandbox world then it can work if its role is to present information.
    Information is just serializing data of the state of the world at the moment and formatting it a bit and adding a bit of fluff so it's not that complicated. Dwarf Fortress is an example that presents a butload of information.

    For dialog itself between two characters you are better of with abstracting it into a some kind of mini-game, like a social combat game or like The Sims.
    When you need a function just implement the function, like barter, bribes, orders, ask for rumors, and other kind of actions and verbs. In 4X games this kind of Diplomacy options are common.

    For NPC to NPC simulation you only have to take into account information propagation for things like rumors,events, relationships and reputation.

    You can also go more in depth and use a restricted scripting language to make custom responses where the system is constrained enough that the AI won't have much difficulty, basically it's sorta like a mini-game with a scripting language.
    If you look at how this own forum uses the rating system with the brofists and smiles is an example system like that.
     
    Last edited: Mar 11, 2019
    • Brofist Brofist x 1
    • incline incline x 1
    ^ Top  
  15. redactir Artist Formerly Known as Prosper

    redactir
    Joined:
    Jul 16, 2018
    Messages:
    696
    I like what adrix said. I think this is maybe the most important topic of this century.

    A long time ago a men asked, what would it take for every npc to capably discuss what it should from just observation? How do we capture the reactivity if NPC's don't know things innately?

    First they must be able to understand what's out there within some proximity.

    For example what is around you as you move through the game?

    Games might attach tags and keywords to help locate certain object types and identify their roles. This is helpful to the programmer/scripter actually.
    Most impressively we could just pile on the tags which amounts to more detailed information on what is looked at.

    Anyone can do this work after the world is built.

    ==


    Assuming:
    a) The npc can pull up information from any nearby objects meeting certain descriptive categories
    b) The npc can inspect the properties for specific states or ranges of values

    You can immediately begin writing reactivity in the dialog which includes referencing actual things that are happening.

    ==

    Memory is a problem. Keeping a log of what happens around an NPC, for every NPC, can be a problem. What's worth knowing, how long do you keep that information available?
    I'd recommend aim for short term reactivity.

    ==

    To makeup for shortcomings in memory, NPCs can be given a mini-game to play. Sort of sim city meets the old school text-only adventures. This runs in the background.
    All the NPCs should play in this mini-game, so it appears they have the similar record of events and so have reactions that are logically consistent.
    ==

    redacted
     
    ^ Top  
  16. adrix89 Arbiter

    adrix89
    Joined:
    Dec 27, 2014
    Messages:
    694
    Location:
    Why are there so many of my country here?
    A scheme you can use is to just have the world state and maybe a compressed history log and just let NPCs selectively interpret that data based on their own personality and context.
    That way you only have the global data and its not dependent on the number of NPCs.

    NPC "Awareness" is just the filter and selection algorithm so it's not that much of a problem.
     
    ^ Top  
  17. redactir Artist Formerly Known as Prosper

    redactir
    Joined:
    Jul 16, 2018
    Messages:
    696
    Context is deceptively NOT simple. But if the context is the NPC's current awareness of what's around them, personality still needs to be based in a number of things.

    This is where mods and games get separated. There are no assurances on what is supported.

    Further if the personality is part of the solution, then our procedural dialog generation doesn't have a general solution.
     
    ^ Top  
  18. spectre Arcane

    spectre
    Joined:
    Oct 26, 2008
    Messages:
    4,063
    Well, he's a pretty good example what can happen when you do have procedural dialogue generation.
     
    ^ Top  
  19. Mangoose Arcane Patron

    Mangoose
    Joined:
    Apr 5, 2009
    Messages:
    18,525
    Location:
    I'm a Banana
    Divinity: Original Sin Project: Eternity
    When I read the topic title I was thinking, "No, you don't want procedural generated dialogue."
     
    ^ Top  
  20. redactir Artist Formerly Known as Prosper

    redactir
    Joined:
    Jul 16, 2018
    Messages:
    696
    Truth be redacted, most human crafted dialog can be completely trounced in dialog sophistication, wit, and variety in a single session of scripting.
     
    ^ Top  
  21. Twiglard Savant

    Twiglard
    Joined:
    Aug 6, 2014
    Messages:
    970
    Location:
    wild pale yonder
    Thanks guys. :salute:

    Yeah. I was hoping for some NLP breakthrough research. Go figure. The neural network stuff is useless for me given it doesn't lead to any formalism.

    It's a good idea in principle. I have reservations with regard to DF's generated text. It's poorly formatted, overly verbose, and then there are these absurd sculptures.

    I wonder if he's in-character or does he really need help.
     
    ^ Top  
  22. redactir Artist Formerly Known as Prosper

    redactir
    Joined:
    Jul 16, 2018
    Messages:
    696
    Help? What help is there?

    If you haven't been irradiated by the abyss you haven't stood long enough at the precipice.

    Jumping over isn't the same as knowing what's down there. Give me procedural dialog over procedural cowardice any day.
     
    ^ Top  
  23. Twiglard Savant

    Twiglard
    Joined:
    Aug 6, 2014
    Messages:
    970
    Location:
    wild pale yonder
    What makes you think I haven't?
     
    ^ Top  
  24. redactir Artist Formerly Known as Prosper

    redactir
    Joined:
    Jul 16, 2018
    Messages:
    696
    How many stat points have you put into procedural dialog resistance?
     
    ^ Top  

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.