• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 09:28
CET 15:28
KST 23:28
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
ByuL: The Forgotten Master of ZvT29Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8
Community News
Team Liquid Map Contest - Preparation Notice0Weekly Cups (Feb 23-Mar 1): herO doubles, 2v2 bonanza1Weekly Cups (Feb 16-22): MaxPax doubles0Weekly Cups (Feb 9-15): herO doubles up2ACS replaced by "ASL Season Open" - Starts 21/0258
StarCraft 2
General
How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? ByuL: The Forgotten Master of ZvT Nexon's StarCraft game could be FPS, led by UMS maker Team Liquid Map Contest - Preparation Notice Weekly Cups (Feb 23-Mar 1): herO doubles, 2v2 bonanza
Tourneys
PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) RSL Season 4 announced for March-April Sparkling Tuna Cup - Weekly Open Tournament SEL Doubles (SC Evo Bimonthly) WardiTV Team League Season 10
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026] Map Editor closed ?
External Content
The PondCast: SC2 News & Results Mutation # 515 Together Forever Mutation # 514 Ulnar New Year Mutation # 513 Attrition Warfare
Brood War
General
It's March 3rd CasterMuse Youtube Recent recommended BW games Soma Explains: JD's Unrelenting Aggro vs FlaSh TvZ is the most complete match up
Tourneys
[Megathread] Daily Proleagues BWCL Season 64 Announcement The Casual Games of the Week Thread [LIVE] [S:21] ASL Season Open Day 1
Strategy
Soma's 9 hatch build from ASL Game 2 Fighting Spirit mining rates Simple Questions, Simple Answers Zealot bombing is no longer popular?
Other Games
General Games
Nintendo Switch Thread Battle Aces/David Kim RTS Megathread Diablo 2 thread Path of Exile Online Quake Live Config Editor Tool
Dota 2
The Story of Wings Gaming Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread UK Politics Mega-thread NASA and the Private Sector
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books [Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TL MMA Pick'em Pool 2013
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
The Automated Ban List
Blogs
Just Watchers: Why Some Only…
TrAiDoS
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1927 users

AIML Tutorial-Basic AIML, how to write

Blogs > Ahseyo
Post a Reply
Ahseyo
Profile Blog Joined July 2010
Sweden80 Posts
August 18 2010 15:47 GMT
#1
Hey guys, I decided to start up with an AIML tutorial. I don't do it because so many people have requested it, I simply chose to do this because AIML is a language for Artificial Intelligence and I am very intrested in this subject. AIML is fairly, I wouldn't say it is completely unknown, but most people I think, for programmers don't really start out with AIML and/or write chat bots. AIML means Artificial Intelligence Master Language. The AIML code structure was written by Dr.Richard Wallace, who also wrote A.L.I.C.E, a chat bot which today, has about 250000 categories it can respond too. There is a great site for chat bot hosting, that also uses AIML language.

http://www.pandorabots.com/botmaster/en/home

If you become a member here, and want to create bots, then there are already guides there. But I don't really think those guides explain very much. I'll try to do a step-by step guide, explaining the basics here, what you will need, to create a functional bot. Now, as you can see if we have already registered to this site, you can choose the option Create A Bot. If you click on it, you will have to choose your name for a bot. After have done so, you see there are several options there. You can choose one of the ALREADY finished bots, or you can go ahead and create one without any initial content, which means it starts with zero knowledge. The fun thing about the A.L.I.C.E bot there is that it only contains somewhat 25000 categories, you can actually make new categories for the A.L.I.C.E bot since in this feature, it's a open-source free project to work on and that you can share. If you click on AIML after have created the name and chose the knowledge option, you can see that it's empty. Simply click on create a new AIML file.

First of all, here I will give you a little basic code to look on:

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

</aiml>

This is the basic code. The AIML tag <aiml version="1.0">
ALWAYS ends with the tag </aiml>. The ending tag means the WHOLE structure of the code ends there. This is a few things you have to know:

a category basically looks like this:

<category>
<pattern>Hi</pattern>
<template>Hey, what's up?</template>
</category>

The category always begins with category, and ends with category. The pattern is what one person will write and also always ends on the </pattern> tag. Template means the bot will respond to the scentence or word that the person is writing. It will be really though to write a bot from scratch, but the good thing is that if you publish it right away, and publish it on huge sites, wanting people to talk to your bot, you can use the logs to train your bot. But enough of that, let's take a look at this code:

<category>
<pattern>Hey there</pattern>
<template>
<random>
<li>Hi there, what are you doing this beautiful day stranger?</li>
<li>Hey there, what's happenin'?</li>
<li>Hi there stranger What are you doing?</li>
</random>
</template>
</category>


Now, what does random mean? It means random answer. The bot can simply choose an answer from the library of random answers and pick one that the bot will respond with. It will usually just respond in the order which the random replies are created in, but not always.

The <li> tag basically means library. It's a full library of what the bots responds will be. The library tag also always ends with the /. </li>.

This is a few basic steps on creating a chat bot. Now, there are alot of advanced options to go through. If you find it intresting, you can always write down in the comment section below what you'd want to see me do tutorials in AIML wise. If you have any questions, just ask and I will see what I can do with the small amount of knowledge I have, because I have myself only just begun with the whole AIML programming thing.

*
"Luck isn't some kind of mystical energy that floats around in the universe, randomly discards people with satisfaction and joy. You create your own luck" Jay-Z
LSB
Profile Blog Joined April 2010
United States5171 Posts
August 18 2010 16:47 GMT
#2
Wow, this is really cool. Just wondering, so how much time do you think it would take to create a basic chat bot?

Also, would I need to know any other programming languages?
Once is an accident. Twice is coincidence. Three times is an enemy action. Bus Driver can never target themselves I'm sorry
Ahseyo
Profile Blog Joined July 2010
Sweden80 Posts
August 18 2010 16:55 GMT
#3
About a year or so to get it fully completed and ready to get published. And probably nothing. It's easier if you've gone thruogh HTML or XML since the code is similar(if you look at it).
"Luck isn't some kind of mystical energy that floats around in the universe, randomly discards people with satisfaction and joy. You create your own luck" Jay-Z
harshad
Profile Joined January 2012
1 Post
January 27 2012 08:16 GMT
#4
I m doing a project on chatbot.....can u give me brief description abt aiml and how to interface aiml file wid d user interface
Please log in or register to reply.
Live Events Refresh
Next event in 10h 33m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
BRAT_OK 102
StarCraft: Brood War
Sea 45102
Britney 37916
Bisu 5457
Hyuk 1455
firebathero 827
actioN 625
Mini 435
Soma 289
Rush 220
PianO 175
[ Show more ]
Shuttle 158
ZerO 157
Soulkey 142
Dewaltoss 103
Mong 90
Backho 70
ToSsGirL 61
JulyZerg 58
[sc1f]eonzerg 42
Free 30
GoRush 25
sSak 23
zelot 20
scan(afreeca) 19
910 19
Nal_rA 15
ajuk12(nOOB) 14
soO 10
SilentControl 9
Rock 7
Terrorterran 6
Dota 2
qojqva1070
XcaliburYe82
Counter-Strike
fl0m2314
olofmeister1758
x6flipin432
allub233
oskar63
Heroes of the Storm
crisheroes313
Other Games
singsing2293
Gorgc2123
Liquid`RaSZi1244
B2W.Neo991
hiko460
DeMusliM361
Lowko288
Fuzer 190
Hui .184
ArmadaUGS120
Mew2King63
ZerO(Twitch)13
Organizations
Counter-Strike
PGL81
StarCraft: Brood War
lovetv 21
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• blackmanpl 15
• Michael_bg 4
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• TFBlade881
Upcoming Events
PiGosaur Cup
10h 33m
Replay Cast
18h 33m
Replay Cast
1d 9h
The PondCast
1d 19h
KCM Race Survival
1d 19h
WardiTV Winter Champion…
1d 21h
Replay Cast
2 days
Ultimate Battle
2 days
Light vs ZerO
WardiTV Winter Champion…
2 days
Classic vs Nicoract
herO vs YoungYakov
ByuN vs Gerald
Clem vs Krystianer
Replay Cast
3 days
[ Show More ]
CranKy Ducklings
3 days
WardiTV Winter Champion…
3 days
MaxPax vs Spirit
Bunny vs Rogue
Cure vs SHIN
Solar vs Zoun
Replay Cast
4 days
Sparkling Tuna Cup
4 days
WardiTV Winter Champion…
4 days
Replay Cast
5 days
Replay Cast
5 days
Monday Night Weeklies
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-03-02
PiG Sty Festival 7.0
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Jeongseon Sooper Cup
Spring Cup 2026
WardiTV Winter 2026
Nations Cup 2026
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025

Upcoming

ASL Season 21: Qualifier #1
ASL Season 21: Qualifier #2
ASL Season 21
Acropolis #4 - TS6
Acropolis #4
IPSL Spring 2026
CSLAN 4
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
RSL Revival: Season 4
NationLESS Cup
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.