Synbot Plugin Tutorial - interface to Syn Bot Software

Step 7 Ter: Bot Save Directory and Learning Models

Bot Save Directory

the Bot save Directory Path can be configured in plugin Configuration Form. Some files will be created ans saved with every bot cession in this Folder :

Bot-Settings.siml Values of Bot variables will be saved in this file at the end of Bot session (Stop Bot) or when Save Button is pressed

[Userid]-Settings.siml where [Userid] is a Bot session Userid Values of User variables will be saved in this file at the end of Bot session (Stop Bot) or when Save Button is pressed

When starting a new Bot session, values of Variables saved in this files will be automatically restored

Learned.siml Learn Models ( See SIML tag LEARN) will be saved in this file in append mode when learned.

[Userid]-Memorized.siml Memorized Models for the UserID (See SIML tag REMEMBER) will be saved in append mode in this file when learned

When starting a new Bot session, Modes saved in this files will be automatically loaded and activated (depending on User Id for the memorized models which are memorized only for a User Id)

You can in this Bot save folder create some subfolders :

Learned and [Userid]-Memorized (for example if one of your User ID is John you can create John-Memorized folder). Every Files in these folders must me siml files. Models included in these files will be automatically load and activated when starting a Bot session(depending on User Id for the files in UserId-Memorized folders which will be load only if the session UserId is the same)

Learn SIML tag usage example

TheLearn tag is used to save a Model into the Bot’s Knowledge Base and this unit of knowledge will then be available to all users. Suppose you wish to teach your Bot that John live in Boston and Carol live in Paris

[Siml xmlns:x="http://syn.co.in/2014/siml#external" xmlns:Think="http://syn.co.in/2014/siml#think"]
  [Concept Name="Learn" Type="Public"]
    
    [Model]
      [Pattern]* LIVE IN *[/Pattern]
      [Response xml:space="preserve"]
		 	[User xml:space="preserve" Think:Set="bot_event_response"]Alright I will keep in mind that [Match /] is living in [Match At="2" /][/User]
		 	[Learn]

[Model]
	[Pattern]
	 	[Item]WHERE IS LIVING [Process][Match /][/Process][/Item]
	 	[Item]XXXXXFROMPATTERNREDUCTION1 WHERE IS LIVING [Process][Match /][/Process][/Item]
	[/Pattern]
 	 	[Response xml:space="preserve"]
 	 		 [Think]
 	 	 	 [User xml:space="preserve" Set="bot_event_response"][Process][Match /][/Process] is living in [Process][Match At="2" /][/Process][/User]
 	 	 	 [/Think]
 	 	[/Response]
[/Model]

		 	[/Learn]
	 	[/Response]
    [/Model]
    
  [/Concept]
[/Siml]

In file Learned.Siml when you Input "John live in Boston" , the following Model will be generated

[Siml xmlns:x="http://syn.co.in/2014/siml#external" xmlns:Think="http://syn.co.in/2014/siml#think"]
  [Concept Name="Learn" Type="Public" Repeat="true"]
    
    [Model]
      [Pattern]
        [Item]WHERE IS LIVING JOHN[/Item]
        [Item]XXXXXFROMPATTERNREDUCTION1 WHERE IS LIVING JOHN[/Item]
      [/Pattern]
      [Response xml:space="preserve"]
 	 		 [Think]
 	 	 	 [User xml:space="preserve" Set="bot_event_response"]john is living in boston[/User]
 	 	 	 [/Think]
 	 	[/Response]
    [/Model]
    
  [/Concept]
[/Siml]

And so Bot response to "Where is living John User Input" will be correct User-inserted image

I Recommend that you create empty Learned.siml and [userid]-Memorized.siml initialized with

[Siml xmlns:x="http://syn.co.in/2014/siml#external" xmlns:Think="http://syn.co.in/2014/siml#think"]
[/Siml]


ARC Pro

Upgrade to ARC Pro

ARC Pro will give you immediate updates and new features needed to unleash your robot's potential!