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

descriptionDiSmoothie0 and DiSmoothie1 EmptyDiSmoothie0 and DiSmoothie1

more_horiz
🍓🍌🍍 Introducing the Livingrimoire Skill: DiSmoothie! 🍍🍌🍓

Are you overwhelmed by the endless choices of fruits for your smoothie? Do you spend more time deciding on the mix than actually enjoying your drink? Say hello to DiSmoothie, your personal fruit mixologist!

DiSmoothie is a revolutionary skill from Livingrimoire that takes the guesswork out of your smoothie preparation. With the power to generate a perfect mix of fruits for your smoothie, DiSmoothie turns every blend into a delightful surprise.

No more second-guessing if the mango would go well with the kiwi, or if the pineapple would overpower the subtle taste of the blueberries. DiSmoothie uses a sophisticated algorithm to create balanced and delicious fruit combinations every time.

So why wait? Embrace the magic of effortless smoothie making with Livingrimoire Skill: DiSmoothie. Your mornings will never be the same again! 🍹

Code:

package skills;

import AXJava.AXContextCmd;
import AXJava.DrawRnd;
import LivinGrimoire.DiSkillV2;

public class DiSmoothie0 extends DiSkillV2 {
    private DrawRnd draw = new DrawRnd("grapefruits", "oranges",  "apples", "peaches", "melons", "pears", "carrot");
    private AXContextCmd cmd = new AXContextCmd();

    public DiSmoothie0() {
        cmd.contextCommands.add("recommend a smoothie");
        cmd.commands.add("yuck");
        cmd.commands.add("lame");
        cmd.commands.add("nah");
        cmd.commands.add("no");
    }

    @Override
    public void input(String ear, String skin, String eye) {
        if (cmd.engageCommand(ear)){
            setSimpleAlg(String.format("%s and  %s", draw.draw(), draw.draw()));
            draw.reset();
        }
    }
}

Code:

package skills;

import AXJava.AXContextCmd;
import AXJava.DrawRnd;
import AXJava.Responder;
import LivinGrimoire.DiSkillV2;

public class DiSmoothie1 extends DiSkillV2 {
    private Responder base = new Responder("grapefruits", "oranges",  "apples", "peaches", "melons", "pears", "carrot");
    private DrawRnd thickeners = new DrawRnd("bananas", "mango", "strawberry", "pineapple", "dates");
    private AXContextCmd cmd = new AXContextCmd();

    public DiSmoothie1() {
        cmd.contextCommands.add("recommend a smoothie");
        cmd.commands.add("yuck");
        cmd.commands.add("lame");
        cmd.commands.add("nah");
        cmd.commands.add("no");
    }

    @Override
    public void input(String ear, String skin, String eye) {
        if (cmd.engageCommand(ear)){
            setSimpleAlg(String.format("use %s as a base than add %s and %s", base.getAResponse(),thickeners.draw(),thickeners.draw()));
            thickeners.reset();
        }
    }
}

descriptionDiSmoothie0 and DiSmoothie1 EmptyRe: DiSmoothie0 and DiSmoothie1

more_horiz
Python version

Code:


# the smoothie skills are simple skills for testing purposes,
# such as testing the BranchSkill. but they have their own merit
# in suggesting smoothies and have a good alg base for other recipe skills
class DiSmoothie0(DiSkillV2):
    def __init__(self):
        super().__init__()
        self.draw = DrawRnd("grapefruits", "oranges", "apples", "peaches", "melons", "pears", "carrot")
        self.cmd = AXContextCmd()
        self.cmd.contextCommands.insert("recommend a smoothie")
        self.cmd.commands.insert("yuck")
        self.cmd.commands.insert("lame")
        self.cmd.commands.insert("nah")
        self.cmd.commands.insert("no")

    def input(self, ear, skin, eye):
        if self.cmd.engageCommand(ear):
            self.setSimpleAlg(f"{self.draw.drawAndRemove()} and {self.draw.drawAndRemove()}")
            self.draw.reset()


class DiSmoothie1(DiSkillV2):
    def __init__(self):
        super().__init__()
        self.base = Responder("grapefruits", "oranges", "apples", "peaches", "melons", "pears", "carrot")
        self.thickeners = DrawRnd("bananas", "mango", "strawberry", "pineapple", "dates")
        self.cmd = AXContextCmd()
        self.cmd.contextCommands.insert("recommend a smoothie")
        self.cmd.commands.insert("yuck")
        self.cmd.commands.insert("lame")
        self.cmd.commands.insert("nah")
        self.cmd.commands.insert("no")

    def input(self, ear, skin, eye):
        if self.cmd.engageCommand(ear):
            self.setSimpleAlg(
                f"use {self.base.getAResponse()} as a base than add {self.thickeners.drawAndRemove()}\n and {self.thickeners.drawAndRemove()}")
            self.thickeners.reset()
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply