RiveScript 1.18 RC1|Kirsle|casey@cuvou.net|1228426030|Kirsle|exclamation|0|72.37.252.50|This is a pre-release of Perl RiveScript 1.18. There are a number of changes, some of which are kinda big, and I don't wanna ship it to the CPAN until I know there aren't any major bugs with it.<br /><br />So here is RiveScript-1.18rc1:<br /><br />[code]  1.18<br />  - Added support for topics to inherit their triggers from other topics.<br />    e.g. &gt; topic alpha inherits beta<br />  - Fixed some bugs related to !array with ^continue's, and expanded its<br />    functionality therein.<br />  - Updated the getUservars() function to optionally be able to get just a specific<br />    variable from the user's data. Added getUservar() as a grammatically correct<br />    alias to this new functionality.<br />  - Added the functions freezeUservars() and thawUservars() to back up and<br />    restore a user's variables.<br />  - Added the function lastMatch(), which returns the text of the trigger that<br />    matched the user's last message.<br />  - The # command for RiveScript comments has been deprecated in revision 7 of<br />    the RiveScript Working Draft. The Perl module will now emit warnings each<br />    time the # comments are processed.<br />  - Modified a couple of triggers in the default Eliza brain to improve matching<br />    issues therein.<br />  - Updated the RiveScript Working Draft.[/code]<br /><br />Documentation page for 1.18rc1: http://www.rivescript.com/files/src/RiveScript-1.18rc1/docs/RiveScript.html<br /><br />Snapshot of the Working Draft for this release: http://www.rivescript.com/wd/2008-12-04/RiveScript.html<br /><br />Download link: http://www.rivescript.com/files/src/RiveScript-1.18rc1.tar.gz||1228426331|Kirsle|
Re: RiveScript 1.18 RC1|a2b|roy@wasystems.net|1228892431|a2b|xx|0|76.102.148.130|#1 - minor<br />Rivescript::Warn from old # style comments gives incorrect line number.<br /><br />#2 - critical<br />It is not honoring % of inherited topics (possibly anywhere?). &nbsp;It is simply disregarding that requirement and matching the +. &nbsp;This was not an issue on the 1.17.3 build. &nbsp;<br /><br />||||
Re: RiveScript 1.18 RC1|a2b|roy@wasystems.net|1228895343|a2b|xx|0|76.102.148.130|&gt;topic abc<br /><br />+ test<br />* &lt;get testa&gt; != 1 =&gt; test1 &lt;set testa=1&gt;<br />* &lt;get testb&gt; != 1 &nbsp; =&gt; test2 &lt;set testb=1&gt; <br />- test3<br /><br />&lt; topic<br /><br />+ prime<br />- changing topic &#123;topic=abc&#125;<br /><br /><br /><br /><br />You&gt; prime<br />Bot&gt; changing topic<br />You&gt; test<br />RiveScript::Warning: User localuser was in an empty topic named 'abc'!<br />Bot&gt; test1<br />You&gt; test<br />Bot&gt; test2<br />||||
Re: RiveScript 1.18 RC1|Kirsle|casey@cuvou.net|1228940686|Kirsle|xx|0|72.37.252.50|Looks like almost all of the issues had to do with my changes to the lookahead code.<br /><br />I've fixed up a bunch of stuff in the module and then also created a &quot;testsuite.rs&quot; file which demonstrates a whole lot of the features of RiveScript, including topics and such. (only thing it doesn't test yet is all the tiny individual tags that go inside replies, but most of them are sprinkled here and there elsewhere in the other tests).<br /><br />The testsuite.rs doesn't have a * trigger so &quot;ERR: No Reply Matched&quot; is okay. If you want a * trigger then just say &quot;insert swear word here&quot; :P<br /><br />I've attached the new RiveScript.pm and testsuite.rs in a zip file to this post.<br /><br />Interesting bits from it:<br /><br />[code]+ count<br />* &lt;get count&gt; == undefined =&gt; &lt;set count=1&gt;Let's start with 1.<br />* &lt;get count&gt; == 0 &nbsp; &nbsp; &nbsp; &nbsp; =&gt; &lt;set count=1&gt;Let's start again with 1.<br />* &lt;get count&gt; == 1 &nbsp; &nbsp; &nbsp; &nbsp; =&gt; &lt;add count=1&gt;I've added 1 to the count.<br />* &lt;get count&gt; == 2 &nbsp; &nbsp; &nbsp; &nbsp; =&gt; &lt;add count=5&gt;I've added 5 now.<br />* &lt;get count&gt; == 3 &nbsp; &nbsp; &nbsp; &nbsp; =&gt; &lt;add count=3&gt;Now I've added 3.<br />* &lt;get count&gt; == 4 &nbsp; &nbsp; &nbsp; &nbsp; =&gt; &lt;sub count=1&gt;Subtracted 1.<br />* &lt;get count&gt; == 5 &nbsp; &nbsp; &nbsp; &nbsp; =&gt; &lt;mult count=2&gt;Now I've doubled that.<br />* &lt;get count&gt; == 6 &nbsp; &nbsp; &nbsp; &nbsp; =&gt; &lt;add count=3&gt;Added 3 again.<br />* &lt;get count&gt; == 7 &nbsp; &nbsp; &nbsp; &nbsp; =&gt; &lt;sub count=2&gt;Subtracted 2.<br />* &lt;get count&gt; == 8 &nbsp; &nbsp; &nbsp; &nbsp; =&gt; &lt;div count=2&gt;Divided that by 2.<br />* &lt;get count&gt; == 9 &nbsp; &nbsp; &nbsp; &nbsp; =&gt; &lt;set count=0&gt;We're done. Do you know what number I<br /> &nbsp;^ \sstopped at?<br />* &lt;get count&gt; == 10 &nbsp; &nbsp; &nbsp; &nbsp;=&gt; &lt;sub count=2&gt;Subtracted 2 from that now.<br /><br />+ (9&#124;nine)<br />% * do you know what number i stopped at<br />- You're right, I stopped at the number 9. :)<br /><br />+ enter the dungeon<br />- &#123;topic=room1&#125;You've entered the dungeon. &#123;@look&#125;<br /><br />&gt; topic global<br /> &nbsp; &nbsp; &nbsp;+ help&#123;weight=100&#125;<br /> &nbsp; &nbsp; &nbsp;- Game Help (todo)<br /><br /> &nbsp; &nbsp; &nbsp;+ inventory&#123;weight=100&#125;<br /> &nbsp; &nbsp; &nbsp;- Your Inventory (todo)<br /><br /> &nbsp; &nbsp; &nbsp;+ (north&#124;n&#124;south&#124;s&#124;east&#124;e&#124;west&#124;w)<br /> &nbsp; &nbsp; &nbsp;- You can't go in that direction.<br /><br /> &nbsp; &nbsp; &nbsp;+ quit&#123;weight=100&#125;<br /> &nbsp; &nbsp; &nbsp;- &#123;topic=random&#125;Quitter!<br /><br /> &nbsp; &nbsp; &nbsp;+ _ *<br /> &nbsp; &nbsp; &nbsp;- You don't need to use the word &quot;&lt;star&gt;&quot; in this game.<br /><br /> &nbsp; &nbsp; &nbsp;+ *<br /> &nbsp; &nbsp; &nbsp;- I don't understand what you're saying. Try &quot;help&quot; or &quot;quit&quot;.<br />&lt; topic<br /><br />&gt; topic dungeon inherits global<br /> &nbsp; &nbsp; &nbsp;+ hint<br /> &nbsp; &nbsp; &nbsp;- What do you need a hint on?\n<br /> &nbsp; &nbsp; &nbsp;^ * How to play\n<br /> &nbsp; &nbsp; &nbsp;^ * About this game<br /><br /> &nbsp; &nbsp; &nbsp;+ how to play<br /> &nbsp; &nbsp; &nbsp;% what do you need a hint *<br /> &nbsp; &nbsp; &nbsp;- The commands are &quot;help&quot;, &quot;inventory&quot;, and &quot;quit&quot;. Just read and type.<br /><br /> &nbsp; &nbsp; &nbsp;+ about this game<br /> &nbsp; &nbsp; &nbsp;% what do you need a hint *<br /> &nbsp; &nbsp; &nbsp;- This is just a sample RPG game to demonstrate topic inheritence.<br />&lt; topic<br /><br />&gt; topic room1 inherits dungeon<br /> &nbsp; &nbsp; &nbsp;+ look<br /> &nbsp; &nbsp; &nbsp;- You're in a room with a large number &quot;1&quot; on the floor.\s<br /> &nbsp; &nbsp; &nbsp;^ Exits are north and east.<br /><br /> &nbsp; &nbsp; &nbsp;+ (north&#124;n)&#123;weight=5&#125;<br /> &nbsp; &nbsp; &nbsp;- &#123;topic=room2&#125;&#123;@look&#125;<br /><br /> &nbsp; &nbsp; &nbsp;+ (east&#124;e)&#123;weight=5&#125;<br /> &nbsp; &nbsp; &nbsp;- &#123;topic=room3&#125;&#123;@look&#125;<br />&lt; topic<br /><br />&gt; topic room2 inherits dungeon<br /> &nbsp; &nbsp; &nbsp;+ look<br /> &nbsp; &nbsp; &nbsp;- This room has the number &quot;2&quot; here. There's a flask here that's trapped<br /> &nbsp; &nbsp; &nbsp;^ \sin some kind of mechanism that only opens while the button is held<br /> &nbsp; &nbsp; &nbsp;^ \sdown (so, hold down the button then quickly grab the flask).\n\n<br /> &nbsp; &nbsp; &nbsp;^ The only exit is to the south.<br /><br /> &nbsp; &nbsp; &nbsp;+ [push&#124;press&#124;hold] button [*]<br /> &nbsp; &nbsp; &nbsp;- You press down on the button and the mechanism holding the flask is\s<br /> &nbsp; &nbsp; &nbsp;^ unlocked.<br /><br /> &nbsp; &nbsp; &nbsp;+ [take&#124;pick up] [ye] flask [*]<br /> &nbsp; &nbsp; &nbsp;% * mechanism holding the flask is unlocked<br /> &nbsp; &nbsp; &nbsp;- You try to take ye flask but fail (you can't take ye flask, give up).<br /><br /> &nbsp; &nbsp; &nbsp;+ [take&#124;pick up] [ye] flask [*]<br /> &nbsp; &nbsp; &nbsp;- You can't get ye flask while the mechanism is holding onto it.<br /><br /> &nbsp; &nbsp; &nbsp;+ (south&#124;s)&#123;weight=5&#125;<br /> &nbsp; &nbsp; &nbsp;- &#123;topic=room1&#125;&#123;@look&#125;<br />&lt; topic<br /><br />&gt; topic room3 inherits dungeon<br /> &nbsp; &nbsp; &nbsp;+ look<br /> &nbsp; &nbsp; &nbsp;- There's nothing here but the number &quot;3&quot;. Only exit is to the west.<br /><br /> &nbsp; &nbsp; &nbsp;+ (west&#124;w)&#123;weight=5&#125;<br /> &nbsp; &nbsp; &nbsp;- &#123;topic=room1&#125;&#123;@look&#125;<br />&lt; topic[/code]||||Rs18rc1rev1.zip
