[dev]DISoul

fukurou

Administrator

the skill needs to :
enable auto convo summons
generate and test ideas

bullet points :

standby phase
summon / detect friend || master (greet and check on)

get sent algs from other skills + convert to convo

c'tor : get McodeAlgPart and detection regexes and skills algParts

build try algs with input : send as convo alg or actual alg and use MCodeAP to rate algs defcon.

summon of research algs.

link AlgParts to input regex.

summon time predicted algs and check for user feedback.

try command algs : if failed try/ has surpluse resources or friends speciality


time stamp algs.
grammer convo algs
 

fukurou

Administrator

c'tor : get McodeAlgPart and detection regexes and skills algParts
* get extra defcons
state set
standby phase
friend active ?
master active ?
summon / detect friend || master (greet and check on)
Question trigger gate (explain)
link AlgParts to input regex
get sent algs from other skills + convert to convo
build try algs with input : send as convo alg or actual alg and use MCodeAP to rate algs defcon
if defcon not perfect try mutate and perfect
*******************************************************************************************************************
summon ordered algs
summon of research algs(+ask).
summon command alg for failed algs or if friends speciality or surplus resources(bargain\argue APMutation)
summon defcon argue
summon convos
summon time predicted algs and check for user feedback.
********************************************************************************************************************
build book : story/walkthrough/tutorial per skill/test AP
logs
********************************************************************************************************************
time stamp algs : try to set, exe to run at time span.
grammer convo algs + modifiers : person, time
 

fukurou

Administrator

at c'tor : fun(skill level, algCloneWith0Params,cunjurationRegex) ->soul -> DISoul
output : sent cunjurationRegex ->soul -> DISoul
 

fukurou

Administrator
vars temp = "hagane"
warning queue
dish list: warn + chii rnd list
envoke times
disher: cloudian: mode = 0
dish = true


pain queue

if input = pain {warning.push(input), pull}
else temp = input


//quick reply
switch rejector,asuna, return;

if(envoke is now) {;APbark(disher)}
if ! mode = 1
if input is a greet mode = 2

switch disher :
mode = 1 ://disher


if dish{rnd say chii or warn}
dish = false
else{if input ""}c++ if c>n mode = 0;else dish = true;break()

mode = 2 ://catcher


if input != ""{
break()
c=0
if ! input in warn Q {rnd chii say}
else {sad chii}}
else c++, if c>N{mode = 0}


break{counter ++;if counter > N2{mode = 0}}
 

fukurou

Administrator
//mode : 0reset,1catcher,3 disher
vars temp = "hagane"
warning queue
dish list: warn + chii rnd list
envoke times
disher: cloudian: mode = 0
dish = true
pain queue
asuna A.I say alg, return
if input = pain {warning.push(input), pull}
else temp = input
if input = greet{greetReplay;mode =1}
else if mode0 && envoke time{APBark(mode)}//greet
if input = greetReply{mode = 2}
switch disher :
mode = 1 ://catcher
if input != ""{
break()
c=0
if ! input in warn Q {rnd chii say}
else {sad chii}}
else c++, if c>N{reset()}

mode = 2 ://disher

if dish{rnd say chii or warn}
dish = false
else{if input ""}c++ if c>n reset();else dish = true;break()
break{counter ++;if counter > N2{counter=0;mode = 0}}
reset{mode = 0;counter=0}

 

fukurou

Administrator
//mode : 0reset,1catcher,3 disher
vars temp = "hagane"
warning queue
dish list: warn + chii rnd list
envoke times: str list
disher: cloudian: mode = 0
dish = true
pain queue
asuna A.I say alg, return
if input = pain {warning.push(input), pull}
else temp = input
if mode = 0{
if input = greet{greetReplay;mode =1}
else if envoke time{APBark(mode)}//greet
if input = greetReply{mode = 2}}
switch disher :
mode = 1 ://catcher
if input != ""{ //input
break()
c=0
if ! input in warn Q {rnd chii say}
else {sad chii}}
else c++, if c>N{reset()}

mode = 2 ://disher

if dish{rnd say chii or warn}
dish = false
else{if input ""}c++ if c>n reset();else dish = true;break()
break{counter ++;if counter > N2{counter=0;mode = 0}}
reset{mode = 0;counter=0}
 

fukurou

Administrator
Java:
package chobit;

public class CloudianMode {
    private int mode = 0;

    public int getMode() {
        return mode;
    }

    public void setMode(int mode) {
        this.mode = mode;
    }

}
 

fukurou

Administrator
Java:
package chobit;

import java.util.ArrayList;
import java.util.Random;

public class DISoul extends DISkill {
    ArrayList<String> pain = new ArrayList<String>();
    String prevInput = "hagane";
    CloudianMode cloudianMode = new CloudianMode();
    String algShipment = "";

    ArrayList<String> greet = new ArrayList<String>();
    ArrayList<String> greetReplay = new ArrayList<String>();
    ArrayList<String> envoke = new ArrayList<String>();
    PlayGround playGround = new PlayGround();

    ArrayList<String> talks = new ArrayList<String>();

    int c = 0;
    Random rand = new Random();
    Boolean dish = true;
    public DISoul(Kokoro kokoro) {
        super(kokoro);
        pain.add("pain");
        greet.add("hi");
        greetReplay.add("hey");
        envoke.add("");
        talks.add("chii");
        talks.add("chiiA");
        talks.add("chiiB");
        talks.add("chiiC");
    }

    @Override
    public void input(String ear, String skin, String eye) {
        if (pain.contains(ear)) {
            if (!talks.contains(ear)) {
                talks.add(ear);
            }
        } // remove used warnings
        else {
            prevInput = ear;
        }

        if (cloudianMode.getMode() == 0) {
            if (greet.contains(ear)) {
                algShipment = "hey";
                cloudianMode.setMode(1);
            } else if (envoke.contains(playGround.getCurrentTimeStamp())) {
                algShipment = "attention";
            }
            if (greetReplay.contains(ear)) {
                cloudianMode.setMode(2);
            }
        }
        switch (cloudianMode.getMode()) {
        case 1:
            if (!ear.isEmpty()) {
                // break()
                c = 0;
                if (ear.contains("chii") || !talks.contains(ear)) {
                    int x = rand.nextInt(talks.size());// to methode
                    algShipment = talks.get(x);
                    if (!algShipment.contains("chii")) {
                        talks.remove(algShipment);
                    }
                } else {
                    algShipment = "chiisad";
                }
            }
            else {
                c++;
                if (c > 4) {
                    // reset()
                }
            }
            break;
        case 2:
            if (dish) {
                int x = rand.nextInt(talks.size());// to methode
                algShipment = talks.get(x);
                if (!algShipment.contains("chii")) {
                    talks.remove(algShipment);
                }
                dish = false;
            } else {
                if (ear.isEmpty()) {
                    c++;
                    if (c > 4) {
                        // reset()
                    } else {
                        dish = true;
                        // break()
                    }
                }
            }
            break;
        default:
            break;
        }
    }

    @Override
    public void output(Neuron noiron) {

}

    private Algorithm sayGorithm(String toSay) {
        // returns a simple algorithm for saying sent parameter
        AbsAlgPart itte = new APSay(1, toSay);
        String representation = "say";
        ArrayList<AbsAlgPart> algParts1 = new ArrayList<>();
        algParts1.add(itte);
        Algorithm algorithm = new Algorithm("say", representation, algParts1);
        return algorithm;
    }

    private Algorithm attentionAlg(String toSay) {
        // returns a simple algorithm for saying sent parameter
        AbsAlgPart itte = new APAttention(4, 3, 3, "hi", this.greetReplay);
        String representation = "attention";
        ArrayList<AbsAlgPart> algParts1 = new ArrayList<>();
        algParts1.add(itte);
        Algorithm algorithm = new Algorithm("attention", representation, algParts1);
        return algorithm;
    }
}
 

fukurou

Administrator
Java:
package chobit;

import java.util.ArrayList;
import java.util.Random;

public class DISoul extends DISkill {
    ArrayList<String> pain = new ArrayList<String>();
    String prevInput = "hagane";
    CloudianMode cloudianMode = new CloudianMode();
    String algShipment = "";

    ArrayList<String> greet = new ArrayList<String>();
    ArrayList<String> greetReplay = new ArrayList<String>();
    ArrayList<String> envoke = new ArrayList<String>();
    PlayGround playGround = new PlayGround();

    ArrayList<String> talks = new ArrayList<String>();

    int c = 0;
    int counter = 0;
    Random rand = new Random();
    Boolean dish = true;
    public DISoul(Kokoro kokoro) {
        super(kokoro);
        pain.add("pain");
        greet.add("hi");
        greetReplay.add("hey");
        envoke.add("");
        talks.add("chii");
        talks.add("chiiA");
        talks.add("chiiB");
        talks.add("chiiC");
    }

    @Override
    public void input(String ear, String skin, String eye) {
        // store warning input as needed
        if (pain.contains(ear)) {
            if (!talks.contains(ear)) {
                talks.add(ear);
            }
        }
        else {
            prevInput = ear;
        }

        // select mode *************************************************************
        if (cloudianMode.getMode() == 0) {
            if (greet.contains(ear)) {
                algShipment = "hey";
                cloudianMode.setMode(1);
            } else if (envoke.contains(playGround.getCurrentTimeStamp())) {
                algShipment = "attention";
            } else if (greetReplay.contains(ear)) {
                cloudianMode.setMode(2);
            }
        }
        // **************************************************************************
        switch (cloudianMode.getMode()) {
        case 1:
            if (!ear.isEmpty()) {
                bureiki();
                c = 0;
                if (ear.contains("chii") || !talks.contains(ear)) {
                    reply();
                    System.out.println("sent: " + algShipment);
                } else {
                    algShipment = "chiisad";
                }
            }
            else {
                c++;
                if (c > 4) {
                    reset();
                }
            }
            break;
        case 2:
            if (dish) {
                reply();
                dish = false;
            } else {
                if (ear.isEmpty()) {
                    c++;
                    if (c > 4) {
                        reset();
                    } else {
                        dish = true;
                        bureiki();
                    }
                }
            }
            break;
        default:
            break;
        }
    }

    @Override
    public void output(Neuron noiron) {
        if (!algShipment.isEmpty()) {
            if (algShipment.equals("attentioon")) {
                noiron.algParts.add(attentionAlg());
            } else {
                noiron.algParts.add(sayGorithm(algShipment));
                algShipment = "";
            }
        }
}

    private void reply() {
        int x = rand.nextInt(talks.size());// to methode
        algShipment = talks.get(x);
        if (!algShipment.contains("chii")) {
            talks.remove(algShipment);
        }
    }
    private Algorithm sayGorithm(String toSay) {
        // returns a simple algorithm for saying sent parameter
        AbsAlgPart itte = new APSay(1, toSay);
        String representation = "say";
        ArrayList<AbsAlgPart> algParts1 = new ArrayList<>();
        algParts1.add(itte);
        Algorithm algorithm = new Algorithm("say", representation, algParts1);
        return algorithm;
    }

    private Algorithm attentionAlg() {
        // returns a simple algorithm for saying sent parameter
        AbsAlgPart itte = new APAttention(4, 3, 3, "hi", this.greetReplay);
        String representation = "attention";
        ArrayList<AbsAlgPart> algParts1 = new ArrayList<>();
        algParts1.add(itte);
        Algorithm algorithm = new Algorithm("attention", representation, algParts1);
        return algorithm;
    }

    private void reset() {
        cloudianMode.setMode(0);
        counter = 0;
    }

    private void bureiki() {
        counter++;
        if (counter > 3) {
            reset();
        }
    }
}
 

fukurou

Administrator
Java:
package chobit;

import java.util.ArrayList;
import java.util.Random;

public class DISoul extends DISkill {
    ArrayList<String> pain = new ArrayList<String>();
    String prevInput = "hagane";
    CloudianMode cloudianMode = new CloudianMode();
    String algShipment = "";

    ArrayList<String> greet = new ArrayList<String>();
    ArrayList<String> greetReplay = new ArrayList<String>();
    ArrayList<String> envoke = new ArrayList<String>();
    String lastEnvoke = "";
    PlayGround playGround = new PlayGround();

    ArrayList<String> talks = new ArrayList<String>();

    int c = 0;
    int counter = 0;
    Random rand = new Random();
    Boolean dish = true;
    public DISoul(Kokoro kokoro) {
        super(kokoro);
        pain.add("pain");
        greet.add("hi");
        greetReplay.add("hey");
        envoke.add((playGround.getCurrentTimeStamp()));
        talks.add("chii");
        talks.add("chiiA");
        talks.add("chiiB");
        talks.add("chiiC");
    }

    @Override
    public void input(String ear, String skin, String eye) {
        // store warning input as needed
        if (pain.contains(ear)) {
            if (!talks.contains(ear)) {
                talks.add(ear);
            }
        }
        else {
            prevInput = ear;
        }

        // select mode *************************************************************
        if (cloudianMode.getMode() == 0) {
            if (greet.contains(ear)) {
                algShipment = "hey";

            } else if (envoke.contains(playGround.getCurrentTimeStamp()) && !envoke.contains(lastEnvoke)) {
                algShipment = "attention";
                lastEnvoke = playGround.getCurrentTimeStamp();
            } else if (greetReplay.contains(ear)) {
                cloudianMode.setMode(2);
            }
        }
        // **************************************************************************
        switch (cloudianMode.getMode()) {
        case 1:
            if (!ear.isEmpty()) {
                bureiki();
                c = 0;
                if (ear.contains("chii") || !talks.contains(ear)) {
                    reply();
                    System.out.println("sent: " + algShipment);
                } else {
                    algShipment = "chiisad";
                }
            }
            else {
                c++;
                if (c > 4) {
                    reset();
                }
            }
            break;
        case 2:
            if (dish) {
                reply();
                dish = false;
            } else {
                if (ear.isEmpty()) {
                    c++;
                    if (c > 4) {
                        reset();
                    } else {
                        dish = true;
                        bureiki();
                    }
                }
            }
            break;
        default:
            break;
        }
    }

    @Override
    public void output(Neuron noiron) {
        if (!algShipment.isEmpty()) {
            if (algShipment.equals("attention")) {
                noiron.algParts.add(attentionAlg());
                algShipment = "";
            } else {
                noiron.algParts.add(sayGorithm(algShipment));
                if (algShipment.equals("hey")) {
                    cloudianMode.setMode(1);
                }
                algShipment = "";
            }
        }
}

    private void reply() {
        int x = rand.nextInt(talks.size());// to methode
        algShipment = talks.get(x);
        if (!algShipment.contains("chii")) {
            talks.remove(algShipment);
        }
    }
    private Algorithm sayGorithm(String toSay) {
        // returns a simple algorithm for saying sent parameter
        AbsAlgPart itte = new APSay(1, toSay);
        String representation = "say";
        ArrayList<AbsAlgPart> algParts1 = new ArrayList<>();
        algParts1.add(itte);
        Algorithm algorithm = new Algorithm("say", representation, algParts1);
        return algorithm;
    }

    private Algorithm attentionAlg() {
        // returns a simple algorithm for saying sent parameter
        AbsAlgPart itte = new APAttention(4, 3, 3, "hi", this.greetReplay);
        String representation = "attention";
        ArrayList<AbsAlgPart> algParts1 = new ArrayList<>();
        algParts1.add(itte);
        Algorithm algorithm = new Algorithm("attention", representation, algParts1);
        return algorithm;
    }

    private void reset() {
        cloudianMode.setMode(0);
        counter = 0;
    }

    private void bureiki() {
        counter++;
        if (counter > 3) {
            reset();
        }
    }
}
 

fukurou

Administrator

Java:
package chobit;

import java.util.ArrayList;
import java.util.Random;

public class DISoul extends DISkill {
    ArrayList<String> pain = new ArrayList<String>();
    String prevInput = "hagane";
    CloudianMode cloudianMode = new CloudianMode();
    String algShipment = "";

    ArrayList<String> greet = new ArrayList<String>();
    ArrayList<String> greetReplay = new ArrayList<String>();
    ArrayList<String> envoke = new ArrayList<String>();
    String lastEnvoke = "";
    PlayGround playGround = new PlayGround();

    ArrayList<String> talks = new ArrayList<String>();

    int c = 0;
    int counter = 0;
    Random rand = new Random();
    Boolean dish = true;

    String plusTrigger = "";
    public DISoul(Kokoro kokoro) {
        super(kokoro);
        pain.add("pain");
        greet.add("hi");
        greetReplay.add("hello");
        envoke.add((playGround.getCurrentTimeStamp()));
        talks.add("chii");
        talks.add("chiiA");
        talks.add("chiiB");
        talks.add("chiiC");
    }

    @Override
    public void input(String ear, String skin, String eye) {
        // store warning input as needed
        if (pain.contains(ear) || pain.contains(skin)) {
            if (!talks.contains(prevInput)) {
                talks.add(prevInput);
            }
        }
        else {
            prevInput = ear;
        }

        // select mode *************************************************************
        if (cloudianMode.getMode() == 0) {
            if (greet.contains(ear)) {
                algShipment = "hello";
                plusTrigger = this.playGround.timeInXMinutes(-5);
            } else if ((envoke.contains(playGround.getCurrentTimeStamp())
                    || plusTrigger.equals(playGround.getCurrentTimeStamp())) && !envoke.contains(lastEnvoke)) {
                algShipment = "attention";
                lastEnvoke = playGround.getCurrentTimeStamp();
            } else if (greetReplay.contains(ear)) {
                cloudianMode.setMode(2);
            }
        }
        // **************************************************************************
        switch (cloudianMode.getMode()) {
        case 1:
            if (!ear.isEmpty()) {
                bureiki();
                c = 0;
                if (ear.contains("chii") || !talks.contains(ear)) {
                    reply();
                    System.out.println("sent: " + algShipment);
                } else {
                    algShipment = "chiisad";
                }
            }
            else {
                c++;
                if (c > 4) {
                    reset();
                }
            }
            break;
        case 2:
            if (dish) {
                reply();
                dish = false;
            } else {
                if (ear.isEmpty()) {
                    c++;
                    if (c > 4) {
                        reset();
                    } else {
                        dish = true;
                        bureiki();
                    }
                }
            }
            break;
        default:
            break;
        }
    }

    @Override
    public void output(Neuron noiron) {
        if (!algShipment.isEmpty()) {
            if (algShipment.equals("attention")) {
                noiron.algParts.add(attentionAlg());
                algShipment = "";
            } else {
                noiron.algParts.add(sayGorithm(algShipment));
                if (algShipment.equals("hello")) {
                    cloudianMode.setMode(1);
                }
                algShipment = "";
            }
        }
}

    private void reply() {
        int x = rand.nextInt(talks.size());// to methode
        algShipment = talks.get(x);
        if (!algShipment.contains("chii")) {
            talks.remove(algShipment);
        }
    }
    private Algorithm sayGorithm(String toSay) {
        // returns a simple algorithm for saying sent parameter
        AbsAlgPart itte = new APSay(1, toSay);
        String representation = "say";
        ArrayList<AbsAlgPart> algParts1 = new ArrayList<>();
        algParts1.add(itte);
        Algorithm algorithm = new Algorithm("say", representation, algParts1);
        return algorithm;
    }

    private Algorithm attentionAlg() {
        // returns a simple algorithm for saying sent parameter
        AbsAlgPart itte = new APAttention(4, 3, 3, "hi", this.greetReplay);
        String representation = "attention";
        ArrayList<AbsAlgPart> algParts1 = new ArrayList<>();
        algParts1.add(itte);
        Algorithm algorithm = new Algorithm("attention", representation, algParts1);
        return algorithm;
    }

    private void reset() {
        cloudianMode.setMode(0);
        counter = 0;
    }

    private void bureiki() {
        counter++;
        if (counter > 3) {
            reset();
        }
    }
}
to do next :
var consts
v2 of skill for any input reply
voice pack
 

fukurou

Administrator
new skill seems to work in both its versions, now just wait for the voice whore to send my files

 
Last edited:
Top