battle programmers alliance
Would you like to react to this message? Create an account in a few clicks or log in to continue.

battle programmers allianceLog in

the LivinGrimoire Artificial General Intelligence software design pattern forum

descriptionintroducing drugs for AI Emptyintroducing drugs for AI

more_horiz
AI pharmaceuticals are LivinGrimoire skills, with shallow reference to the external environment of a livingrimoire object. naming convention: Pill_skillName

example 1 : a pill skill can change the interval duration of a tick event, which triggers the livingrimoire. example 2 : a pill skill can change input before it reaches the livingrimoire Brain or Chobit class.

AI drugs can also be made to effect specific skills, so long as the effected skills are equipped with some form of receptor code to react with the drug's special input.

here is a skill example for an AI drug called accelo, which is based on the brain acceleration drug from the anime serial experiment Lain:

Code:

class Pill_Accelo(DiSkillV2):
    def __init__(self, app: MatrixGUI1.App):
        super().__init__()
        self.brain: Brain = app.brain
        self.app: MatrixGUI1.App = app
        self._tg:TimeGate = TimeGate(2)
        self._acceled:bool = False
        self.funnel:AXFunnel = AXFunnel()
        self.funnel.setDefault("accelo")
        self.funnel.addK("accelerate")
        self.funnel.addK("take the acceleration pill")
        self.funnel.addK("dial it in")

    def input(self, ear: str, skin: str, eye: str):
        if self.funnel.funnel(ear) == "accelo":
            self._tg.openForPauseMinutes()
            self._acceled = True
            self.app.tick_interval = 2000  # accel tick, emp it up!
            self.setSimpleAlg("emp it up")
            return

        if self._acceled:
            if self._tg.isClosed():
                self._acceled = False
                self.app.tick_interval = 3000


when equipped with the above skill:
app.brain.logicChobit.addSkill(MatrixGUI1.Pill_Accelo(app)) # accelo

accelerates thinking by 33%. the skill has a shallow reference to the tick interval of the app(python window), housing it.

the skills turns off after 2 minutes in this example. just like a drug's effect wearing off. cold

descriptionintroducing drugs for AI EmptyRe: introducing drugs for AI

more_horiz
introducing drugs for AI Accelo

upgraded accelo pill version(Python code):

Code:

class Pill_Accelo(DiSkillV2):
    def __init__(self, app: MatrixGUI1.App):
        super().__init__()
        self.brain: Brain = app.brain
        self.app: MatrixGUI1.App = app
        self._tg: TimeGate = TimeGate(2)
        self._acceled: bool = False
        self.funnel: AXFunnel = AXFunnel()
        self.funnel.setDefault("accelo")
        self.funnel.addK("accelerate")
        self.funnel.addK("take the acceleration pill")
        self.funnel.addK("dial it in")

    def input(self, ear: str, skin: str, eye: str):
        # engage by input
        if self.funnel.funnel(ear) == "accelo":
            self.__engage()
            return
        # self engage by a skill
        if self.getKokoro().toHeart.get("pill_accelo") != "null":
            self.getKokoro().toHeart["pill_accelo"] = "null"
            self.__engage()
            return

        if self._acceled:
            if self._tg.isClosed():
                self._acceled = False
                self.app.tick_interval = 3000

    def __engage(self):
        self._tg.openForPauseMinutes()
        self._acceled = True
        self.app.tick_interval = 2000  # accel tick, emp it up!
        self.setSimpleAlg("emp it up")

    def setKokoro(self, kokoro: Kokoro):
        self._kokoro = kokoro
        self.getKokoro().toHeart["pill_accelo"] = "null"
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply