Skip to content

AI Pharmaceuticals

Moti Barski edited this page Aug 21, 2026 · 5 revisions

AI Pharmaceuticals in LivinGrimoire

Welcome to the LivinGrimoire pill skills documentation! This guide introduces the concept of AI pharmaceuticals, also known as LivinGrimoire skills. These skills interact with the external environment of a LivinGrimoire object and follow a specific naming convention: PillSkillName.

Concept

AI pharmaceuticals are special skills that can alter various aspects of the LivinGrimoire reality perception and interaction system. They can:

  • Change the interval duration of a tick event, which triggers the LivinGrimoire.
  • Modify input before it reaches the processing Lobe class.
  • mod output methods.

Naming Convention

All AI pharmaceutical skills follow the naming convention: PillSkillName.

Creating AI Drugs

AI drugs can be tailored to affect specific skills, provided those skills have receptor code to react to the drug's special input.

Example: PillAccelo

Here is an example of a skill called PillAccelo, inspired by the brain acceleration drug from the anime "Serial Experiments Lain". This skill accelerates the brain's processing speed within the LivinGrimoire system.

class PillAccelo(Skill):
    NORMAL_INTERVAL = 1.0
    ACCELO_INTERVAL = 0.3

    def __init__(self, brain: Brain):
        super().__init__()
        self.brain = brain
        self._acceled = False
        self._accelo_until = 0.0

    def input(self, ear: str, skin: str, eye: str):
        triggers = {"accelerate", "accelo", "take the acceleration pill", "dial it in"}
        if any(t in ear.lower() for t in triggers):
            self._engage()
            return
        if self._acceled and time.time() >= self._accelo_until:
            self._acceled = False
            self.brain.set_tick_interval(PillAccelo.NORMAL_INTERVAL)
            print("[Accelo] wearing off — back to normal clock")

    def _engage(self):
        self._acceled = True
        self._accelo_until = time.time() + 120
        self.brain.set_tick_interval(PillAccelo.ACCELO_INTERVAL)
        print("[Accelo] pill taken — clock accelerated")
        self.setSimpleAlg("overdrive protocol initiate")

    def skillNotes(self, param: str) -> str:
        if param == "notes":
            return "speeds up brain tick rate on command"
        elif param == "triggers":
            return "accelerate, accelo, dial it in"
        return "note unavailable"

Integration

To add the PillAccelo skill to your Brain:

brain.add_skill(PillAccelo(brain))  # Add Accelo skill

Conclusion

In this example, the PillAccelo skill is added directly to a Brain object as a Skill. It accelerates the brain's processing speed by calling brain.set_tick_interval() to shorten the tick interval for a fixed duration (120 seconds), then reverts it once that window elapses.

Clone this wiki locally