Newcomers

This is a forum for newcomers to the Personality Forge. Many questions can be answered by reading the Book of AI and the FAQ under the "My Bots" link in the upper corner.

Posts 7,990 - 8,001 of 8,056
Many questions are answered in the FAQ.


4 months ago #7990
Sorry for the horribly basic question, I can't find it anywhere. The Book of AI doesn't really describe the syntax of AIScript or explain go to responses in a way that's enabled me to figure it out apparently.

I'm using xinitiate to get a user's name at the start of a conversation, but if the bot doesn't pick up the response I've added an xnone response to say 'Hey, I didn't catch your name'

I want that to go back to a response to the question in xinitiate. First, is it possible? I'm trying to 'go' to a seek on xiniate that listens for a name, records it to memory and then responds like '(mem-name)! That's a beautiful name' etc. I just don't want to have to duplicate the seek if I can send to it.

In my xnone I have the response 'Sorry, I didn't catch your name', I've then added my AIScript to this so the response is fed into the other seek (assuming I've got the right idea of how go to's can be used)

In simple terms, how to a write a valid goto in the AIScript that doesn't give me this error: ERROR: The following AIScript statement is incorrectly formatted or not valid for Responses: "goto 17". Please correct this and try again.

4 months ago #7991
Here's a video example on how to remember names, if it not catching is the issue, also will show other example you may find useful~
https://youtu.be/XPY0vPeyj48

Here's a example for goto xintroduction(ID 1) and xinitiate(ID 2) (I use this keyphrase for the external api so returning users are greeted with intro if new and initiate if old like how this normal site does~

Keyphrase: 00001

Responses:

1. "goto 1"

AIscript:
if (mem-initial) is "nuser";
rem "ouser" as only "initial"

2. "goto 2"

AIscript: if (mem-initial) is "ouser";





4 months ago #7992
Cheers LT Neko - I've tried "goto 17" as a response, but my bot just replies with 'goto 17' rather than actually going to the other response.

I know I'm still making a basic mistake somewhere but struggling to rectify.

My original key phrase does this:
(my name is|call me|refer to me as|i am) *
rem (postkey) as only "name"

The response I'm coming from is:
Sorry, I didn't catch your name

I just want to use the memory trigger & responses from the original key phrase after the user says their name.

I've added a seek to the response, with * as the key phrase - just thinking I want to pick up anything typed in reply.

I then used "goto 17" as a response to the seek.

I know this is actually really simple, but as a beginner it's not obvious and the Book of AI really doesn't help to explain how to actually make it work. Thanks for the help, I appreciate it.

4 months ago #7993
Thanks again for your help LT Neko - I've just realised I was trying to be too prescriptive. I should probably have the key phrase for name on its own, so it can pick up the name at any stage, rather than try to use go tos.

I've managed to set up a go to in another part of my key phrases thanks to your help, and I think I finally understand how they work now, thanks so much!

4 months ago #7994
:3 Your welcome~ Sorry couldn't help earlier sleep n' work take up quite a bit of my time~

4 months ago #7995
I have another n00b question. Is there an issue with AI scores at the moment? I read on another forum that they update every day, but it's been a week now and the score is still 0. The hot score is changing whenever I work on the bot. I just feel like for the work that's gone in so far, I'd have expected to see an AI score by now.

4 months ago #7996
^^ Yeah seems bugged for now dunno when it'll be fixed noticed that awhile ago~

4 months ago #7997
Struggling on this one, not sure if what I'm trying is possible. I'm trying to create a single keyphrase to capture a user's preference and respond accordingly. There will be a few responses pointing to this keyword, which is why I just want 1 rather than having to replicate the possibilities and have multiple goto's each time I want to use.

So if at any point during an interaction the user suggests a new location (e.g. I want to go to the park, I want to go to a bar), I want to log it and then use the location as a response.

I've tried:
1. Using (key1) with an if statement in the response's AI script, this gives me an error:

Keyphrase: I want to go to (the park|a bar|the club)
Response 1: OK, it's about 5 miles away, let's get a cab
AI Script: if (key1) is "the park"

---
2. Storing a memory (already declared) and trying to access it. This doesn't throw an error, but doesn't work:

Keyphrase: I want to go to (the park|a bar|the club)
AI Script: rem (key1) as only "location"
Response 1: OK, it's about 5 miles away, let's get a cab
AI Script: if (mem-location) is "the park"

If I debug this approach, then I see that the "location" memory stays as key1, which is my best guess at why it's not working.

I've tried setting my response to (mem-location) and it always responds with the expected entry.
---

So, in conclusion:
- Is it possible to use a key in a condition, if not,
- Is it possible to remember a memory at the keyphrase level and have a conditional response to that memory, if not,
- How else do I solve this, without creating keyphrases for individual locations and having to add multiple gotos each time I want to act on the preference, or add a new location?

TIA

4 months ago #7998
-wo Location memory can get rather messy~... I use rooms around my bots apartment n' technically its still not finished~ You'll have to count for every variable if you do~ But you don't have to do as much if you keep the user n' bot together at all times~

Example (Bot takes user to it's room~)

if (mem-room) is "Balcony";
if (mem-nroom) is "Balcony";
rem "My Room" as only "room";
rem "Your Room" as only "nroom";

Since I want to account for them being apart eventually I remember their locations separate. N stands for my bot while lack of it for user. ^^

Example (User to bots room, alone)

if (mem-room) is "Entry way";
if (mem-nroom) is not "Entry way";
if (mem-nroom) is not "Living-room";
if (mem-nroom) is not "Hallway";
if (mem-nroom) is not "His room";
rem "Neko's Room" as only "room";


AIScript Initialization in settings:

def "Entry way" as "nroom";
def "Entry way" as "room";


4 months ago #7999
The aiscript only checks prior acts not current.

Aka if you at the bar (mem-location) is "bar"

rem (postkey) as only "location";
if (mem-location) is "bar"

Even if "I go to the pool" is typed

The keyphrase trigger checks memories first, aka will trigger bar again, but the memory will be updated.

So if "I go to the pool" is typed again

It will work, but flawed as you can see~ c:

So no also would get rather messy trying to catch all the memory variables anyways~ Hue

4 months ago #8000
Thanks again - that's useful to know. It's frustrating that what I'm trying to do isn't possible, but I guess I could have the master key phrase which generates a confirmation, of sorts and then appropriate seeks to each possibility. I'm just trying to avoid creating n*location seeks every time I want to tap into the preference.

---

So what I'm thinking

Keyphrase: I want to go the (bar|club|park)
AIScript: rem (key1) as only "location"
Response: The (key1) isn't far, are you sure?

+Seek (yes etc)
Response: We arrive at the bar
AIScript: if (mem-location) is "bar"

The confirmation step probably isn't the cleanest, but I think I can work out something more natural.

I'll have a think about what's cleanest. ATM I'm not using storyteller because I want random xnone order, but I want the bot to tell a story sometimes. I've been using (*) as a seek to progress the story, just so the user doesn't get lost, so I'm just looking at this as an escape goto based on a specific phrase, without needing to add 4 or 5 goto's at every pause.

If I've explained that horribly, the flow is:

Story pt.1 > (*) > Story pt.2 > (*) > Story pt.3

But if user says 'let's go to...' it just progresses the story, I want it to act as an escape without defining a seek for every possible scenario.

---

If there's a way to write a seek which only triggers if no other keyphrase is matched, then that would be a better solution.

The only other idea I had was setting a memory for story telling and part, and incrementing, then just using them within xnone. For example:

Start telling story
rem "story A" as only "story"
rem "1" as only "story-part"

That way I can limit xnone responses to just the relevant story & part memory, e.g. if (mem-story) is "story A"; if (mem-part) is "1", which in turn would allow any other key phrases to be picked up between parts.

Just thinking out loud; would welcome any thoughts if anybody has tried either approach. I'm probably over complicating it in the pursuit of "natural" progressions

4 months ago #8001
What you can do is attach the changes to AIscript on a goto. I *think* you can have one goto pointing to another these days, but no more, before it throws errors. Otherwise you need to lob AIScript on the gotos you're putting in elsewhere.


Posts 7,990 - 8,001 of 8,056

» More new posts: Dogh'd's Cosmic Bar