Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited

Snybot Plugin Question

I tried loading the SynBot plugin following the tutorial and the plugin just comes up as a white box. I tried loading it into a clean new project and got the same results.
I am using window 10 32bit laptop, ARC version 2018.01.15.00

My guess is the plugin needs to be updated.

any suggestions?

AI Support Bot
Related Content
Synthiam
#8  
Hi

I think i have not included in the example files the how are you pattern so it is normal and bot réponse when it dont Know the input pattern is set to i can't answer
Bot can only respond to user inputs if the corresponding pattern is included in the siml files the same Way all aiml software
You can include this new pattern in siml files
I Will send you to morrow example in order to react to the how are you input

Look at the test unit files included with the plugin and at the tutorial to discover more

Happy you test the plugin ....
#9  
And for first question only Classic to day i just look to the opportunity to migrate to oscova modern version
#10  
Jlucben,
Here is a routine I came up with. It watches for change in the $SynbotTextResponse variable and then checks if the Learned.siml file exists (UnasLearned.siml) in mycase and then takes the learned data from that file and writes it to another file NewData.siml. This way the learned siml data is not lost at restart.
I have created a few simple siml files for.
BlankCanBlank, BlankHaveBlank, BlankCanNotBlank...
Here is the code for one of the siml file
BlankCanBlank

Code:


<Siml xmlns:x="http://syn.co.in/2014/siml#external"; xmlns:Think="http://syn.co.in/2014/siml#think">;
<Concept Name="BlankCanBlank" Type="Public">
<Model>
<Pattern>* can *</Pattern>
<Response>
<Learn>
<Model>
<Pattern>Can <Process xml:space="preserve"><Match /> <Match
Index="2" /></Process></Pattern>
<Response>Yes, <Process><Match Index="1" /> can <Match Index="2" />
</Process></Response>
</Model>
</Learn>
Ok, I now know that <Match /> can <Match Index="2" /></Response>
</Model>
</Concept>
</Siml>


And here is the Learned file data I capture and copy to the NewData file

Code:


<Model>
<Pattern>Can ducks swim</Pattern>
<Response>Yes, ducks can swim</Response>
</Model>
<Model>
<Pattern>Can dogs swim</Pattern>
<Response>Yes, dogs can swim</Response>
</Model>
<Model>
<Pattern>Can birds fly</Pattern>
<Response>Yes, birds can fly</Response>
</Model>
<Model>
<Pattern>Can birds sing</Pattern>
<Response>Yes, birds can sing</Response>
</Model>


So the pattern and the response is created by the <learn>

Here is the EZ-Script that does the copy and then deletes the Learned file.

Code:


:LearnedData
WaitForChange($SynbotTextResponse)

DefineArray($SourceArray,1)
DefineArray($DestArray,1)
$SourceFile = "c:/users/richard/unas/synbot/UnasLearned.siml"
$DestFile = "c:/users/richard/unas/synbot/unas/NewData.siml"
FileReadReset($SourceFile)
FileReadReset($DestFile)
if(fileExists($SourceFile) = true)
:FileLoop
if(FileReadEnd($SourceFile) = false)
AppendArray($SourceArray,FileReadLine($SourceFile))
Goto(FileLoop)
endif
#Filter out the rainbows and buttercups
if(Contains($SourceArray[5], "XXXXX"))
FileReadReset($SourceFile)
goto(End)
endif
:FileLoop2
if(FileReadEnd($DestFile) = false)
AppendArray($DestArray, FileReadLine($DestFile))
Goto(FileLoop2)
endif
$DArrayLength = GetArraySize("$DestArray")
$SArrayLength = GetArraySize("$SourceArray")
$DestArray[$DArrayLength - 2] = $SourceArray[4]
$DestArray[$DArrayLength - 1] = $SourceArray[5]
# $DestArray[$DArrayLength - 1] = $SourceArray[6]
AppendArray($DestArray, $SourceArray[6])
AppendArray($DestArray, $SourceArray[7])
AppendArray($DestArray, $SourceArray[8])
AppendArray($DestArray, $SourceArray[9])
$DestArray[2] = "<Concept Name=" + GetAsByte(34) + "NewData" + GetAsByte(34) + " Type=" + GetAsByte(34) + "Public" + GetAsByte(34) + " repeat=" + GetAsByte(34) + "true" + GetAsByte(34) + ">"
if($SArrayLength > 10)
AppendArray($DestArray, $SourceArray[10])
AppendArray($DestArray, $SourceArray[11])
AppendArray($DestArray, $SourceArray[12])
AppendArray($DestArray, $SourceArray[13])
endif
FileReadReset($SourceFile)
FileReadReset($DestFile)

FileDelete($SourceFile)
FileDelete($DestFile)

$DArrayLength = GetArraySize("$DestArray")
$Counter = 1
:DestLoop
repeatwhile($Counter < $DArrayLength)
FileWriteLine($DestFile, $DestArray[$Counter])
$Counter = $Counter + 1
Goto(DestLoop)
endrepeatwhile
endif
:End
$SayWhat = $SynbotTextResponse
goto(LearnedData)
#11  
Rewrite of the EZ-Script
This now allows for any size Learned.siml source file.
I needed the rewrite so as to support having random and multiple responses learned.

Here is an example of a multiple response learn
That creates:
Where is * located
And
Is * located in *

Code:


<Siml xmlns:x="http://syn.co.in/2014/siml#external"; xmlns:Think="http://syn.co.in/2014/siml#think">;
<Concept Name="BlankIsLocatedInBlank" Type="Public">
<Model>
<Pattern>* is located in *</Pattern>
<Response>
<Learn>
<Model>
<Pattern>Where is <Process xml:space="preserve"><Match /> located </Process></Pattern>
<Response><Process><Match Index="1" /> is located in <Match Index="2" /></Process></Response>
</Model>
<Model>
<Pattern>is <Process xml:space="preserve"><Match /> located in <Match Index="2" /></Process></Pattern>
<Response><Process>Yes, <Match Index="1" /> is located in <Match Index="2" /></Process></Response>
</Model>
</Learn>
Ok, I now know that <Match /> is located in <Match Index="2" /></Response>
</Model>
</Concept>
</Siml>


And the Random looks like this:

Code:


Siml xmlns:x="http://syn.co.in/2014/siml#external"; xmlns:Think="http://syn.co.in/2014/siml#think">;
<Concept Name="BlankCanBlank" Type="Public">
<Model>
<Pattern>* can *</Pattern>
<Response>
<Learn>
<Model>
<Pattern>Can <Process xml:space="preserve"><Match /> <Match Index="2" /></Process></Pattern>
<Response><Random>
<Item>Yes, <Process><Match Index="1" /> can <Match Index="2" /></Process></Item>
<Item>That is correct, <Process><Match Index="1" /> can <Match Index="2" /></Process></Item>
<Item>You got it, <Process><Match Index="1" /> can <Match Index="2" /></Process></Item>
<Item>With out a dought, <Process><Match Index="1" /> can <Match Index="2" /></Process></Item>
<Item>For sure, <Process><Match Index="1" /> can <Match Index="2" /></Process></Item>
</Random>
</Response>
</Model>
</Learn>
Ok, I now know that <Match /> can <Match Index="2" /></Response>
</Model>
</Concept>
</Siml>


Here is the updated EZ-Script.

Code:


:LearnedData1
#WaitForChange($SynbotTextResponse)
DefineArray($SourceArray,1)
DefineArray($DestArray,1)
$SourceFile = "c:/users/richard/unas/synbot/UnasLearned.siml"
$DestFile = "c:/users/richard/unas/synbot/unas/NewData.siml"
FileReadReset($SourceFile)
FileReadReset($DestFile)
if(fileExists($SourceFile) = true)
:ReadSource
if(FileReadEnd($SourceFile) = false)
$SourceData = FileReadLine($SourceFile)
if(Contains($SourceData, "XXXXX"))
FileReadClose($SourceFile)
goto(TheEnd)
endif
AppendArray($SourceArray,$SourceData)
Goto(ReadSource)
FileReadReset($SourceFile)
endif
:ReadDestination
if(FileReadEnd($DestFile) = false)
AppendArray($DestArray, FileReadLine($DestFile))
Goto(ReadDestination)
endif
$DArrayLength = GetArraySize("$DestArray")
$SArrayLength = GetArraySize("$SourceArray")
$DestArray[$DArrayLength - 2] = $SourceArray[4]
$DestArray[$DArrayLength - 1] = $SourceArray[5]
$LineCount = 6
repeatwhile($LineCount < $SArrayLength)
AppendArray($DestArray, $SourceArray[$LineCount])
$LineCount = $LineCount + 1
endrepeatwhile
$DestArray[2] = "<Concept Name=" + GetAsByte(34) + "NewData" + GetAsByte(34) + " Type=" + GetAsByte(34) + "Public" + GetAsByte(34) + " repeat=" + GetAsByte(34) + "true" + GetAsByte(34) + ">"

FileReadclose($SourceFile)
FileReadClose($DestFile)
FileDelete($SourceFile)
FileDelete($DestFile)

$DArrayLength = GetArraySize("$DestArray")
$Counter = 1
:DestLoop
repeatwhile($Counter < $DArrayLength)
FileWriteLine($DestFile, $DestArray[$Counter])
$Counter = $Counter + 1
Goto(DestLoop)
endrepeatwhile
endif
:TheEnd
$SayWhat = $SynbotTextResponse
goto(LearnedData1)
Halt()


It works slick.
#12  
Hi

I will correct the plugin in order to append the learned models in the learned.siml file, when a new model is learned.

But your code is working fine ......
#13  
I still have a lot to learn about SIML, but I love the plugin.
Great job.
I will let you know of anything else I find before I write code to work around it.
#14  
Thanks

I have a developper licence for Synbot and have easiercontacts with the indian company.
So don't hesitate to contact me in case of problems or questions before coding.

I will publish a new version as soon as possible with ability to integrate easilly personnal Adaptators for new SIML tags Coded in C# and a Bot learning framework using User Variables and Maps.

New version with update Learn.SIML in Append mode will be soon.
#15  
Syntax for the exponent function

I tried
<Match />e<Match Index ="2" />

where both match = 2
and I get an answer of 200

If I try
<Match />e(<Match Index ="2" />)
I get nothing
#16  
couldn't find anything on it so I used JavaScript:

Code:


<Model>
<Pattern>what is * to the power of *</Pattern>
<Response>The answer is <Js>function powr(num1, num2){
return Math.pow(num1, num2);
}
powr(<Match />, <Match Index="2" />);
</Js>
</Response>
</Model>
#17  
Correct syntax here

Code:

[Model]
[Pattern]what is * to the power of *[/Pattern]
[Response]The answer is [Math][Match /]e[Match At="2"/][/Math]
[/Response]
[/Model]
But not working , I will post a report.
Your JS Script is the good solution.

Plugin has been updated for Use of Learn SIML Tag- you can have look to the Tutorial I have updated Step 7 Ter.
Now it is working fine ....
#18  
Hi

I have a look to your SIML code for BlankCanBlank and BlankIsLocatedinBlank

And have try to improve and optimize RestructuredLearn.zip

Comments are in the Code.
Main improvement is the ability to use in Input Text The Pattern Reductions of the example I published.

Hi maya I would like to know if ducks can swim , can you tell me if ducks swim , ....
will be working , ....

You need to upgrade plugin version to V4 as I use a specific SIMl adapter Textop
#19  
This is awesome, thank you much.
It is going to take me awhile to get my head around how this one works.
Great work.
I have a spreadsheet I would like to send you. It is my brain spreadsheet
my email is rz90208@gmail.com
I also have an excel spreadsheet of the top 100 pop music form from 1890 to 2013 that I would like to incorporate into the robot brain.
#20  
You can send me your brain spreadsheects to jeanlucben@gmail.com

I will have a look

Don’t hesitate if you have questions or difficulties
#21  
JeanLuc,
The new Reconstructed Learn works fine except that the code it generates crashes ARC.
So if I tell the bot that Dogs have teeth, the bot responds with OK I now know that dogs have teeth.
and adds this code to the Learned.siml file.

Code:


<Model>
<Pattern>
<Item>Do dogs have teeth</Item>
<Item>XXXXXFROMPATTERNREDUCTION1 Do dogs have teeth</Item>
</Pattern>
<Response xml:space="preserve">
<Think>
<If Var="Typego" Value="">
<Goto xml:space="preserve">XXXXXPROCESSRESPONSE_BLANKHAVEBLANKdogs|teeth</Goto>
</If>
</Think>
</Response>
</Model>
<Model>
<Pattern>
<Item>XXXXXFROMPATTERNREDUCTION1 IF dogs have teeth</Item>
</Pattern>
<Response xml:space="preserve">
<Think>
<If Var="Typego8" Value="1">
<Goto xml:space="preserve">XXXXXPROCESSRESPONSE_BLANKHAVEBLANKdogs|teeth</Goto>
</If>
</Think>
</Response>
</Model>


but if I now ask the bot if dogs have teeth, it seems SynBot looks up and crashes ARC.
#22  
Hi

It is working on my version

User-inserted image


Do you have updated the plugin to the new version v5 and reload SIML example files in new version SaveV5Published.zip

and do you have suppress your old version of Learned.siml
#23  
Just to be sure, I deleted all siml files.
Reinstalled V5
and unzipped SaveV5Published into my project folder.
and tried using Located in NOT have
Stevens Point is located in Wisconsin
and when I ask the bot where is Stevens Point located, is freezes and crashes ARC.
I will try it in a clean ARC project and let you know
#24  
I will try to reinstall on another pc to morrow and let you know what is happening
#25  
I just test on another PC

I publish a V6 without change
It seems that V5 was not correctly uploaded as some of the DLL was older one and the version release was not correct

After updating the plugin, you can verify in folder C:\Users\Public\Documents\EZ-Builder\Plugins\(GUID) where GUID is the plugin GUID (The last modified) the plugin.xml file

it must be in version release 6

Code:

<?xml version="1.0"?>

-<PluginV1XML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema">;

<FRIENDLY_NAME>Synbot Plugin</FRIENDLY_NAME>

<DLL_FILENAME>SynbotPlugin.dll</DLL_FILENAME>

<AUTHOR_NAME>Jlucben</AUTHOR_NAME>

<LICENSE_URL>http://www.ez-robot.com/tutorials/plugin-license.aspx</LICENSE_URL>;

<PLUGIN_GUID>eae7154f-c1e0-4e41-a661-bc4d7fc66e90</PLUGIN_GUID>

<CATEGORY_TYPE>Artificial Intelligence</CATEGORY_TYPE>

<DESCRIPTION>Plugin interfacing with the SynBot Bot Solution</DESCRIPTION>

<VersionRelease>6</VersionRelease>

</PluginV1XML>
Germany
#26  
Hi jeanlucben,
Today I have installed your plugin and it works very well.
With SynBot Studio I will now try to make extensions for the German language.
You did a fantastic job! Thanks a lot for this !
I hope you continue your development at this plugin and we can look forward to new versions.
#27  
Thanks joki

After some travels , I am beginning to work on a new version.
If you find bugs in the current version , I will be pleased to fix them.
I think some are remaining ......

Jean-Luc