The web design and pages for my personal website.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

180 lines
9.4KB

  1. {{ define "title" }}RiveScript{{ end }}
  2. {{ define "content" }}
  3. <h1>RiveScript</h1>
  4. <ul>
  5. <li><a href="#intro">Project Description</a></li>
  6. <li><a href="#site">Project Website</a></li>
  7. <li><a href="#history">History</a></li>
  8. </ul>
  9. <a name="intro"></a>
  10. <img src="projects/RiveScript/logo.png" alt="RiveScript" width="400" height="90">
  11. <h2>Project Description</h2>
  12. <strong>RiveScript</strong> is a text-based scripting language for giving responses to chatterbots.
  13. The project was started in late 2004 and tentatively named <em>AiChaos Alpha</em>. It has a simple,
  14. easy to learn format and it could be argued that it's more powerful than AIML (Artificial Intelligence
  15. Markup Language).<p>
  16. In short, it's a scripting language used to match a response to a message provided by the human.<p>
  17. In its simplest form, RiveScript code might look like this:
  18. <pre>+ hello bot
  19. - Hello, human!</pre>
  20. And can get into some more complicated things like this:
  21. <pre>+ my name is *
  22. * &lt;get name&gt; == undefined =&gt; &lt;set name=&lt;formal&gt;&gt;Nice to meet you, &lt;get name&gt;&gt;!
  23. * &lt;get name&gt; == &lt;formal&gt; =&gt; I know, you've told me your name before.
  24. * &lt;get name&gt; == &lt;bot name&gt; =&gt; &lt;set name=&lt;formal&gt;&gt;Wow, we have the same name!
  25. * &lt;get name&gt; != &lt;formal&gt; =&gt; &lt;set name=&lt;formal&gt;&gt;Did you get a name change?</pre>
  26. <a name="site"></a>
  27. <h2>Project Website</h2>
  28. This project's official website is <a href="http://www.rivescript.com/">RiveScript.com</a>.
  29. Go there to learn more, download bots and RiveScript interpreters, and join the forum.<p>
  30. For my Perl RiveScript library, the latest version can always be downloaded from CPAN:<br>
  31. <a href="http://search.cpan.org/perldoc?RiveScript">http://search.cpan.org/perldoc?RiveScript</a>
  32. <a name="history"></a>
  33. <h2>History</h2>
  34. <h3>A Brief Introduction to Bots</h3>
  35. In short, chatterbots are programs that communicate with humans using natural language. Often,
  36. chatterbots will communicate with humans over a common interface, such as an instant messenger.
  37. I got into bot programming around the years of 2000 and 2001, starting out with RunABot.com, where
  38. many other would-be botmasters start. RunABot used AIML (Artificial Intelligence Markup Language)
  39. as their method of programming replies for the bots.<p>
  40. Due to RunABot's restrictions and the fact that free bot accounts would suffer anytime there was
  41. a server problem, I found my way to the website of the <a href="http://www.alicebot.org/">ALICE A.I.
  42. Foundation</a>, the home of AIML and the chatterbot that made it famous: Alice. I downloaded AliceBot
  43. Program D, a Java-based AIML robot that worked on AIM and IRC. Immediately it was much more responsive
  44. and fast than RunABot, but at a price: it had no built-in rate limit circumvention. The bot I ran from
  45. Program D wasn't popular enough that it would violate its rate limits by sending its messages instantly
  46. to its users, but it was a concern of mine. Also, it had no way of defending itself against the
  47. infamous Warning system that AIM has.
  48. <h3>Programming My Own</h3>
  49. Due to AliceBot Program D's disregard to the worrisome aspects of the AIM protocol, and because I
  50. wanted to have a bot for MSN Messenger, I googled for MSN bots and found my way to WiredBots.com,
  51. where they had simple Perl bot templates for AIM and MSN bots. These templates were very simplistic
  52. and they were only programmed to send a random quote from a text file in response to all human
  53. messages. I also had never really dealt with Perl very much before this. I had mainly only worked
  54. with the more simplistic languages of JavaScript and HTML.<p>
  55. I learned a lot about Perl just by tinkering with these bot templates. After I got a good handle
  56. on the language, I started releasing my own bot templates based on the WiredBots code, before
  57. rewriting some of my own templates from scratch. The one thing I missed about my past bot adventures
  58. that I couldn't get from Perl: the AIML language of Alice bots.
  59. <h3>Alternatives to AIML</h3>
  60. Somebody made a Perl-based Alice bot once. It was called Program V, and as of now it's impossible
  61. to find anymore. Nobody I know could ever figure out how to make this program work, though. And its
  62. AIML modules were difficult to port. Alice bot programs tend to be complete all-in-one bots. I only
  63. wanted the module that parses AIML, but I couldn't separate that module from the other ones that
  64. managed the configuration and other intricate details that don't apply to what I wanted it for.<p>
  65. Ultimately giving up with Program V's code, and failing numerous times with XML parsers trying to
  66. create my own, I had little other choice than to create something new. Something easier for Perl
  67. to parse. I made a couple of my own XML-based languages, which failed. A couple other attempts later,
  68. and I ended up with a rather simple concept: creating a text-based language driven by command characters
  69. and lines of text. The basic idea was that the language should look like this:
  70. <pre>+ hello bot
  71. - Hello human!</pre>
  72. A plus for the trigger to match against the human's message, and a minus for the bot's response.
  73. Following that format I added a few more commands to enable it to handle conditionals, redirections,
  74. topics, and a lot of the other cool things that AIML can do.
  75. <h3>Chatbot::Alpha</h3>
  76. The first incarnation of my chatterbot scripting language was called <em>AiChaos Alpha</em>,
  77. where AiChaos was the name of my website devoted to bots and Alpha was the name of the scripting
  78. language itself. I chose the Chatbot:: namespace because it's difficult to get a root level namespace
  79. on <a href="http://www.cpan.org/">CPAN</a>, and because Chatbot::Eliza was looking pretty lonely there,
  80. being the only module under the Chatbot space.<p>
  81. After working on Chatbot::Alpha for a while, it grew to be more powerful than the simple idea that
  82. started it, however it wasn't being programmed very efficiently. It wasn't as powerful as AIML yet,
  83. and the logic of the program didn't allow for complicated things that would rival the &lt;that&gt; tag
  84. from AIML.
  85. <pre>&lt;!-- This is an example of the &lt;that&gt; tag in AIML --&gt;
  86. &lt;category&gt;
  87. &lt;pattern&gt;ASK ME A QUESTION&lt;/pattern&gt;
  88. &lt;template&gt;
  89. &lt;random&gt;
  90. &lt;li&gt;Do you have a dog?&lt;/li&gt;
  91. &lt;li&gt;What's your favorite color?&lt;/li&gt;
  92. &lt;/random&gt;
  93. &lt;/template&gt;
  94. &lt;/category&gt;
  95. &lt;category&gt;
  96. &lt;pattern&gt;YES&lt;/pattern&gt;
  97. &lt;that&gt;DO YOU HAVE A DOG&lt;/that&gt;
  98. &lt;template&gt;
  99. What is its name?
  100. &lt;/template&gt;
  101. &lt;/category&gt;</pre>
  102. <h3>Chatbot::RiveScript</h3>
  103. Since I programmed myself into a corner with Alpha, I changed its name to RiveScript and
  104. started over from scratch. The syntax was still very similar, but RiveScript was rebuilt
  105. from the ground up, this time with Alpha's limitations in mind. It wasn't very long before
  106. RiveScript not only matched the features of AIML, but surpassed AIML in multiple areas.
  107. After it became quite a large program, I submitted a request to CPAN to have a root-level
  108. name space. The CPAN admins accepted my request and gave me the root-level name space
  109. of RiveScript. And thus, the module went from being "Chatbot::RiveScript" to simply "RiveScript".
  110. <h3>RiveScript 1.00</h3>
  111. The module started at version 0.01 as Chatbot::RiveScript, and I wanted to make sure it
  112. was perfect before calling it 1.00. After about a year of development, it was about as
  113. perfect as it was going to get. I released the 1.00 version. Years went by before new bugs
  114. were reported, and it eventually went to 1.02 and stayed there. The chatterbot scene was
  115. drying up by now. The once lively forum of <a href="http://www.bot-depot.com/">Bot-Depot</a>
  116. was losing all its best members. Nobody was actively developing bots anymore, and all that
  117. was left were the occasional newbies asking questions that nobody might answer.<p>
  118. Thus, I lost interest in furthering the development of RiveScript. That was in 2005. Now,
  119. three years later, somebody in a different forum posted a thread about wanting to learn
  120. Perl. I asked why (for CGI or for offline programming) so I could link him to the appropriate
  121. tutorial, and he said he wanted to learn it because he heard he could program bots with it.
  122. That inspired me to dust off the old RiveScript module and fix it up.<p>
  123. <h3>RiveScript 2.00</h3>
  124. So, I registered the domain name <a href="http://www.rivescript.com/">RiveScript.com</a>,
  125. which is now the "RiveScript Headquarters". I decided I would also come up with a new standard
  126. for RiveScript. Learning from the limitations of the old version and how it relied on Perl
  127. so much, the new standard was written with multiple implementations in mind. I published
  128. a "RiveScript 2.00 Working Draft", a document describing the standards of the RiveScript
  129. language from an implementation-agnostic point of view. It describes how RiveScript itself
  130. should work -- it's up to the programmer to implement it. The new standards raised the bar
  131. over what the old language was capable of, and I began development of a new RiveScript
  132. module to meet these new standards.<p>
  133. Development of a RiveScript 2.00-compliant module is still in development, but it's getting
  134. close to completion. I'm trying to learn C++ with the goal of eventually making a RiveScript
  135. interpreter in that, which could be compiled into a DLL or Shared Object that other programs
  136. could utilize, or provide the source code to allow it to be directly compiled in with other
  137. programs.
  138. {{ end }}