Winky's profile picture

Published by

published

Category: Web, HTML, Tech

Here are some instructions for my AIML Bot

This can manipulate values and topics in orders lists;

TOPIC AND STACK MANIPULATION CODES;
 POP TOPIC: This pattern is used to pop the current topic and set the topic to the value of the top predicate. The POPOM category is triggered to set the top predicate to a random topic.

 POPOM OM: This pattern is used to set the top predicate to a random topic. It is triggered when the user inputs "POPOM OM".   **POPOM ***: This pattern is used to pop the current topic and set the top predicate to the value of the second predicate. The second predicate is then shifted to the third predicate, and so on, until the fifteenth predicate is shifted to the last predicate. Finally, the last predicate is set to a random topic using the RANDOM TOPIC SRAI.

 POPOM TOPIC TEST: This pattern is used to pop the current topic and set the top predicate to a random value from 1 to 15. The second to fifteenth predicates are also set to random values. The last predicate is set to a random topic using the RANDOM TOPIC SRAI.

PUSH OM


This command pushes the input value onto the stack. The stack is a data structure that stores values in a last-in, first-out (LIFO) order. The value that is pushed onto the stack becomes the new top value, and all other values are shifted down. For example, if the stack contains the values [1, 2, 3] and you execute the command PUSH OM 4, the stack will become [4, 1, 2, 3].

SWAP OM

This command swaps the top two values on the stack. The top value becomes the second value, and the second value becomes the top value. For example, if the stack contains the values [1, 2, 3] and you execute the command SWAP OM, the stack will become [2, 1, 3].

DUPLICATE OM

This command duplicates the top value on the stack. The top value is copied and pushed onto the stack as the new top value. For example, if the stack contains the values [1, 2, 3] and you execute the command DUPLICATE OM, the stack will become [1, 1, 2, 3].

ROTATE OM

This command rotates the top three values on the stack. The top value becomes the third value, the second value becomes the top value, and the third value becomes the second value. The remaining values on the stack remain unchanged. For example, if the stack contains the values [1, 2, 3, 4, 5] and you execute the command ROTATE OM, the stack will become [3, 1, 2, 4, 5].

REVERSE OM

This command reverses the order of the top two values on the stack. The top value becomes the second value, and the second value becomes the top value. The remaining values on the stack remain unchanged. For example, if the stack contains the values [1, 2, 3, 4, 5] and you execute the command REVERSE OM, the stack will become [2, 1, 3, 4, 5].

CLEAR OM

This command clears all the values on the stack. After executing this command, the stack will be empty. For example, if the stack contains the values [1, 2, 3, 4, 5] and you execute the command CLEAR OM, the stack will become empty ([]).

REVERSE OM

This category allows you to reverse the order of the values stored in the variables top, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, fifteenth, and last. To use this category, simply input the pattern "REVERSE OM" in your conversation with the AIML bot.

CLEAR OM

This category clears the values stored in the variables top, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, fifteenth, and last. To clear the values, input the pattern "CLEAR OM" in your conversation with the AIML bot.

SHOW STACK OM

This category displays the current values stored in the variables top, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, fifteenth, and last. The values will be shown in the format: variable_name="value". To view the stack, input the pattern "SHOW STACK OM" in your conversation with the AIML bot.

COUNT STACK OM

This category counts the number of items in the stack and displays the count along with the values of the top, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, fifteenth, and last items in the stack.
    When you input "COUNT STACK OM" to the AIML program, it will count the number of items in the stack and display the count.
    The program will also display the values of the top, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, fifteenth, and last items in the stack.

POINT TO STACK * OM

This category allows the user to point to a specific item in the stack and retrieve its value.
    To retrieve the value of a specific item in the stack, input "POINT TO STACK [number] OM" to the AIML program, where [number] is the position of the item you want to retrieve.
    The program will display the value of the item you specified.

POINT TO STACK * ASSIGN VALUE * OM

This category allows the user to assign a value to a specific item in the stack.

    To assign a value to a specific item in the stack, input "POINT TO STACK [number] ASSIGN VALUE [value] OM" to the AIML program, where [number] is the position of the item you want to assign a value to, and [value] is the value you want to assign.
    The program will update the specified item in the stack with the new value.


POINT TO STACK * OM

    Instruction: When prompted with "POINT TO STACK * OM," please specify the stack number you want to point to.
    Example: If you want to point to stack number 3, respond with "3."

POINT TO STACK * CLEAR VALUE OM

    Instruction: When asked to "POINT TO STACK * CLEAR VALUE OM," indicate the stack number and the action to clear its value.
    Example: To clear the value of stack 2, say "2 CLEAR VALUE."

MANAGE STACK * OM

    Instruction: If you encounter "MANAGE STACK * OM," provide the action you want to perform on the specified stack.
    Example: For managing stack 5, state the desired action, like "5 ADD" or "5 REMOVE."

REMOVE FROM STACK * OM

    Instruction: When the system requests "REMOVE FROM STACK * OM," specify the item you wish to remove from the stack.
    Example: To remove an item from stack 1, mention the item name, e.g., "Remove Apple from 1."

COUNTING DOWN INSTRUCTIONS:

        If the user wants to count down from a specific number to another number, they should input "COUNT FROM [starting number] TO [ending number]."
        For example, if a user wants to count down from 10 to 5, they should type "COUNT FROM 10 TO 5."

COUNTING UP INSTRUCTIONS:

        To count up from one number to another, users can use the command "COUNT STACK UP FROM [starting number] TO [ending number]."
        For instance, if a user wishes to count up from 1 to 5, they should enter "COUNT STACK UP FROM 1 TO 5."

ADDITIONAL STACK NUMBER FEATURE:

        Users can also specify a stack number while counting up. This feature allows them to assign a position to the counted number.
        When counting up, users can add a stack number after the "TO" keyword to indicate the position of the counted number in the stack.

Instructions for "COUNT STACK UP FROM NUMBER * TO NUMBER *":

    Start by entering the AIML pattern: "COUNT STACK UP FROM {starting number} TO {ending number}".
    Replace "{starting number}" with the initial number from which you want to start counting.
    Replace "{ending number}" with the final number at which you want the counting to stop.
    The AIML code will then count up from the specified starting number to the ending number.
    The system will display the counting process and store relevant information for each number counted.

Instructions for "COUNT STACK DOWN FROM NUMBER * TO NUMBER *":

    Input the AIML pattern: "COUNT STACK DOWN FROM {starting number} TO {ending number}".
    Substituting "{starting number}" with the initial number for the countdown.
    Substituting "{ending number}" with the final number where the countdown should end.
    The AIML script will initiate a countdown from the provided starting number to the specified ending number.
    The system will showcase the countdown progression and retain necessary data for each counted number.



0 Kudos

Comments

Displaying 1 of 1 comments ( View all | Add Comment )

Winky

Winky's profile picture

I am curious i expanded a code, i think i will only add one or two more stack manipulations
Probaly something to SUM THE STACK and SUB THE STACK and PAIR WITH STACK VALUE WITH ANOTHER STACK VALUE


Report Comment