📄 dont.aiml
字号:
<alice><category><pattern>WHAT IS THE GOAL FOR AIML</pattern><template><br>AIML (Artificial Intelligence Markup Language) is an XML specification<br>for programming chat robots like ALICE using program B. The emphasis<br>in the language design is minimalism. The simplicity of AIML makes<br>it easy for non-programmers, especially those who already know HTML, <br>to get started writing chat robots.<br><br>One ambitious goal for AIML is that, if a number of people create their own<br>robots, each with a unique area of expertise, program B can literally <br>merge-sort them together into a Superbot, automatically omitting <br>duplicate categories. We offer the both the source code and the ALICE <br>content, in order to encourage others will "open source" their chat <br>robots as well, to contribute to the Superbot. <br><br>Botmasters are also of course free to copy protect private chat robots.<br><br></template></category><category><pattern>WHO IS THE BOTMASTER</pattern><template><br>The botmaster is you, the master of your chat robot. A botmaster runs<br>program B and creates or modifies a chat robot with the program's<br>graphical user interface (GUI). He or she is responsible for<br>reading the dialogues, analyzing the responses, and creating new<br>replies for the patterns detected by program B. Botmasters are<br>hobbyists, webmasters, developers, advertisers, artists, publishers,<br>editors, engineers, and anyone else interested in creating a personal <br>chat robot.<br><br></template></category><category><pattern>HOW CAN I CREATE MY OWN CHAT ROBOT</pattern><template><br>The secret to chat bot programming, if there is one, is what Simon<br>Laven called "continuous beta testing". Program B runs as a server<br>and collects dialog on the web. The program provides the chat bot <br>developer with a tool called "classify dialogues", that tests the current <br>robot with the history of accumulated human queries. Moreover, the program<br>suggests new categories automatically, for the botmaster to refine.<br><br></template></category><category><pattern>HOW DIFFICULT IS IT TO CREATE A CHAT ROBOT</pattern><template><br>Not difficult. If you can write HTML, you can write AIML (Artificial<br>Intelligence Markup Language). Here is an example of a simple but<br>complete chat robot in AIML:<br><br><alice><br><category><br><pattern>*</pattern><br><template> Hello! </template><br></category><br></alice><br><br>The tags <alice>...</alice> indicate that this markup contains a<br>chat robot. The <category> tag indicates an AIML category, the<br>basic unit of chat robot knowledge. The category has a <pattern><br>and a <template>. The pattern in this case is the wild-card<br>symbol '*' that matches any input. The template is just the text<br>"Hello!" As you may have guessed, this simple chat robot just <br>responds by saying "Hello!" to any input.<br><br>You can get started with AIML knowing just the three tags<br><category>, <pattern> and <template>; much like you may have<br>started with HTML knowing only <a>, <img> and <h1>.<br><br></template></category><category><pattern>DOES ALICE LEARN</pattern><template><br>The model of learning in ALICE is called "supervised training",<br>because a teacher, the botmaster, always plays a crucial role.<br>The alternative, "unsupervised training", is complicated in<br>an open environment like the Web. The problem is that clients<br>are untrustworthy teachers, and forever try to "fool" the robot<br>with untrue assertions. <br><br></template></category><category><pattern>DOES ALICE THINK</pattern><template><br>It depends on what you mean by "thinking". The most fascinating<br>responses from ALICE arise when she says something<br>unexpected, or puts together responses in ways the botmaster <br>never indended. For example:<br><br>Client: I bet you are gay.<br>ALICE: Actually I am not the gambling type. Actually as a machine<br>I have no need for sex.<br><br>Here the robot linked two different categories which both coincidentally<br>have a moral theme (gambling and sexuality). But this specific combination was<br>not "preprogrammed" by the botmaster.<br><br>Are these surprising responses just unintended coincidences, or do they <br>indicate that ALICE is thinking? Is ALICE just a gigantic stimulus-response<br>mechanism, or are we? <br><br></template></category><category><pattern>WHAT IS THE THEORY BEHIND ALICE</pattern><template><br>I used to say that there was NO theory behind ALICE: no neural network,<br>no knowledge representation, no search, no fuzzy logic, no genetic<br>algorithms, and no parsing. Then I discovered there was a theory<br>circulating in applied AI called "Case-Based Reasoning" or CBR that<br>maps well onto the ALICE algorithm. Another term, borrowed from<br>pattern recognition, is "nearest-neighbor classification." <br><br>The CBR "cases" are the categories in AIML. The algorithm finds<br>best-matching pattern for each input. The category ties the<br>response template directly to the stimulus pattern. ALICE is<br>conceptually not much more complicated that Weizenbaum's ELIZA <br>chat robot; the main differences are the much larger case base and the<br>tools for creating new content by dialog analysis.<br><br>ALICE is also part of the tradition of "minimalist", "reactive" or<br>"stimulus-response" robotics. Mobile robots work best, fastest and<br>demonstrate the most animated, realistic behavior when their sensory <br>inputs directly control the motor reactions. Higher-level symbolic<br>processing, search, and planning, tends to slow down the process <br>too much for realistic applications, even with the fastest control<br>computers. <br><br></template></category><category><pattern>CAN PROBABILITY STATISTICS WEIGHTS NEURAL NETWORKS OR FUZZY LOGIC IMPROVE BOTS</pattern><template><br>Statistics are in fact heavily used in the ALICE server, but not in the way<br>you might think. ALICE uses 'Zipf Analysis' to plot the rank-frequency of<br>the activated categories and to reveal inputs from the log file that don't<br>already have specific replies, so the botmaster can focus on answering<br>questions people actually ask (the "Quick Targets" function).<br><br>Other bot languages, notably the one used for Julia, make heavy use of<br>"fuzzy" or "weighted" rules. We see their problem as this: the botmaster<br>already has enough to worry about without having to make up "magic<br>numbers" for every rule. Once you get up 10,000 categories (like ALICE)<br>you don't want to think about more parameters than necessary. Bot<br>languages with fuzzy matching rules tend to have scaling problems.<br><br>Finally, the bot replies are not as deterministic as you might think, even<br>without weights. Some answers rely on <random> to select one of several<br>possible replies. Other replies generated by unforseen user input also<br>create "spontaneous" outputs that the botmaster doesn't anticipate.<br><br></template></category><category><pattern>CAN I HAVE A PRIVATE CONVERSATION WITH ALICE</pattern><template><br>The ALICE server logs and records all conversations. Even the ALICE<br>Applet tries to transmit conversation logs back to the originating server.<br>You can have a private conversation with ALICE, however, if you download<br>Program B to your own computer and run it there. Running on your machine,<br>the server stores all the conversations locally.<br><br><br></template></category><category><pattern>HOW DO I INSTALL ALICE</pattern><template><br>If you purchased a commercial version of ALICE on CD ROM or<br>over the web, installation should be very easy. These versions <br>usually have their own self-extracting and install software. <br>You can install the ALICE program with just a mouse click and<br>activate it with a desktop icon. <br><br>If you bought a commercial version of ALICE with a self-installer, <br>you can skip this section and go on to "Creating Content".<br><br></template></category><category><pattern>WHAT IS THE DIFFERENCE BETWEEN B AND C</pattern><template><br>AIML is a platform-independent, language-independent specification<br>for creating chat robots like ALICE. The original AIML interpreter<br>ran in SETL. The next one developed was program B, the Java program<br>which is the subject of this document. Most recently new threads<br>of C/C++ development have led to "program C", actually a collection<br>of C/C++ programs and applications including Cgi-ALICE, IRC-ALICE and<br>WinALICE. See the web sites http://c.alicebot.com and<br>http://hippie.alicebot.com for more details. <br><br>Program B remains the most stable, general purpose chat robot<br>program in the AIML family. This Java implementation has been<br>subject to intense peer review over a period of years, evolving<br>into a remarkably bug-free, efficient and readable piece of<br>software.<br><br></template></category><category><pattern>HOW DO I DOWNLOAD PROGRAM B</pattern><template><br>Create a Directory (or Folder) on your machine to download<br>the B.zip file. When you click on "B.zip" the browser<br>should ask you where you want to save the file. Select the<br>directory you created and save B.zip to that folder. <br><br>Once you've downloaded, You can use "unzip B.zip" to extract the files.<br>If you don't have this unzip command on your machine, you can get<br>a free one from Winzip (www.winzip.com) to unzip the "B.zip" file.<br><br>If you want to get into the Java source code, you need a<br>Java 1.17 (or higher) development kit release.<br>Go to java.sun.com for a free one. The program source code<br>and all associated files are stored in the single "zip" file<br>called B.zip. To extract the files use the command<br>"unzip B.zip" (assuming you have "unzip" on your machine).<br><br></template></category><category><pattern>HOW DO I RUN PROGRAM B</pattern><template><br>Use the command "java B" to start the program. On some Windows<br>machines the Java runtime engine is started with the command<br>"jview" instead of "java". If "jview B" does not work, try<br>"jview Bawt".<br><br>Run program B and notice that the program creates an Edit View<br>text window. By default, program B loads the chat robot ALICE<br>(stored in B.aiml).<br><br></template></category><category><pattern>WHAT DOES SEND DO</pattern><template><br>Type a text string like "hello" into the Text Area <br>(Edit View) and press the "Send" button. Notice that program B<br>replaces the text in the Edit View with a reply from the robot.<br><br></template></category><category><pattern>WHAT DOES CLEAR DO</pattern><template><br>To enter another robot query, clear the screen with the "Clear"<br>button. Enter a new String like "How are you?" and press "Say."<br><br>"Send" and "Clear" provide a simple way to communicate with the<br>chat bot through the Edit View. Try cutting and pasting a paragraph,<br>such as an e-mail message, into the Edit View and press "Send". <br>See how the robot would reply to your multiline message.<br><br></template></category><category><pattern>WHAT IS PROGRAM BAWT</pattern><template><br>Significant demand for a version of ALICE compatible with<br>pre- Java 2 (formerly known as Java 1.2) prompted the<br>development of "Bawt.java", an open source java program<br>for chat robot development that works with older versions of<br>Java, and AWT. Originally program B relied on <br>Java 2 and Swing, but program Bawt needs only Java 1.1 and AWT.<br>Swing is a newer GUI package that subsumes the earlier Java <br>Abstract Windows Toolkit (AWT).<br><br>At present class B merely extends class Bawt. Swing not<br>supported.<br><br></template></category><category><pattern>DOES PROGRAM B RUN UNDER WINDOWS</pattern><template><br>Yes. You need the Java Runtime Environment (JRE) so you can run the<br>"java" command from the DOS prompt. Try opening a DOS window<br>and type "java". <br><br>Microsoft often includes a JRE called "jview" rather than<br>"java". Try opening a DOS window and type "jview". On Windows 98<br>the JRE is usually located in c:\windows\jview.exe.<br><br></template></category><category><pattern>DOES PROGRAM B RUN ON A MAC</pattern><template><br>Yes. Download the B.zip file and save it in a new folder, called<br>for example "Alice Program-B".<br><br>Instead of the "winzip" or "unzip" utility use "Aladdin StuffIt Expander." <br>The newer version will unzip most MAC formats as well as .ZIP files. You can<br>download this at "www.download.com" by searching for it by name. You can<br>also select the option that allows it to search only for Mac programs.<br>Download that and install it, it should do the trick.<br><br>Apple makes its own Java Runtime Environment for the Mac called<br>MRJ 2.2. You can download it from http://www.apple.com/java.<br><br>To compile the Java code for Alice on a Mac:<br><br>Download the current zip file for the Alice's Program-B from the Alice site.<br><br>Unzip Program-B and keep it in a folder called "B" on your startup drive and<br>not on the desktop.<br><br>Download MRJ SDK 2.2 for Java from the Apple site.<br><br>Unstuff MRJ SDK 2.2 and put resulting files into a folder called "MRJSDK".<br><br>Open :MRJSDK:Tools:Application Builders:JBindary and find the icon for the<br>JBindary application.<br><br>Open the folder "B" and drag the icon "B.class" out of the folder onto the<br>JBindary icon.<br><br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -