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

descriptionSomeone tell Vedal there is a problem with my AI EmptySomeone tell Vedal there is a problem with my AI

more_horiz


I don't know what her actual pseudo code looks like, but this is a shout out puzzle.

the AI demands attention, she does a shout out till she gets a handshake or till she tires out.

which is why I made a shout out module:

Code:


        if (trgTime.alarm()){trgTolerance.reset();}
        // stop shout out
        if (shoutOut.engage(ear)){trgTolerance.disable();setVerbatimAlg(4,"hello user");return;}
        // shout out
        if (trgTolerance.trigger()){
            if (dripper.drip()){shoutOut.activate();setVerbatimAlg(4,"user");return;}
        }


the shout out here is triggered by a time stamp, which could be modified for example to when a problem arises.

if the user replies with something like "what" it is considered a handshake, a reply to the shoutout.
a reply not registered in the shout out handshakes undoes the shout out, kind of like saying "shut up I don't care"

descriptionSomeone tell Vedal there is a problem with my AI EmptyRe: Someone tell Vedal there is a problem with my AI

more_horiz
updated the code with this class:

Code:

package AXJava;

public class AXHandshake {
    /*example use
            if (handshake.engage(ear)){ // ear reply like: what do you want?/yes
            setVerbatimAlg(4,"now I know you are here");return;
        }
        if (handshake.trigger()){setVerbatimAlg(4,handshake.getUser_name());return;}// user, user!
    * */
    private TrgTime trgTime = new TrgTime();
    private TrgTolerance trgTolerance = new TrgTolerance(10);
    private AXShoutOut shoutOut = new AXShoutOut();
    private String user_name = "user";
    private PercentDripper dripper = new PercentDripper();

    public AXHandshake() {
        // default handshakes (valid reply to shout out)
        shoutOut.handshake = new Responder("what", "yes", "i am here");
    }

    // setters
    public AXHandshake setTimeStamp(String time_stamp){
        // when will the shout-out happen?
        // example time stamp: 9:15
        trgTime.setTime(time_stamp);
        return this;
    }
    public AXHandshake setShoutOutLim(int lim){
        // how many times should user be called for, per shout out?
        trgTolerance.setMaxrepeats(lim);
        return this;
    }
    public AXHandshake setHandShake(Responder responder){
        // which responses would acknowledge the shout-out?
        // such as *see default handshakes for examples suggestions
        shoutOut.handshake = responder;
        return this;
    }
    public AXHandshake setDripperPercent(int n){
        // when shout out to user how frequent will it be?
        dripper.setLimis(n);
        return this;
    }
    // getters

    public String getUser_name() {
        return user_name;
    }

    public Boolean engage(String ear){
        if (trgTime.alarm()){trgTolerance.reset();}
        // stop shout out
        if (shoutOut.engage(ear)){trgTolerance.disable();return true;}
        return false;
    }
    public Boolean trigger(){
        if (trgTolerance.trigger()){
            if (dripper.drip()){shoutOut.activate();return true;}
        }
        return false;
    }
}


example use in a skill:

Code:

if (handshake.engage(ear)){ // ear reply like: what do you want?/yes
            setVerbatimAlg(4,"now I know you are here");return;
        }
        if (handshake.trigger()){setVerbatimAlg(4,handshake.getUser_name());return;}// user, user!


king
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply