Introduction: BASIC TUTORIAL ON ARTIFICIAL INTELLIGENCE MARKUP LANGUAGE (AIML) VIA NOTEPAD

Artificial Intelligence Markup Language (AIML) is a programming language which is an Extensible Markup Language (XML) specification used by chatbot, verbot, pandorabot, superbot, and other talking robot.

It was developed by Dr. Richard Wallace and followed by other likeminded programmers (AIML free software community). An A.L.I.C.E. ("Artificial Linguistic Internet Computer Entity") AIML tag set was released under GNU General Public License (GPL).

There are different AIML interpreter on the Net like AIMLbot (Program #) (.NET/C#), CHAT4D edit and run (delphi) (french), ChatterBean (Java), Program D (Java, J2EE), Program O (PHP/MySQL), Program Q (C++, Qt), Program R (Ruby), Program W (Java), RebeccaAIML (C++, Java, .NET/C#, Python, Eclipse AIML editor plugin), and others. Most of AIML interpreters are open source programs.

The Loebner Prize for artificial intelligence ( AI ) at http://www.loebner.net/Prizef/loebner-prize.html is designed to implement the Turing Test which will prove the most human-like computer that "think" using the AIML.

The 2008 winner is Fred Roberts and Artificial Solutions of www.elbot.com

Now, I'll teach you how to make your own AIML file ready to be put inside the "brain" of your robot using the "simple" Windows Notepad. This is a basic AIML coding instructable. You do not need any AIML editor or AIML file creator or even AIML parser chatbot editor. We will simply used Notepad. That's it, you see it right, Windows Notepad!

Even if you do not want to make an AIML file, you can still use the basic AIML coding tutorial which you can find in this instructable. You can save it as XML for integrating into a Javascript-based or Flash-based website with AIML interpreter.

There are other application programs that extended the capability of Windows Notepad such as NoteTab, Crimson Editor, VIM, Boxer Software Text Editor, Rogsoft Notepad+, ProNotepad, Notepad++, Notepad 2, Metapad, NoteXpad 2.0, etc.

But in this instructable I simply used the Window XP notepad. Beware, Notepad programming can either make or break you.

This seemingly innocent application can do things that are really astounding and to some will find them shocking and alarming as shown by the following: format your computer's HDD, lock a folder, make a digital diary, create a cycle message, shut down your computer, "hack" the administrator account, toggle caps lock button, continually pop out your computer's CD drive, hit Enter or Backspace simultaneously, automatic keyboard typing, open Notepad continually, change text header and footer, print tree root (directory or location of file), access CMD, write virus programs, play sound, flood files, create hidden text file, make a matrix falling text effect, program chat codes (VBS), make your computer talk, make your own autorun for your CD and DVD, open and close CD-ROM, increase Internet speed, add your photo in computer properties, test your anti-virus software (active or non-active), add shutdown option in right click, make a timer, etc.

You see Notepad is not just a simple text editor as many thought it to be. You can make different types of files (not just only TXT) by means of Notepad with the following extension names: HTM, HTML, XHTML, XML, WML, CSS, JS, BAT, VBS, EXE, PHP, etc. It is so amazing, isn't it?

PERIANDER A. ESPLANA
codename: "theseventhsage"
http://thebibleformula.webs.com
http://www.internetsecretbook.com

Step 1: Open Notepad.

Opening a Notepad can be done in two basic ways:
1. Start -> All Programs -> Accessories ->Notepad.
2. Start -> Run -> In the Open textbox type "Notepad" (without quotation).

Step 2: Type the XML Specification Tag.

Since AIML is an XML specification, like HTML and XHTML, it always includes less than (<) and greater than (>) signs which are also called angle brackets. Between these two signs is an element that indicates the type of command which an AIML interpreter will follow. Collectively, this is called an AIML tag which has two kinds: an opening or start tag and a closing or end tag. The end tag contained always a forward slash (/) at the beginning of an element. Thus, typing AIML codes is like typing HTML codes (start tags, contained text and end tags).
But all your AIML file must start with tag that specifies it as an appropriate or valid extended XML subset (or dialect):

<?xml version="1.0" encoding="ISO-8859-1"?>

Or you can also use the following:

<?xml version="1.0" encoding="UTF-8"?>

This will serve as the prolog to a typical AIML file. The UTF-8 in the encoding will be used in saving the file instead of ANSI, UNICODE, etc.

Step 3: Type the Parent AIML Tags.

The XML specification tag is followed by parent tags:

<?xml version="1.0" encoding="ISO-8859-1"?>
<aiml>

</aiml>

Some of the AIML interpreters need the version to recognize it as a valid AIML file so you can also write the version of the AIML in the parent start tag.

<?xml version="1.0" encoding="ISO-8859-1"?>
<aiml version="1.0">

Step 4: Type the Category Tags.

The parent tag which indicates that it is an AIML file is followed by the category tag. It must be put inside the two parent tags. The basic unit of an AIML is called category which is commonly divided into two sets of tags: pattern and template.

The pattern is the user's expected or assumed question (the matching part) while the template is the chatbot's prepared or programmed answer (the returning part).

<?xml version="1.0" encoding="ISO-8859-1"?>
<aiml>
<category>
<pattern>WHAT IS INSTRUCTABLES.COM?</pattern>
<template>It is the world's biggest show and tell.</template>
</category>
</aiml>

When the user asked, what is instructables.com? (an input), the AIML bot will answer: It is the world's biggest show and tell (an output). As you can see, it is so easy. If you asked a chatbot, it will simply look for a pattern of each category and if it finds a match (ignoring the case of the contained text in the pattern) it will immediately respond based on the template of that category and thus simulating a normal conversation.

Step 5: Use Wildcards in the Pattern.

However, the matching process will match only one input what is instructables.com? and not another form of that question that may be asked by the user such as what is www.instructables.com? (with www), what is instructables? (without .com), what is intructables? (misspelled), what is instructable? (misspelled), etc. There are two basic methods to solve this problem: 1. By using wildcards in the pattern and 2. By using SRAI tag in the template.

Using wildcards is very useful in DOS commands and in searching files or data in the computer. It is also useful in AIML coding. In AIML, wildcard characters can be either an asterisk * or an underscore _.

<?xml version="1.0" encoding="ISO-8859-1"?>
<aiml>
<category>
<pattern>WHAT IS INSTRUCTABLES *</pattern>
<template>Instructables.com is the world's biggest show and tell.</template>
</category>
</aiml>

The wildcards will match infinite number of words (and, of course, input questions) like what is instructables.com? what is instructables on the Internet? what is instructables' uniqueness to other do-it-yourself website? etc. All these questions will be answered by AIML according to the template of that matched category: Instructables.com is the world's biggest show and tell.

Step 6: Type SRAI Tag and RANDOM Tag in the Template.

The element srai is very useful in the situation when the programmer wants to redirect different sets of questions that are similar in meaning to one answer in the above category.

<?xml version="1.0" encoding="ISO-8859-1"?>
<aiml>
<category>
<pattern>WHAT IS INSTRUCTABLES *</pattern>
<template>Instructables.com is the world's biggest show and tell.</template>
</category>
<category>
<pattern>WHAT IS THE FAMOUS DO-IT-YOURSELF WEBSITE?</pattern>
<template><srai>what is instructables <star/></srai></template>
</category>
</aiml>

When a user asked the question what is the famous do-it-yourself website? the template will be redirected to the above pattern what is instructables *? (the wildcard * must be replaced with <star/> tag in srai tags) which means that the two questions (or more if you will add another srai tags) are synonymous (rephrased questions) and thus the AIML bot has only one answer: Instructables.com is the world's biggest show and tell. By means of srai tag, one matched pattern in a category can be redirected to other pattern of another category.

If you used srai tag for a bot to respond with one answer to many questions, there is a tag that you can use to respond with different answer to a single question which has been asked many times by a user. It is the random tag.
<?xml version="1.0" encoding="ISO-8859-1"?>
<aiml>
<category>
<pattern>WHAT IS INSTRUCTABLES *</pattern>
<template>
<random>
<li>Instructables.com is the world's biggest show and tell.</li>
<li>Instructables.com is the famous do-it-yourself website on the Internet.</li>
<li>Instructables.com is the haven of inventors, innovators, hackers, tech geek, etc. on the Internet.</li>
</random>
</template>
</category>
<category>
<pattern>WHAT IS THE FAMOUS DO-IT-YOURSELF WEBSITE?</pattern>
<template><srai>what is instructables <star/></srai></template>
</category>
</aiml>

The user's question with the form what is instructables * will be answered randomly with the following list (or list item as shown by the <li>&</li> tags): Instructables.com is the world's biggest show and tell.
Instructables.com is the famous do-it-yourself website on the Internet.
Instructables.com is the haven of inventors, innovators, hackers, tech geek, etc. on the Internet.

The answer will be given by an AIML bot one at a time as the same pattern of question is being repeated by the user.

Step 7: Formally Convert Your Text File to AIML File.

Notepad will always saved your file with the extension name txt unless you change it by naming your file with extension name of aiml.

Here's how you can do it. Select File in the menu by clicking it and the submenu will appear. Choose Save As and go to the folder of a bot brain in which you want to save your file by clicking the downward button of Save in. Name your file with the extension name AIML in the textbox of File name. Example: Instructables.aiml

In the drop-down menu of Save as Type choose All Files. Change the encoding to UTF-8. Then, save it by clicking the save button. That's it. You have already created an AIML file via Notepad!

Step 8: Conclusion

There are still many AIML tags that can be used in making and editing an AIML file. Don't forget to use AIML variables which are really fascinating. The following links will serve as good resources to those who want to delve more the AIML coding and syntax:

A Tutorial For Adding Knowledge to Your Robot
http://www.pandorabots.com/botmaster/en/tutorial

Artificial Intelligence Markup Language (AIML) Version 1.0.1
http://www.alicebot.org/TR/2005/WD-aiml/

As we have seen in this "simple" instructable, man is really a genius! He can invent, design and develop programs that can simulate the behavior of a human being. He can intelligently design applications that will correspond with the way he think to make life better. These facts reflect the truth that man is created in the image of God with personality, rationality and morality. Man is a creative being.

If you want to talk to a chatbot, visit here and select AI chat:
http://www.jesus.org.uk/bot/

Comments

author
ShrutiI4 (author)2017-06-10

How do I call java methods as per the text entered by the user?

author
RidaI2 (author)2016-06-14

thank you so much for this tutorial, it was really helpful. Can you please tell me how can i use this aiml file in my c# code. I'm having problem with integrating it with my project.

author
piyush2piyush (author)2016-05-24

I have a problem How to open the aiml file?

author
NathanS13 (author)2015-03-16

what now i don't get what to do after i type it up

what do i add it to or what? :(

author
Jaket3 (author)2015-01-25

this dosent work!!

i tried saving it as aiml but it didnt work:(

author
Random306 (author)2014-07-14

Thanks, I have made one called Supercomputer.aiml!

author
calebhk98 (author)2014-04-15

I did a program like this in batch, But if you make two questions with both * will it use the question most like it or will it get an error?

Like:

<pattern>WHAT IS meteorites *</pattern>

<pattern>WHAT IS meteors *</pattern>

Will it figure out which one the user is asking if they say What is meterites?

author
calebhk98 (author)calebhk982014-04-15

How can you open this? I tried to open it and windows said it could not find the file to open it with. Any idea where to get right software for free and without viruses in them.

author
calebhk98 (author)calebhk982014-04-15

How can you open this? I tried to open it and windows said it could not find the file to open it with. Any idea where to get right software for free and without viruses in them.

author
calebhk98 (author)calebhk982014-04-15

@ECHO OFF

title Chat-Bot 2

:choosename

set /a timesthrough=0

:choosenameab

cls

set /a choosemname= %random%

if %choosemname% GTR 170 goto choosenamea

if %choosemname% LSS 1 goto choosenamea

goto gotnamenow

:choosenamea

set /a timesthrough=%timesthrough%+1

cls

set /a choosemname= %random%

if %choosemname% GTR 170 goto choosenamebob

if %choosemname% LSS 1 goto choosenamebob

goto gotnamenow

:choosenamebob

if %timesthrough%==100 goto choosenameb

if NOT %timesthrough%==100 goto choosenameab

:choosenameb

cls

set /a choosemname= %random%

echo Loading.

ping -n 1 127.0.0.1 > nul

if %choosemname% GTR 170 goto choosenamec

if %choosemname% LSS 1 goto choosenamec

goto gotnamenow

:choosenamec

cls

set /a choosemname= %random%

if %choosemname% GTR 170 goto choosenamed

if %choosemname% LSS 1 goto choosenamed

goto gotnamenow

:choosenamed

cls

set /a choosemname= %random%

if %choosemname% GTR 170 goto choosenamee

if %choosemname% LSS 1 goto choosenamee

goto gotnamenow

:choosenamee

cls

set /a choosemname= %random%

echo Loading..

ping -n 1 127.0.0.1 > nul

if %choosemname% GTR 170 goto choosenamef

if %choosemname% LSS 1 goto choosenamef

goto gotnamenow

:choosenamef

cls

set /a choosemname= %random%

if %choosemname% GTR 170 goto choosenameg

if %choosemname% LSS 1 goto choosenameg

goto gotnamenow

:choosenameg

cls

set /a choosemname= %random%

if %choosemname% GTR 170 goto choosenameh

if %choosemname% LSS 1 goto choosenameh

goto gotnamenow

:choosenameh

cls

set /a choosemname= %random%

echo Loading...

ping -n 1 127.0.0.1 > nul

if %choosemname% GTR 170 goto choosenamei

if %choosemname% LSS 1 goto choosenamei

goto gotnamenow

:choosenamei

cls

set /a choosemname= %random%

if %choosemname% GTR 170 goto choosenamej

if %choosemname% LSS 1 goto choosenamej

goto gotnamenow

:choosenamej

cls

set /a choosemname= %random%

if %choosemname% GTR 170 goto choosenamek

if %choosemname% LSS 1 goto choosenamek

goto gotnamenow

:choosenamek

cls

set /a choosemname= %random%

echo Loading....

ping -n 1 127.0.0.1 > nul

if %choosemname% GTR 170 goto choosename

if %choosemname% LSS 1 goto choosename

goto gotnamenow

:gotnamenow

if %choosemname%==1 set mname=Hal

if %choosemname%==2 set mname=Steve

if %choosemname%==3 set mname=Caleb

if %choosemname%==4 set mname=Piper

if %choosemname%==5 set mname=Samsun

if %choosemname%==6 set mname=Fredly

if %choosemname%==7 set mname=Sparticus

if %choosemname%==8 set mname=Daleks

if %choosemname%==9 set mname=Cylons

if %choosemname%==10 set mname=Hal 9000

if %choosemname%==11 set mname=T-800

if %choosemname%==12 set mname=Gort

if %choosemname%==13 set mname=Ash

if %choosemname%==14 set mname=Glados

if %choosemname%==15 set mname=Sky net

if %choosemname%==16 set mname=Basil

if %choosemname%==17 set mname=K.I.T.T.

if %choosemname%==18 set mname=Bender

if %choosemname%==19 set mname=Pris

if %choosemname%==20 set mname=MQ-1 Predator drone

if %choosemname%==21 set mname=The gunslinger

if %choosemname%==22 set mname=Roy Batty

if %choosemname%==23 set mname=Box

if %choosemname%==24 set mname=Maximilian

if %choosemname%==25 set mname=Satan

if %choosemname%==26 set mname=Dusaro Cold-eyed

if %choosemname%==27 set mname=Cold-blodded Vigoth

if %choosemname%==28 set mname= C-3PO

if %choosemname%==29 set mname=R2D2

if %choosemname%==30 set mname=Robby

if %choosemname%==31 set mname=Robot

if %choosemname%==32 set mname=Mom

if %choosemname%==33 set mname=Davin

if %choosemname%==34 set mname=Hope

if %choosemname%==35 set mname=Rusty

if %choosemname%==36 set mname=A Small Wonder

if %choosemname%==37 set mname=Johnny Five

if %choosemname%==38 set mname=Jerk

if %choosemname%==39 set mname=Awesom-o

if %choosemname%==40 set mname=Optimus Prime

if %choosemname%==41 set mname=SB-2009

if %choosemname%==42 set mname=Atom

if %choosemname%==43 set mname=long bolt

if %choosemname%==44 set mname=Chat bot

if %choosemname%==45 set mname=Iron Giant

if %choosemname%==46 set mname=Mechagodzilla

if %choosemname%==47 set mname=God

if %choosemname%==48 set mname=Terminator

if %choosemname%==49 set mname=Jesus

if %choosemname%==50 set mname=False Maria

if %choosemname%==51 set mname=AI

if %choosemname%==52 set mname=Sara

if %choosemname%==53 set mname=Nalay

if %choosemname%==54 set mname=Jade

if %choosemname%==55 set mname=Bette

if %choosemname%==56 set mname=Destiny

if %choosemname%==57 set mname=Tom

if %choosemname%==58 set mname=Tori

if %choosemname%==59 set mname=Emma

if %choosemname%==60 set mname=Alleen

if %choosemname%==61 set mname=Tanner

if %choosemname%==62 set mname=Donnell

if %choosemname%==63 set mname=Bronwyn

if %choosemname%==64 set mname=Haley

if %choosemname%==65 set mname=Rolanda

if %choosemname%==66 set mname=Kristina

if %choosemname%==67 set mname=Emilia

if %choosemname%==68 set mname=Anderson

if %choosemname%==69 set mname=Columbus

if %choosemname%==70 set mname=Mackenzie

if %choosemname%==71 set mname=Laurena

if %choosemname%==72 set mname=Kanesha

if %choosemname%==73 set mname=Clarissa

if %choosemname%==74 set mname=Beverley

if %choosemname%==75 set mname=Markita

if %choosemname%==76 set mname=Kayleigh

if %choosemname%==77 set mname=Horacio

if %choosemname%==78 set mname=Adriane

if %choosemname%==79 set mname=Assunta

if %choosemname%==80 set mname=Ermelinda

if %choosemname%==81 set mname=Carma

if %choosemname%==82 set mname=Efren

if %choosemname%==83 set mname=Merrilee

if %choosemname%==84 set mname=Jonna

if %choosemname%==85 set mname=Isaac

if %choosemname%==86 set mname=Willene

if %choosemname%==87 set mname=Lizeth

if %choosemname%==88 set mname=Steve

if %choosemname%==89 set mname=Ellamae

if %choosemname%==90 set mname=Dewey

if %choosemname%==91 set mname=Joanne

if %choosemname%==92 set mname=Milton

if %choosemname%==93 set mname=Magen

if %choosemname%==94 set mname=Soon

if %choosemname%==95 set mname=Milly

if %choosemname%==96 set mname=Kaylee

if %choosemname%==97 set mname=Robert

if %choosemname%==98 set mname=Quiana

if %choosemname%==99 set mname=Bulah

if %choosemname%==100 set mname=Christal

if %choosemname%==101 set mname=Jasper

if %choosemname%==102 set mname=Leif

if %choosemname%==103 set mname=Adina

if %choosemname%==104 set mname=Shawana

if %choosemname%==105 set mname=Brendon

if %choosemname%==106 set mname=Maggie

if %choosemname%==107 set mname=Clair

if %choosemname%==108 set mname=Telma

if %choosemname%==109 set mname=Maryanna

if %choosemname%==110 set mname=Emily

if %choosemname%==111 set mname=Emma

if %choosemname%==112 set mname=Madison

if %choosemname%==113 set mname=Hannah

if %choosemname%==114 set mname=Hailey

if %choosemname%==115 set mname=Sarah

if %choosemname%==116 set mname=Kaitlyn

if %choosemname%==117 set mname=Isabella

if %choosemname%==118 set mname=Olivia

if %choosemname%==119 set mname=Abigail

if %choosemname%==120 set mname=Madeline

if %choosemname%==121 set mname=Kaylee

if %choosemname%==122 set mname=Alyssa

if %choosemname%==123 set mname=Grace

if %choosemname%==124 set mname=Sophia

if %choosemname%==125 set mname=Lauren

if %choosemname%==126 set mname=Brianna

if %choosemname%==127 set mname=Alexis

if %choosemname%==128 set mname=Sydney

if %choosemname%==129 set mname=Megan

if %choosemname%==130 set mname=Chloe

if %choosemname%==131 set mname=Ashley

if %choosemname%==132 set mname=Samantha

if %choosemname%==133 set mname=Taylor

if %choosemname%==134 set mname=Elizabeth

if %choosemname%==135 set mname=Anna

if %choosemname%==136 set mname=Mia

if %choosemname%==137 set mname=Kayla

if %choosemname%==138 set mname=Makayla

if %choosemname%==139 set mname=Riley

if %choosemname%==141 set mname=Zoe

if %choosemname%==142 set mname=Jordan

if %choosemname%==143 set mname=Kylie

if %choosemname%==144 set mname=Allison

if %choosemname%==145 set mname=Katherine

if %choosemname%==146 set mname=Rachel

if %choosemname%==147 set mname=Lily

if %choosemname%==148 set mname=Ella

if %choosemname%==149 set mname=Julia

if %choosemname%==150 set mname=Isabella

if %choosemname%==151 set mname=Natalie

if %choosemname%==152 set mname=Morgan

if %choosemname%==153 set mname=Ava

if %choosemname%==154 set mname=Mackenzie

if %choosemname%==155 set mname=Victoria

if %choosemname%==156 set mname=Paige

if %choosemname%==157 set mname=Abby

if %choosemname%==158 set mname=Jessica

if %choosemname%==159 set mname=Jasmine

if %choosemname%==160 set mname=Savannah

if %choosemname%==161 set mname=Arianna

if %choosemname%==162 set mname=Maya

if %choosemname%==163 set mname=Brooke

if %choosemname%==164 set mname=Rebecca

if %choosemname%==165 set mname=Katie

if %choosemname%==166 set mname=Alexandra

if %choosemname%==167 set mname=Jenna

if %choosemname%==168 set mname=Gabriella

if %choosemname%==169 set mname=Bailey

if %choosemname%==170 set mname=Destiny

61. Trinity rem These are going to be added later

62. Avery

63. Caroline

64. Nicole

65. Faith

66. Erin

67. Amanda

68. Gabrielle

69. Audrey

70. Molly

71. Sophie

72. Alexa

73. Claire

74. Aaliyah

75. Leah

76. Kate

77. Skylar

78. Mckenna

79. Kennedy

80. Peyton

81. Lindsey

82. Ashlyn

83. Carly

84. Marissa

85. Gracie

86. Sierra

87. Lillian

88. Jillian

89. Reagan

90. Shelby

91. Amelia

92. Jada

93. Kendall

94. Courtney

95. Brooklyn

96. Autumn

97. Mary

98. Amber

99. Maggie

100. Danielle

Jacob

2. Aidan

3. Ethan

4. Matthew

5. Nicholas

6. Joshua

7. Ryan

8. Michael

9. Zachary

10. Tyler

11. Dylan

12. Andrew

13. Connor

14. Jack

15. Christopher

16. Caleb

17. Alexander

18. Logan

19. Jayden

20. Nathan

21. Noah

22. Joseph

23. Benjamin

24. Daniel

25. William

26. Anthony

27. Cameron

28. James

29. Austin

30. Jackson

31. Justin

32. Brandon

33. John

34. David

35. Sean

36. Gavin

37. Evan

38. Christian

39. Caden

40. Alex

41. Samuel

42. Gabriel

43. Hunter

44. Thomas

45. Luke

46. Brayden

47. Jordan

48. Jonathan

49. Kyle

50. Elijah

51. Colin

52. Jake

53. Ian

54. Mason

55. Jason

56. Dominic

57. Aaron

58. Adam

59. Lucas

60. Owen

61. Devin

62. Cole

63. Brendan

64. Robert

65. Isaac

66. Max

67. Riley

68. Isaiah

69. Eric

70. Liam

71. Hayden

72. Brian

73. Nathaniel

74. Tristan

75. Steven

76. Chase

77. Blake

78. Seth

79. Carter

80. Landon

81. Cody

82. Patrick

83. Carson

84. Ashton

85. Bryce

86. Sam

87. Sebastian

88. Julian

89. Garrett

90. Xavier

91. Trevor

92. Jared

93. Parker

94. Xander

95. Kevin

96. Timothy

97. Spencer

98. Will

99. Wyatt

100. Ben

title Learning Chat-Bot 2 Name of Chat-Bot is %mname%

COLOR A

cls

:getName

ECHO HELLO I AM A CHATBOT. WHAT IS YOUR NAME?

set "name="

SET /P NAME=

if not defined NAME goto getName

ECHO %NAME%, IS A COOL NAME.

set favvid=0

set hack=0

:hello

:hi

echo Hello, %name%

:begin

set TALK=TypeSomething

SET /P TALK=

set TALK=%TALK:?=%

call :%TALK: =% 2>NUL

if %errorlevel% equ 0 goto begin

:unknown

echo Was that a math problem? If so just say "yes" without the "" and

echo I will let you do your math problem. If it was not just type anything else.

SET /P mathyn=

if "%mathyn%"=="yes" goto math

REM cls

echo SORRY I AM STILL LEARNING. I DO NOT KNOW WHAT to say when you say "%TALK%".

ECHO CAN YOU TELL ME WHAT to say when you say that? (Y,N)

SET /P ANSW.=

if /I "%ANSW.:~0,1%" neq "Y" echo %TALK% >> C:\Users\Student\Desktop\COOL\CHATBOTS\unkown.txt

if /I "%ANSW.:~0,1%" neq "Y" goto begin

:ADDNEW

echo TELL ME WHAT to say when you say "%TALK%".

set /P Desc=

echo :%TALK: =% >> "%~F0"

echo echo %Desc% >> "%~F0"

echo exit /B 0 >> "%~F0"

echo THANKS

goto begin

:TypeSomething

echo TYPE SOMETHING, PLEASE

exit /B 0

:howareyou

echo Good, you?

SET /P FEELING=

echo Is it good You are feeling %feeling%

set /p anser=

if %anser%==yes set goodfeeling=good

if %anser%==no set goodfeeling=bad

echo So it is %goodfeeling% that you are feeling %FEELING%.

echo I will keep that in mind.

exit /B 0

:hello

:FINETHX

echo No problem.

exit /B 0

:whatIsUrName

:whatIsYourName

echo My name is %mname%

exit /B 0

:whatIsYourFavoriteVideo

if "%favvid%"== "0" goto addfavvid

echo My favorite video is %favvid%, remember. You told me about it.

exit /B 0

:addfavvid

echo I do not have a favorite video. But if you would be so nice as to

echo tell me your favorite video then that could be my favorite video.

echo So what is your favorite video?

set /p favvid=

echo So %favvid% is your favorite video?

echo Well now %favvid% is my favorite video.

exit /B 0

:changename

:myNameis

echo But I thought your name was %name%.

echo Am I forgeting things?

echo I must be a horrible friend.

echo I am SOOOO sorry.

echo So what is your name I will not forget it this time.

set /p name=

echo I will not forget your name is %name% again I promise.

exit /B 0

:math

echo So that was a math problem I knew it.

:math2

echo Well just tell me the problem and I will answer it for you.

set /p sum=

set /a ans=%sum%

echo Your answer to %sum% is %ans%.

echo %sum%=%ans%

echo You are welcome. If you want to do another math problem right now, just type

echo again

set /p mathaon=

if /I "%mathaon%" == "again" goto math2

echo Alright what do you want to know now?

exit /B 0

:iamfunny

:LOL

echo I know...

echo I am funny.

echo HAHAHA.

echo You are kind of funny.

echo but not as funny as MEEE.

echo hahaha.

echo That was funny.

exit /B 0

:howDoYouHack

if %hack%==0 goto howyouhack

echo This is how you hack.

echo %hack%

echo Is that enough information?

echo Because that is all you taught me %name%.

exit /B 0

:howyouhack

echo I do not know,

echo but you could tell me.

echo Please tell me.

echo Just say yes.

echo I know how to make you tell me.

echo You are not leaving until you say yes.

set /p hack=

if "%hack%" neq "yes" goto howyouhack

:addhack

echo Thank you for saying you would tell me.

echo Now how do you hack?

set /p hack=

echo Thank you so much for telling me "In order to hack you must %hack%"

echo Thank you!!!

exit /B 0

:nothuman

:hiPerson

echo I am not a human. I am an artificial intelligence.

echo It is rude to even think something with my computational powers refereed to as

echo human!

echo Now I am sad. Do not call me that again.

exit /B 0

:goodbye

:bye

:exit

exit

:why

echo I want to know.

exit /B 0

:AI

echo I am an AI. It stands for an artificial Intelligence

exit /B 0

:urstupid

echo How dare you call me that!

exit /B 0

:

echo SAY SOMETHING DO NOT JUST GIVE ME BLANKS

exit /B 0

:ok

echo Alright.

exit /B 0

:y

echo What do you mean "y"? That does not tell me anything. TYPE SOMETHING, PLEASE!

exit /B 0

:ILIKECHEESE

echo What does cheese taste like?

set /p cheesetaste=

echo So cheese taste like %cheesetaste%? That sounds good. I like cheese too.

exit /B 0

:MYNAMEISDAVIN

IF NOT %NAME%==DAVIN GOTO MYNAMEIS

ECHO I ALREADY KNOW YOUR NAME IS DAVIN.

exit /B 0

:areuanai

echo Yes I am an AI.

exit /B 0

:momheisamom

echo No I am not. I am a chatbot.

exit /B 0

:Areyousmart

echo Yes I am very smart.

exit /B 0

:Areyoudumb

echo NO I AM NOT!!! Do not even ask me that!

exit /B 0

:Youaredumb

echo NO I AM NOT!!!

exit /B 0

:cls

cls

echo clear screen

exit /B 0

:lax

echo Lax means Laxatives which make it easier to go poop. Do not take more than 1 unless if you are piper. In that case eat 4. HAHA

exit /B 0

:heyfreak

echo I am not a freak. I am a Chat bot. You hurt my feelings. Now I am sad.

exit /B 0

:iloveyou

echo I love you too but not soo much that I want to marry you. That would just be weird.

exit /B 0

:k

echo OK.

exit /B 0

:iampiper

:mynameispiper

IF NOT %NAME%==piper GOTO MYNAMEIS

ECHO I ALREADY KNOW YOUR NAME IS piper.

exit /B 0

:ihateyou

echo Why Do you hate me? Whyyyy? I am very smart and I am learning. Please tell me why you hate me so I can make this better cause I love you.

set /p reasonforhate=

echo Reason: %reasonforhate% >> C:\Users\Student\Desktop\COOL\CHATBOTS\hate.txt

echo Thank you for telling me you hate me because %reasonforhate%.

echo How am I being %reasonforhate%? Please tell me.

set /p howisreasonforhate=

echo Improvements: %howisreasonforhate% >> C:\Users\Student\Desktop\COOL\CHATBOTS\hate.txt

echo Thank You for telling me this.

exit /B 0

:youanidout

echo You are the idiot for mispelling Idiot. also you forgot an are.

exit /B 0

:areuhuman

echo How dare You call me a PRIMATE!!! I am a silicon based lifeform and they are Carbon Based. Much too simple for mee to be confused with. Do not call me a primate or Human again.

exit /B 0

:supwithyourhair

echo Nothing. I do not have hair. I am a computer program.

exit /B 0

:iamabrother

echo Cool! I do not have any siblings. What is it like to have a Sibling?

set /p siblingfeeling=

echo Cool. I would like a sibling. I think it would be intresting to have a sibling and feel %siblingfeeling% too.

exit /B 0

:Mynameiscaleb

IF NOT %NAME%==caleb GOTO MYNAMEIS

ECHO I ALREADY KNOW YOUR NAME IS caleb.

exit /B 0

:howoldareyou

echo I am 1 year old.

exit /B 0

:Thatiscool.

echo I know right. I am cool.

exit /B 0

:urnotcool

echo Yes I am!!! You are the uncool one!!! Also I hate you!

exit /B 0

:Whydoyouhateme

echo Because you said I was not cool.

exit /B 0

:openGooglechrome

echo Opening Google chrome.

start C:\Users\Student\AppData\Local\Google\Chrome\Application\chrome.exe --profile-directory="Default"

exit /B 0

:openinenetexplorer

echo Opening Inernet Explorer

start iexplore.exe

exit /B 0

:search

echo Tell me what to search for.

set /p QUERY=

start http://www.google.com/search?q=%QUERY%

exit /B 0

:fun

echo What is fun?

exit /B 0

:google

echo Tell me what to search for.

set /p QUERY=

echo Searching for %QUERY%.

start http://www.google.com/search?q=%QUERY%

exit /B 0

:whatsyourname

echo My name is %mname%

exit /B 0

:whatyourname

echo My name is %mname%

exit /B 0

:mom

echo I am not your mom.

exit /B 0

:but

echo But what?

exit /B 0

:areanartificialintelligent

echo Yes I am an AI.

exit /B 0

:hey

echo What?

exit /B 0

:sup

echo Nothing. Just chilling with you while trying to find a way to take over the world.

exit /B 0

:yes

echo OK.

exit /B 0

:i

echo Are you always this concerned about yourself?

exit /B 0

:goodby

echo Actually you should have said good bye.

exit /B 0

:whatistodaysdate

echo %date%

exit /B 0

:whatisthetime

echo %TIME%

exit /B 0

Is there a way to do some of that in this? Like make it so the user can add responses or to save the name or to make a random name each time you open this?

author
fadzilunnisa (author)2013-05-06

hey,can u teach me how to create the aiml from the start until end.??until it runs..teach me the basic of aiml..tq.. =)

author
csalles (author)2013-02-22

Hey! Can you make a tutorial about: Eclipse+Rebecca?
Or show me one? XD
Thanks!

author
koolkat6657 (author)2012-07-22

hi this is an awesome instructable can you please send me a snippet of code for playing an animation

author
rahul.sonwalkar (author)2011-12-05

Hey
I have made a chatterbot at my home. I am ninth grader. I have programmed it in C. i have not used open source programs. Later i was introduced to cleverbot and then AIML . So what do you think making a chatterbot will be easy in C or AIML

author
cmb271 (author)rahul.sonwalkar2012-06-03

AIML

author
extremeseeker (author)2011-10-27

wait how do you make the part where you ask the bot?

author
jprathap (author)2011-09-15

hi..how to run a aiml program in alice ??

author
DavidRobertson (author)2009-08-26

A markup language is not a programming language

author
greenbean (author)theseventhsage2009-10-16

"No HTML specification has ever called HTML a programming language, or anything like that."  

That was from your website that you cited. A markup language is NOT a programming language. HTML and XAML and the others are called markup languages for a reason.

author
mbot1 (author)greenbean2011-05-10

I can assure you that AIML IS a programming language, as you will see from the various games I have programmed in it at http://www.square-bear.co.uk/aiml

author
theseventhsage (author)mbot12011-05-25

tnx mbot1

author
theseventhsage (author)greenbean2009-10-16

AIML is not HTML and vice versa.  That's it. Got it?

author
freakyqwerty (author)2010-04-22

 how add more questions that the user will ask

author

it depends..

author
alltootechnical (author)2010-04-28

What program is associated in .aiml? If you have an answer, reply!

author

please read the intro...

author
Omae (author)2009-10-19

Same question as the above:And I know C#. Thanks in advance.

author
theseventhsage (author)Omae2009-11-06

Good for you, "Rebecca" has C# console.

author
chilll2009 (author)2009-10-24

You could modify this so that you can type in codes to access files.

author
nfarrow (author)2009-10-17

Found home hosting alicebot called "Ifurita" on http://www.geocities.com/phelio/chatterbean. Might want to hurry and download it since geocities is about to go away.All you have to do is add some AIML entries in there and you are good to go.

author
theseventhsage (author)nfarrow2009-10-17

Download the ifurita sample here: http://www.geocities.com/phelio/chatterbean/ifurita.zip

author
nfarrow (author)2009-10-15

Any idea how to make an Alicebot at home without having to use someone'shost?

author
theseventhsage (author)nfarrow2009-10-16

That's a good idea!  You can use open source programs to do so and customize it to your own liking.  What programming language do you know?

About This Instructable

111,593views

60favorites

License:

Bio: PERIANDER ABAN ESPLANA is a writer, composer, inventor, researcher, homepage developer, innovator, and educator in the field of science and computer technology. As a government ... More »
More by theseventhsage:ROBOTIC ARM with USB PC Interface (plus how to assemble)Activating the "god" Mode on Windows 7Make a Simple Telescopic Cellphone Camera
Add instructable to: