AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Preventing responses from erasing
 
 
u: (films) ^keep() What about film media?
  
a: (comedyDumber was a good comedy.
  
a: (titanicIt was sad.
  
a: (comedyZoolander was bad

The above code builds okay but can only run once before not coming up with a response again. How do i fix this? I can’t make it a gambit since I want it to respond specifically to “films”.

I have two matches for comedy in there so that when films is called again it can come up with a different response. That should work right?

And is it possible to randomize the rejoinders for matching patterns so they don’t progress in linear fashion?

I suppose one way would be to have the entire thing inside a topic for films as a gambit instead of union, just wondering if it can be done differently.

 

 
  [ # 1 ]

having two matches for rejoinders doesnt help you. It will always pick the first one. THEN, when it tries to generate output, it will be blocked because repeats are not enabled so it has already said something recently.  You’d need to do:
a: (comedy) [Dumber was a good comedy][Zoolander was bad]

 

 
  [ # 2 ]

But the strange thing in that code is that the build accepts the ^keep() statement but when I type “films” again it jumps to a gambit. I’m sure it would work again if i converted it to a gambit but then I wouldn’t be able to use it to respond to a “film” match.

I’m still really new to CS but I get the feeling that anytime I want to go into depth with a match to what the user inputs, I will need to use a topic to match and gambits within that topic. Or am I mistaken? Is it possible to have a-q rejoinders on a ?/s/u rule and return to that rule once it has been used?

 

 
  [ # 3 ]

Oh wait, i realize not having ^repeat in there is why it was not going back. my bad. sorry.

So, the only difference between keep and repeat is that repeat allows one to repeat previously spoken output while keep does not but keep will allow elements like functions and variables to run right?

 

 
  [ # 4 ]

I guess that answers my question about topics and ?/s/u rules too. It is possible to use multiple rejoinders there to a matched input but it would most likely be more fixed that a topic’s potential.

 

 
  [ # 5 ]

keep says dont erase the top level rule, so it can be used again (but keep on a topic only does responders) and repeat says output that is generated is allowed to repeat prior same output within the last 20 outputs.

 

 
  [ # 6 ]

didnt understand all your musings about multiple rejoinders

 

 
  [ # 7 ]

That’s fine. This forum is a godsend to me since I was having trouble with the documentation. My next goal is to learn more about facts and functions so I may post more on that. Until next time.

 

 
  login or register to react