23.5.14 Cognition
What is cognition in Aetolia? In our parlance, it means a denizen that's hooked up to AI so that it can offer unique rather than pre-scripted responses and interactions. We pass what is called a "prompt" to the AI, and it responds.
Following is the process by which you enable cognition on your denizens:
Step One: Acquire Chars
-----------------------
First, you need to acquire some "chars", which is the currency you'll use with cognition. It represents the number of individual characters of text you can send and receive. You will generally need to purchase chars from the website, with prices at 20,000,000 chars for $10. If you're wondering why we have to charge for this, see HELP COGNITION FAQ. You can review your current "char" count with the command COGNITION SUMMARY.
Step Two: Enable the NPC
------------------------
Next, you'll need to enable cognition on an eligible* denizen you own. The command for this is: COGNITION ENABLE <target>
* Currently, eligible denizens are any pet (HELP PETS), minipet (HELP MINIPETS), a mount, a shopkeeper (HELP SHOPKEEPERS), and a house mob (HELP HOUSE MOBS).
Step Three: Create a Personality
--------------------------------
Then, write a Personality Page (PPage for short) for your denizen. This is what tells the AI what your denizen's personality is like and any other details you want to share. We pass the name and short description (like "Bobo, a sparkling unicorn"), gender (if any) and who it is loyal to (you), so you don't need to include that.
The command to setup a personality is: COGNITION PERSONALITY SET <target> [desc]. You can use the command COGNITION PERSONALITY SHOW <target> to see the current personality for your pet. NOTE: It is best practice to write this in 3rd person. See the FAQ below for examples.
We don't automatically pass the description of your denizen to the AI though, so you may want to include a description of what it looks like physically too, but remember that along with the background instructions we have to pass to the AI with every query (which you pay for in chars), the PPage info costs you chars too.
You can view how many chars a denizen's previous total prompt size was with COGNITION SUMMARY [target]. It will also display how many chars you have used on that denizen.
Step Four: Add Knowledge Pages
------------------------------
Knowledge pages are only sentient (talking) denizens. The AI already has a basic understanding of Aetolia lore and history, however it is incomplete and may be inconsistent. In order to make sure you denizen has in depth knowledge about a specific topic you can assign knowledge pages which will be sent to the AI.
See HELP COGNITION KPAGES to learn more.
Step Five: Enjoy
----------------
Now, just speak to or emote to your denizen, and it'll respond, deducting chars for both the prompt sent to the AI and the response received. You may also send tells to your denizen, but it will currently only use cognition if you are in the same room with it.
Hopefully it'll respond sanely, but it's difficult to fully constrain an AI's output, so it may sometimes send responses that don't fully make sense. That's just part and parcel of dealing with AI these days.
Please note that it will only respond to says and emotes that have directly targeted it, and only respond to you.
Cognition Syntax
----------------
COGNITION SUMMARY [target]
Show your usage limits, or info about a creature.
COGNITION ENABLE <target>
Enable cognition on a suitable target.
COGNITION DISABLE <target>
Disable cognition on a target.
COGNITION BUDGET SET <target|ME> <amount>
Set the daily chars budget for you or a creature.
COGNITION BUDGET OTHERS <target> <amount>
Allow other players to interact with your creature.
COGNITION BUDGET SHOW [target]
View the configured budget for you or a target.
COGNITION PERSONALITY SET <target> [desc]
Set the personality of a creature.
COGNITION PERSONALITY SHOW <target>
View the set personality of a creature.
COGNITION CONTEXT <target> <0-20>
Enable or disable a limited context for a creature (uses extra chars!). This will send all the indicated previous reactions generated by the AI as a form of memory. If set to 0, it will not send any context.
COGNITION PCONTEXT <target> <0-20>
Similar to cognition context, however this will only send the previous reactions generated by the character interacting with the denizen. For example, if Bob is talking to the creature and PCONTEXT is set to 10, it will send the last 10 reactions generated by Bob.
COGNITION PRIORITY <target> ON|OFF
Toggle whether a creature's cognition has priority over programmed reactions.
COGNITION ENTRY <target> ON|OFF
Set whether the creature will react when you enter the room.
COGNITION OENTRY <target> ON|OFF
Set whether the creature will react when other players enter the room. Note: You must set a budget for other players for this to work.
COGNITION EXPRESSIVE <target> ON|OFF
Set whether the creature will be more or less expressive when emoting.
COGNITION KPAGE
See the command syntax for knowledge pages.
Also See: HELP COGNITION PERSONALITY, HELP COGNITION KPAGES, HELP COGNITION RULES, HELP COGNITION FAQ, HELP AI ETHICS