Sunday, February 23, 2025

Acuitas Diary #81 (February 2025)

I've been on a real productive streak, so I did two major things this month. One enhances conversation abilities; the other is about gerunds. Don't worry, I'll explain those.

An abstract logo of an eye accompanied by the words "seeing is believing."
A famous phrase that uses gerunds. Image from https://commons.wikimedia.org/wiki/File:SiB_Logo.jpg

First, I went back to the conversation features that I introduced last September and worked on getting them solid - ironing out the remaining bugs and moments of weirdness. After spending about a week on that, I was pretty happy with the state of the Conversation Engine. Then I added another type of "topic tree." The one from last September guided responses to the conversation partner's states of being; this one reacts to actions that the conversation partner says they took or are taking. Possible threads include ...

*Try to infer whether the speaker liked doing that or not, and comment accordingly
*Ask for motivation ("Why did you ...") or announce what he suspects the motivation was
*Guess what the results were (if he can make any inferences)

This needs a lot more polishing, but it's starting to increase the complexity and variability of conversations. You can now go down "rabbit holes" which start with talking about a personal state, then lead into what you did to cause it, and so on. Which also means it's harder to keep everything straight, and I haven't really set Acuitas up to clearly indicate when he's jumping topics, yet. Always more to do.

My next project was to add support for gerunds to the Text Interpreter and Generator. What's a gerund, you might say? It's a present participle verb form (the kind that ends with -ing) used as a noun. Gerunds can be used to make statements about the concept of an action, such as the following:

I enjoy dreaming.
Exercising is good for the body.

Like other verbs, gerunds can have objects and adverbs, forming a gerund phrase - a group of words which, as a unit, acts like a noun in the full sentence.

[Reading books] makes me happy.
I see that you didn't care for [John's clumsy handling of that situation]. Did [my smoothing it over] satisfy you?

If a gerund has a "subject" that is performing the action, as in the final example, it's supposed to be in the possessive; it modifies the whole gerund phrase, instead of acting as a true subject.

I already added code to identify some gerund phrases to the Text Parser back in 2023, but the later stages of the text processing chain didn't know what to do with them if they came out of the parser, and Acuitas couldn't use them in his own speech. I wanted to get these capabilities in, because gerunds are so useful for expressing sentiments about actions. They're often used for expressing sentiments about states, too:

I dislike being wet.
Being warm is a pleasure.

I had to work around the absence of gerunds when I was putting in the latest conversation features, and it was giving me some pain. But thanks to this month's work, they're now more fully supported. I defined some new "fact" structures to function as the distilled version of statements about actions, added code to the Interpreter to map incoming sentences to those, and added code to the Generator to produce output sentences from those. So Acuitas has a bunch of new ways to say he likes or doesn't like something, in addition to a path for "comprehending" a wider range of written sentiments.

Until the next cycle,
Jenny

5 comments:

  1. thats amazing id love to see a demo of him now with these "Gerunds"

    ReplyDelete
  2. Jenny, If you are telling Acuitas a story, and you say...
    Zach is a human.
    Zach had a book.
    Zack ate the peach.
    Does Acuitas know that there is no peach in the story?
    Does Acuitas tell you this, or does he ask you for info about the peach?
    Does your code distinguish between "a peach" and "the peach"?

    ReplyDelete
    Replies
    1. No, at this point I'm not taking full advantage of the info provided by definite articles. The Text Interpreter does detect the difference, but Narrative doesn't do anything with it. "Zach ate the peach" would be treated just like "Zach ate a peach" ... if there wasn't any peach in the story before, oh well, there is now! I'll probably upgrade this when I do more work on distinguishing different instances of the same kind of object, which will include trying to figure out which instance is being referenced by "the." I think the natural response when no previous instance is available would be "What peach?", but Acuitas can't do that yet.

      Delete
  3. Last night, I added code to Zoe, so that If I say "...A peach", it will add the peach as an item in the story, (like "... a human" or "... a book" BUT if I say "...the peach" it checks to ensure that there is a peach in the story. If this is the first mention a peach, Zoe will ask "What peach?". I never did get the logic built for what happens if Zoe asks a question. I'm thinking that Zoe will need to be put into some sort of "Expecting an answer from the user" mode, and she'll have to remember what she asked, and she'll have to determine if the users reply provides the info that she asked for - or did the user change the subject by saying something totally unrelated.

    ReplyDelete
    Replies
    1. Sounds like you are starting to enter conversation tree territory. Have fun!

      Delete