--------------------[ AineL Mini Tutorial ]------------------------

		****************************
		***** WORK IN PROGRESS *****
		****************************
		
 "Everything should be as simple as it is, but not simpler."
                                     - Albert Einstein

AineL is based on AIML ( www.alicebot.org ).
I'm sorry, this "Mini Tutorial" is very vague,
covers only most important things in AineL,
but you can learn many things by looking at ready .aine files.
--------------------------------------------------------------------


Aine - interpreter
AineL - language




    	    +[WHAT USER SAY]
	    -[What bot will reply.]

Hints:
- User input (everything in +[HERE] ) *have* to be UPPERCASE!)
- In "user input" dot ('.') is the default "end character" (so you don't have to type it),
        and dot also matches '?' and '!' and no end character at all.
	Question mark ('?') matches *only* question mark, the same with '!' - only '!'.


	
Learn by examples:


1)
	+[HELLO BOT.]
	-[Hello human!]

This will make Bot respond to "Hello bot", "Hello bot", "Hello bot?" and "Hello bot!"
 - Bot will reply "Hello human!".

 
Above will work exactly like this one:
	+[HELLO BOT]
	-[Hello human!]



2)
    +[HELLO <*>]
    -[Hi there.]

<*>      - indicates the input text fragment matching the pattern '*'.
	    So taking above example, if user will say to bot:
	    "hello bot"
		or
	    "hello aine"
		or
	    "hello nice aine"
		or
	    "hello anything here",
	    
	    bot will reply "Hi there."


	    
3)
	+[HI]
	-[<r><l>Hello!</l>
	<l>Hi.</l>
	<l>Hi there.</l></r>]

<r> means "random".
    If user will say "Hi", bot will choose a random reply: "Hello!", "Hi" or "Hi there".

    

4)
    +[I AM VERY SLEEPY]
    -[{I AM SLEEPY}]

    +[I AM SLEEPY]
    -[Maybe you should take a nap.]


    {THIS} call recursive.
    So, if an user will say "I am very sleepy", the bot will answer "Maybe you should take a nap.".



5)
    Another example of recursion:

    +[PLEASE TELL ME MORE ABOUT *]
    -[{TELL ME MORE ABOUT <*>}]

    +[TELL ME MORE ABOUT *]
    -[{TELL ME ABOUT <*>}]

    +[TELL ME ABOUT *]
    -[{<*>}]

    +[APPLE]
    -[Apple is a fruit. But Apple is also a computer company.]

    Now, if an user will say "Please tell me more about apple", or "Tell me more about apple" or "tell me about apple",
    the bot will reply "Apple is a fruit. But Apple is also a computer company."



6)
    Aine can operate on variables.
    <g=a_variable> shows the variable in output (if variable is not initialized - it will show ' ' (space)).
    <s=name>David</s> sets variable "name" to "David"

    Example:
    +[MY NAME IS DAVID]
    -[Nice to meet you <s=name>David</s>.]

    +[WHAT IS MY NAME]
    -[As far as I remember, your name is <g=name>.]

More advanced example:
    +[MY NAME IS *]
    -[Nice to meet you <s=name><*></s>.]

    

7)
    Imagine this conversation:
    bot: Hi user. What is your name?
    user: Agnes.

    How bot will match "Agnes" with the name?

    +[*]<t>WHAT IS YOUR NAME?</t>
    -[Nice to meet you <s=name><*></s>.

    If <t>THAT</t> matches previous bot reply - this category will be fired.

    
    In <t>HERE</t> you can use also wildcard ('*').
    You can also use '\':
    <t>\SOMETHING</t> will be searched in last user input
    - last bot user reply don't have to be equal to word "something", but
	have to contain word "something".


Conditional reply:
------------------

 -[You are quite
 <c=gender>
 <k=female> attractive.</k>
 <k=male> handsome.</k>
 <k> ... huh.. wait, what is your gender? </k></c>


 
Mood:
-----

 <l=HS>

 H = happiness/sadness
 S = sympathy/angriness
 
 H and S are in scale from 0 to 9.
 Default are 5.

 How to change:
 --------------

  /=55] won't change Aine's mood.
  /=46] give:
                -1 to hapiness,
		+1 to sympathy.

  Max=9, min=0.
  (9 + anything) == 9
  (0 - anything) == 0

-[I <r><l=55>am indiffrent.</l>
<l=95>am happy.</l>
<l=05>sad</l>
<l=50>don't trust you, and I won't tell you!</l>
<l=59>like you.</l></r>]


-----


<person2> X </person2>           - change X from 1st to 2nd person
<person2/>                       - the same as <person2><star/></person2>
<person> X </person>             - exchange 1st and 3rd person
<person/>                        - the same as <person><star/></person>

1st is your view / 2nd is someone elses / 3rd is omnipotent
I am cool /  He is cool / You are cool



Extensions:
----------

Mood tags, "save/usasaved", matching questions and exclamations - see manual.txt


Some commonly used get and set tags (you can use your convention):
------------------------------------------------------------------

 <g=name>		-  client's name
 <g=location>		-  client's location
 <g=gender>		-  client's gender

 <g=botname>		-  bot's name
 <g=botlocation>	-  bot's location
 <g=botmaster>		-  botmaster's name

 <s=gender>male</s>	-  sets client gender to male
 <s=gender>female</s>	-  sets client gender to female
 <s=name>X</s>		-  sets the client name to X




Last inputs/outputs:
--------------------
<input=1>		- what user just said
<input=2>		- what user said before

<that=1>		- what bot just said (it's NOT the same what bot is just saying)
<that=2>		- what bot said before




AIML equivalents: look at Aine manual, "readme.txt"
-----------------



-----------[ End Of Tutorial ]--------[ last update: 29.06.2003 ]----------

 Originally: Mini AIML Tutorial by Anthony Taylor.

 David Calinski (neodave(at)gmx.net)
