Author Topic: Looking for help creating a language  (Read 634 times)

Offline boxcartenant

  • New Linguist
  • *
  • Posts: 1
Looking for help creating a language
« on: January 13, 2020, 04:37:10 PM »
Hi all,

This is for a project I've been working on for quite a while. I'm making a sort of town simulator. I don't expect my AI to pass any turing tests, but I have planned out a pretty unique experience/memory system to generate AI with an emphasis on accomplishing objectives by manipulating other characters in game, by conversing about real or falsified memories. I'm almost done with the basic UI for this, and I'm at the point where I should start thinking hard about how the chat will work, mechanically.

Now, my AI has things to say, but it doesn't know how to say them. I don't want to try to encode a human language for use in this game, so I'm hoping I can come up with something simple that both the player and the AI can understand -- a pictographic language, maybe. It doesn't have to have the same grammatical structure as English (in fact, for immersion, I think it would be better if it felt just slightly foreign). I'm just having a hard time wrapping my head around the task. I don't have much experience with linguistics.

What I have right now are a bunch of types of statements that I know I want the language to be capable of expressing. For example:

   - Requests for information
      ○ Who did X thing to Y person and when?
      ○ Where is X person/thing?
      ○ What does X person think about Y person/thing?
      ○ What are the dangers in X place?
      ○ What are the hidden stats of X person/thing?
      ○ Who does X job (profession)?
      ○ What job (profession) is performed by X person?
      ○ Why did X person do Y action? (responses could be 'intent to gain Z stuff', or 'obeying a request from Z person')
   - Requests for action
      ○ Go to X place (Go in X direction. Go to X coordinates. Go X distance in Y direction.)
      ○ Give X thing to Y person
      ○ Tell X info to Y person
         § [see requests for information]
      ○ Perform X action to Y person
      ○ Acquire X info/item and give it to Y person
         § [see requests for information]
      ○ Tell X person to [perform any of the above]
      ○ Build X structure in Y location
      ○ Demolish X structure/target
      ○ Find X object (Find object satisfying X criteria. Find object satisfying X need)
   - Requests for change of state
      ○ Trust/untrust X person
      ○ Serve/follow X person
      ○ Avoid X person
      ○ Help X person perform Y action
         § [see requests for action]
      ○ Get X job in Y city/faction
      ○ Marry X person
      ○ Protect X person/thing
      ○ Acquire X skills
      ○ …[optional second clause]… with goal of…
         § Acquiring Z [wealth/item/relationship/reputation/justice] to [give to/split with] W person
   - Simple info [each statement includes assertion of confidence, 0-100%]
      ○ X person perform[past/present/future, optional delta t] Y action[see above actions] to Z target in W place
      ○ X person has/lacks/needs Y item(s)
      ○ X structure belongs to Y person
      ○ X person knows the answer to Y question
         § See requests for information
      ○ X person has Y stats
      ○ X person is[past/present/future, delta t] in Y location

Now, for the purpose of this simulator, there are no perfect references to "physical" objects, and most "hidden" statistical data about an object can only be inferred by the AI by certain types of observations. When the AI wants to mention a person, I was thinking I could just show an icon in the chat, which the player can mouse-hover over to show all of the information which that AI is sharing about the person. For example, the AI might know the person's name, and that the person wears a red shirt, and the AI's reference to that person will just be those details, but the AI can't know the person's hidden stats directly. So, "X person has Y stats" could potentially just be the same icon, and when the player mouse hovers over it he would see the name, the red shirt, and a series of statistical observations (faction loyalty, wealth, age, strength etc) with confidence values.

That information was to help you guys get an idea for what's going on, but beyond that I feel like I'm hitting a mental road block and I need some help taking the next step.

How do I begin to formulate a sentence structure to capture these ideas?
How do I begin to itemize all of the words or conjugations that I need to include?
Could you guys point me toward some good reference material on the subject?

Thanks a bunch!
« Last Edit: January 13, 2020, 04:44:40 PM by boxcartenant »

Offline Daniel

  • Administrator
  • Experienced Linguist
  • *****
  • Posts: 1973
  • Country: us
    • English
Re: Looking for help creating a language
« Reply #1 on: January 13, 2020, 04:54:19 PM »
For designing a language from scratch, you'd probably get better information and help from a conlanging forum.

Just as a general response, whether using English or another language, it's actually relatively easy to generate sentences especially if the follow relatively simple patterns. You can use simple templates ("Where is ____?"), or you can layer them to create a somewhat sophisticated grammar-- by about 100 rules of this type you would be able to cover an extensive portion of the core grammatical properties of English or another language. This is much easier than the other problem, which is understanding input in the language, whether that's English or anything else. So if you just need to generate sentences your AI can say, that's not too hard. If you actually need to produce a conversation where the player can ask an open-ended free-form question to the AI, that's going to be much, much harder, mostly because you won't be able to easily control the phrasing or range of possible input. (It would still be relatively easy to parse something like "Where is ____", but much harder if you don't restrict/train the player to only phrase questions in very limited ways like that. And even though it's easy to produce even much more complicated grammatical forms by layering such rules, it would be much harder to parse them and connect them to relevant meanings to guess what the player meant.) If you do need a back-and-forth conversation, you could try to design a minimal language with strict limits on the possible sentences such that, for example, there are a maximum of three words in any given question, and that could be easier to work with. Something like what has been used with some animals, for example, such as showing pictures to dolphins. Arrange up to three cards/pictures in a certain way to express a meaning. That sounds sort of like what you suggested. But beyond that will be very complicated, especially in terms of understanding.

If you really want to learn about Natural Language Processing (and Computational Linguistics in general) this would be a good place to discuss it, but it sounds like you're explicitly wanting to avoid that (which is fine). So looking elsewhere might be better-- either a conlanging website, or somewhere for game design specifically.
Welcome to Linguist Forum! If you have any questions, please ask.