• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 13:15
CET 19:15
KST 03:15
  • 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
The Road to Katowice - 2022/23 Retrospective21Disasterpiece Theater: Soulkey vs sOs (2013-05-21)11WTL 2022 Winter - Regular Season Awards + Wrap-up24WTL Winter - The 2v2 Tour25WTL 2022 Winter - Regular Season Finale7
Community News
Rex leaves ONSYDE, Ryung joins4[BSL16] - RO16 Group Stage11ESL Open Cup #159: herO, Spirit, Dark win5WardiTV 2023 Opens (Monthly)1IEM Katowice 2023 - Hosts & Commentators36
StarCraft 2
General
Waxangel talks Stormgate, ST_Life, Katowice & more IEM Katowice 2023 - Hosts & Commentators SC2 shut down in China, WTL to continue 5.0.11 Patch Released - Balance Changes Interview with RuFF at Dreamhack Atlanta 2022
Tourneys
Sniper's Team League Season 2 NorCal StarFest I [Alpha Pro Series] MaxPax vs ByuN WardiTV 2023 Opens (Monthly) $5000 #PassionCraft Knockout
Strategy
Custom Maps
[A] (Minigames) Raynor Party [A] [TPS RPG] Transformers: Open World (WIP) Work In Progress Melee Maps
External Content
Mutation # 354 Media Blackout Mutation # 353 Hostile Territory Mutation # 352 Railroad Switch Mutation # 351 Assembly of Vengeance
Brood War
General
[24H] mmr bot on USWest BGH auto balance -> http://bghmmr.eu/ BW General Discussion UMS maps by GrizzleSyndrome Custom Campaign Upload
Tourneys
[BSL16] - RO16 Group A - Saturday 18:00 CET [Megathread] Daily Proleagues New Worlds Map Contest III: All Submissions (VOTE HERE) Sanpao StarLeague Spring Cup S4 : Korea
Strategy
Simple Questions, Simple Answers Marine rate of fire Valkyrie dmg formula? 2v2 Spell Combos
Other Games
General Games
Fire Emblem Final Fantasy XIV The XBox Thread Destiny 2 - PC/Xbox/PS4 Frost Giant announce Stormgate
Dota 2
[DPC 23] Tour 1 Discussion Official Dota and Chess General Discussion
League of Legends
[Spring 2023] LoL E-sports General Discussion LiquidLegends to reintegrate into TL.net [Patch Notes] Release General Discussion
Heroes of the Storm
HotS: WP and Funny Moments
Hearthstone
TL Mafia
TL Mafia Community Thread TL Mafia Plays: Diplomacy
Community
General
US Politics Mega-thread Coronavirus and You Russo-Ukrainian War Thread Canadian Politics Mega-thread YouTube Thread
Fan Clubs
The Flash Fan Club The GoOdy Fan Club The TY Fan Club
Media & Entertainment
[TV] HBO The Last Of Us series Anime Discussion Thread Korean Music Discussion [Manga] One Piece Movie Discussion!
Sports
2022 - 2023 Football Thread TeamLiquid Health and Fitness Initiative For 2022 2021 NFL/CFB Season NBA General Discussion
World Cup 2022
FIFA World Cup 2022 - Knockout Stage FIFA World Cup Qatar 2022 Thread
Tech Support
SC2 lagging in windowed (fullscreen) mode Left control suddenly mutes volume Red text blurry and funky blue on black text
TL Community
Ask TL Staff Anything Happy Birthday R1CH! Is there a SQSA thread for this site?
Blogs
Hosting/casting tournies for t…
Trozz
It's that time of year YET A…
Umpteen
I'm still around doodling and…
Glider
Someone Crashed my Plane …
micronesia
A spiritual journey th…
mewithoutDrew
The Kitty Arcade Saga
MrBitter
My Goals for 2023
DeNikSSB
State of StarCraft II
Jealous
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1528 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
CSO Cup
17:00
🏆 CSO Cup #54
Liquipedia
BSL: ProLeague
17:00
Ro 16, Group A
OyAji vs RushGoon
Fengzi vs XiaoShuai
LiquipediaDiscussion
Showmatch
15:00
Aristori Showmatches #3
Aristorii98
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
TKL 196
Ketroc 89
BRAT_OK 57
StarCraft: Brood War
Britney 55408
Calm 3794
Leta 426
ZZZero.O 411
BeSt 341
Mong 338
Shuttle 298
Hyun 81
zelot 55
Rock 31
Dota 2
Gorgc11103
qojqva4747
febbydoto80
Counter-Strike: Global Offensive
fl0m2917
Other Games
Stewie2K4780
singsing3671
Beastyqt688
Lowko530
crisheroes464
ArmadaUGS347
MaximusBlack316
Fnx 225
Crank 174
KnowMe135
nookyyy 133
QueenE87
ToD69
rubinoeu2
Organizations
Counter-Strike: Global Offensive
ESL CS:GO32646
ESL CS:GO B26508
Other Games
B2W.Neo4155
gamesdonequick1295
StarCraft 2
Esl_sc2329
ESL.tv329
Dota 2
BeyondTheSummit176
StarCraft: Brood War
StarcraftVOD1
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 21 non-featured ]
StarCraft 2
• 3DClanTV 132
• poizon28 70
• MindelVK 27
• undefetable020
• printf 12
• aXEnki
• LaughNgamez Trovo
• Poblha
• Alpha X_
• Migwel
• Laughngamez YouTube
• Kozan
• Gussbus
• intothetv
• IndyKCrew
StarCraft: Brood War
• HerbMon 13
• Airneanach6
• sscaitournament1
• AfreecaTV YouTube
• BSLYoutube
• STPLYoutube
Upcoming Events
ESL Pro Tour
8h 45m
BSL: ProLeague
22h 45m
Zhanhun vs Razz
Dewalt vs Jaystar
DaveTesta Events
1d 1h
ESL Pro Tour
1d 22h
ESL Pro Tour
2 days
IEM
3 days
IEM
4 days
IEM
5 days
IEM
6 days
BSL: ProLeague
6 days
Mihu vs TerrOr
Bonyth vs LCYDH
Liquipedia Results

Completed

KOR-CHN Invitational League 2: Saber vs Mihu
OSC Championship Season 10
NGS Storm Division S6 Qual. 5
BLAST Premier Spring Groups

Ongoing

BSL Season 16
KCM Race Survival 2023 Season 1
KCM Ladies Race Survival 2023 Season 1
Individual Golden League
Strength Challenge 30K
Tournament of Honor
Y.H Spring cup
FS Mania
RISS Season 1
Spring Cup Season 4: Korea
Spring Cup 4: Chinese Qualifier
Spring Cup 4: Chinese Qualifier 1
WTL 2022 Winter
NGS Storm Division S6
Torneo Latinoamericano Héroes de la Tormenta (TLHT) - Season 7
ESL Challenger League S44 NA
ESL Challenger League S44 EU
ESL Challenger League S44 AP
IEM Katowice 2023

Upcoming

Hongtu Solo League S5: KOR
Spring Cup Season 4: China
ASL Season 15
CHN vs KOR Week32
Spring Cup Season 4
Spring Cup 4: Chinese Qualifier 2
CHN vs KOR Week31
#PassionCraft Knockout
IEM Katowice 2023
BLAST.tv Paris Major 2023
ESL Challenger Melbourne 2023
BLAST.tv Paris 2023: EU RMR B
BLAST.tv Paris 2023: EU RMR A
BLAST.tv Paris 2023: AME RMR
BLAST.tv Paris 2023: APAC RMR
BLAST Premier Spring AME Showdown
BLAST Premier Spring EU Showdown
ESL Pro League Season 17
CCT Central EU Malta 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 © 2023 TLnet. All Rights Reserved.