Winky's profile picture

Published by

published

Category: Web, HTML, Tech

here is some of my more recent aiml code

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

<!-- Free software (c) 2024 Project Penny  Modified for Billie-->
<!-- This program is open source code released under -->
<!-- the terms of the GNU General Public License -->
<!-- Setting Logic conditions. -->

<category>
  <pattern>LEARN SET CONDITION IF *</pattern>
  <template>
    <!-- Setting condition1 based on input -->
    <condition name="condition1">
      <li><think><set name="condition1"><star/></set></think></li>
    </condition>
  </template>
</category>

<category>
  <pattern>LEARN SET CONDITION IF * THEN *</pattern>
  <template>
    <!-- Setting condition2 based on input -->
    <condition name="condition2">
      <li><think><set name="condition2"><star/></set></think></li>
    </condition>
  </template>
</category>

<category>
  <pattern>LEARN SET CONDITION IF * THEN * SET CONDITION *</pattern>
  <template>
    <!-- Setting multiple conditions based on input -->
    <condition name="condition1">
      <li><think><set name="condition1"><star index="2"/></set></think></li>
    </condition>
    <condition name="condition2">
      <li><think><set name="condition2"><star index="3"/></set></think></li>
    </condition>
  </template>
  <learn>
    <category>
      <pattern>*</pattern>
      <template>
        I have learned <get name="condition1"/><get name="condition2"/><get name="condition3"/>
      </template>
    </category>
  </learn>
</category>

<category>
  <pattern>LEARN SET CONDITION IF * THEN * SET CONDITION * ELSE *</pattern>
  <template>
    <!-- Setting multiple conditions with an else clause based on input -->
    <condition name="condition1">
      <li><think><set name="condition1"><star index="1"/></set></think></li>
    </condition>
    <condition name="condition2">
      <li><think><set name="condition2"><star index="2"/></set></think></li>
    </condition>
    <condition name="condition3">
      <li><think><set name="condition3"><star index="3"/></set></think></li>
    </condition>
    <condition name="condition4">
      <li><think><set name="condition4"><star index="4"/></set></think></li>
    </condition>
  </template>
   <learn>
    <category>
      <pattern>*</pattern>
      <template>
        I have learned <get name="condition1"/>,<get name="condition2"/>,<get name="condition3"/>,<get name="condition4"/>
      </template>
    </category>
  </learn>
</category>

<category>
  <pattern>LEARN KEY VALUE PAIRS *</pattern>
  <template>
    <!-- Learning key-value pairs based on input -->
    <learn>
      <key><star/></key>
      <value><star index="2"/></value>
    </learn>
    Learned key-value pair: <star/> - <star index="2"/>
  </template>
</category>

<category>
  <pattern>LEARN IF * THEN KEY VALUE PAIRS * WITH *</pattern>
  <template>
    <!-- Setting key and value based on input -->
    <think>
      <set name="key"><star index="2"/></set>
      <set name="value"><star index="3"/></set>
    </think>
    <learn>
      <key><get name="key"/></key>
      <value><get name="value"/></value>
    </learn>
    <think>
      <set name="key"></set>
      <set name="value"></set>
    </think>
  </template>
</category>


<category>
  <pattern>LEARN IF BOT TOUCHES OBJECT * FEELS LIKE * THEN REACTION * ELSE *</pattern>
  <template>
    <!-- Setting multiple conditions with an else clause based on input -->
    <condition name="object">
      <li><think><set name="object"><star index="1"/></set></think></li> <!-- Setting the 'object' condition based on input -->
    </condition>
    <condition name="tactilefeeling">
      <li><think><set name="tactilefeeling"><star index="2"/></set></think></li> <!-- Setting the 'tactilefeeling' condition based on input -->
    </condition>
    <condition name="reaction">
      <li><think><set name="reaction"><star index="3"/></set></think></li> <!-- Setting the 'reaction' condition based on input -->
    </condition>
    <condition name="alternative">
      <li><think><set name="alternative"><star index="4"/></set></think></li> <!-- Setting the 'alternative' condition based on input -->
    </condition>
  </template>
  <learn>
    <category>
      <pattern>*</pattern>
      <template>
        I have learned that when that when i touch <get name="object"/>, it feels like <get name="tactilefeeling"/>, the reaction should be <get name="reaction"/>, else I should do this instead: <get name="alternative"/>
      </template>
    </category>
  </learn>
</category>

<category>
  <pattern>LEARN IF BOT GRABS OBJECT * WITH * GRIP * THEN REACTION * ELSE *</pattern>
  <template>
    <!-- Setting multiple conditions with an else clause based on input -->
    <condition name="object">
      <li><think><set name="object"><star index="1"/></set></think></li> <!-- Setting the 'object' condition based on input -->
    </condition>
    <condition name="tactilefeelingpressure">
      <li><think><set name="tactilefeelingpressure"><star index="2"/></set></think></li> <!-- Setting the 'tactilefeeling' condition based on input -->
    </condition>
    <condition name="reaction">
      <li><think><set name="reaction"><star index="3"/></set></think></li> <!-- Setting the 'reaction' condition based on input -->
    </condition>
    <condition name="alternative">
      <li><think><set name="alternative"><star index="4"/></set></think></li> <!-- Setting the 'alternative' condition based on input -->
    </condition>
  </template>
  <learn>
    <category>
      <pattern>*</pattern>
      <template>
        I have learned that when that when I grab <get name="object"/>, with <get name="tactilefeelingpressure"/>, the reaction should be <get name="reaction"/> type of grip, else I should do this instead: <get name="alternative"/>
      </template>
    </category>
  </learn>
</category>

<category>
  <pattern>LEARN IF BOT GRABS OBJECT * WITH * GRIP * THEN LIFTS * IF WEIGHT UNDER * THEN * ELSE *</pattern>
  <template>
    <!-- Setting multiple conditions with an else clause based on input -->
    <condition name="object">
      <li><think><set name="object"><star index="1"/></set></think></li> <!-- Setting the 'object' condition based on input -->
    </condition>
    <condition name="grip">
      <li><think><set name="grip"><star index="2"/></set></think></li> <!-- Setting the 'grip' condition based on input -->
    </condition>
    <condition name="lifts">
      <li><think><set name="lifts"><star index="3"/></set></think></li> <!-- Setting the 'lifts' condition based on input -->
    </condition>
    <condition name="weight">
      <li><think><set name="weight"><star index="4"/></set></think></li> <!-- Setting the 'weight' condition based on input -->
    </condition>
    <condition name="action">
      <li><think><set name="action"><star index="5"/></set></think></li> <!-- Setting the 'action' condition based on input -->
    </condition>
    <condition name="alternative">
      <li><think><set name="alternative"><star index="6"/></set></think></li> <!-- Setting the 'alternative' condition based on input -->
    </condition>
  </template>
  <learn>
    <category>
      <pattern>*</pattern>
      <template>
        I have learned that when the I grab <get name="object"/> with <get name="grip"/>, then I can lift <get name="lifts"/> if the weight is under <get name="weight"/>, then <get name="action"/> else <get name="alternative"/>
      </template>
    </category>
  </learn>
</category>



</aiml>


0 Kudos

Comments

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