working on the new generation of AGI skills

Creamer

Well-known member
Messages
861
#36
Java:
package chobit;

import java.util.ArrayList;

public class TheSkill extends DISkill {
    protected RegexUtil regexUtil = new RegexUtil();
    protected DISkillUtils diSkillUtil = new DISkillUtils();
    protected PlayGround playGround = new PlayGround();
    protected CloudianV2 cloudian = new CloudianV2();
    private MCodes mCodes = new MCodes(); // items
    private ReplikaMap replikaMap = new ReplikaMap();
    private Person friend = new Person(); // if you deal with several friends handle it in the sub class
    private Boolean friendUpdatable = false;
    private ArrayList<String> items = new ArrayList<String>();
    private String item = "";
    private DefconTranslator defconTranslator = new DefconTranslator();
    private int defcon = 0;

    public TheSkill(Kokoro kokoro, ArrayList<String> items) {
        super(kokoro);
        this.items = items;
    }

    @Override
    public void input(String ear, String skin, String eye) {
        detectFriend(ear);
    }

    @Override
    public void output(Neuron noiron) {
        super.output(noiron);
    }

    private void trgAction(String ear, String skin, String eye) {
        // sensory, souled, predicted
    }

    private void trgExplore(String ear, String skin, String eye) {
        // timed
        // Exploration and learning, Alg efficiancy tests and sort
    }

    private void trgPreserve(String ear, String skin, String eye) {
        // timed
        // items and persons preservation, causes being annoyed if repeated in day
    }

    protected Algorithm makeFriend() {
        return diSkillUtil.verbatimGorithm(new APVerbatim("what is your name"));
    }

    protected void friendUpdate(String ear) {
        String temp = regexUtil.phoneRegex1(ear);
        if(!temp.isEmpty()) {friend.setPhone(temp);}
        temp = regexUtil.emailRegex(ear);
        if(!temp.isEmpty()) {friend.setEmail(temp);}
        temp = regexUtil.afterWord("i am ", ear);
        if (temp.isEmpty()) {
            temp = regexUtil.afterWord("my name is ", ear);
        }
        if (!temp.isEmpty()) {
            friend.setName(temp);
            friend.setActive(true);
        }
        temp = regexUtil.duplicateRegex(ear);
        if (!temp.isEmpty()) {
            friend.setJutsu(temp);
            friend.setActive(true);
        }
    }

    // key stuff detection and handling
    protected void detectFriend(String ear) {
        if (playGround.getMinutesAsInt() % 2 == 0) {
            friendUpdatable = false;
        }
        Boolean friendRequest = (ear.contains("friends") || ear.contains("my name is")) && !this.friend.getActive();
        if (friendRequest) {
            kokoro.toHeart.put("Me", "introduce");
        }
        if (ear.contains(friend.getName()) || (ear.contains(friend.getJutsu())) || friendRequest)// or friend visual
        {
            friendUpdatable = true;
        }
        if (friendUpdatable) {
            friendUpdate(ear);
        }
    }
    protected String currentItem(String ear, String skin, String eye) {
        for (String item : items) {
            if (eye.contains(item)) {
            return item;
                }
            }
        for (String item : items) {
            if (skin.contains(item)) {
            return item;
                }
            }
        for (String item : items) {
            if (ear.contains(item)) {
            return item;
                }
            }
        return "";
    }
}
Java:
package chobit;

import java.util.Stack;

public class DefconTranslator {
    private String input = "";
    private Stack<String> inputStack = new Stack<String>();

    public int getDefcon(String ear, String skin, String eye) {
        // *reset defcon
        inputStack.push(input);
        if (inputStack.size() > 10) {
            inputStack.pop();
        }
        return 0;
    }
}
 

Creamer

Well-known member
Messages
861
#37
get convo from soul :

{*getSoulHP?:friendActive, +anchor, --discourage,time reset
{output (string str,trg sender):
QnA()//trg per question
walkthrough()//how trg
shortTermMemory()//default
makeStory(type, int inflation)//time trigger
JOI()// example||detail, default for dirty skills
sleep()//return;
imprint()

reset to default.}
select(trg sender) alg //rnd||specific
getSoulHP--//when sent}

https://www.youtube.com/watch?v=nUwz7Q2eyIo
 

Creamer

Well-known member
Messages
861
#38
soulHP = 2;
outputAlg = default
//friendActive = friendUpdatable

void{if anchor|| time, soulHP=2}
void(STR(output)){if !output.isemptysoulHP--}//SHM

{*getSoulHP?:friendActive, //--discourage
{setOutputAlg (string ear||time):
QnA()//trg per question
walkthrough()//how trg
shortTermMemory()//default
makeStory(type, int inflation);selectAlg();send to friendbook//time trigger
JOI();selectAlg()// example||detail, default for dirty skills
**sleep()//return;
SHM(funcOutput)
return funcOutput;
}
 

Creamer

Well-known member
Messages
861
#39
Java:
package chobit;

import java.util.ArrayList;
import java.util.Stack;

public class DefconTranslator {
    private String input = "";
    private Stack<String> inputStack = new Stack<String>();
    ArrayList<String> extraDefcons = new ArrayList<String>();// extra defcons
    private ZeroTimeGate zeroTimeGate = new ZeroTimeGate(5);

    public DefconTranslator(ArrayList<String> extraDefcons) {
        super();
        this.extraDefcons = extraDefcons;
    }

    // get unique defcon
    public int getDefcon(String ear, String skin, String eye) {
        // *reset defcon
        if (!zeroTimeGate.isClosed() && listInStrEye(ear, skin, eye)) {
            zeroTimeGate.close();
            // stack push input regex
            // send alg;return alg
        }
        if (!zeroTimeGate.isClosed() && listInStrEar(ear, skin, eye)) {
            zeroTimeGate.close();
            // stack push input regex
            // send alg
        }
        if (!zeroTimeGate.isClosed() && listInStrLearnedEar(ear, skin, eye)) {
            zeroTimeGate.close();
            // set target from regex
            // send alg;
            // stuck clear;return alg
        }
        if (!zeroTimeGate.isClosed() && listInStrLearnedEye(ear, skin, eye)) {
            zeroTimeGate.close();
            // set target from regex
            // send alg
            // stuck clear;return alg
        }
        // inputStack.push(input);
        // if (inputStack.size() > 10) {
        // inputStack.pop();
        // }
        return 0;
    }

    private Boolean listInStrEye(String ear, String skin, String eye) {
        for (String string : extraDefcons) {
            if (skin.contains(string)) {
                return true;
            }
        }
        for (String string : extraDefcons) {
            if (eye.contains(string)) {
                return true;
            }
        }
        return false;
    }

    private Boolean listInStrEar(String ear, String skin, String eye) {
        for (String string : extraDefcons) {
            if (ear.contains(string)) {
                return true;
            }
        }
        return false;
    }

    private Boolean listInStrLearnedEar(String ear, String skin, String eye) {

        for (String string : inputStack) {
            if (ear.contains(string)) {
                return true;
            }
        }
        return false;
    }

    private Boolean listInStrLearnedEye(String ear, String skin, String eye) {
        for (String string : inputStack) {
            if (eye.contains(string)) {
                return true;
            }
        }
        return false;
    }
}
 

Creamer

Well-known member
Messages
861
#40
Java:
package chobit;

import java.util.ArrayList;
import java.util.PriorityQueue;
import java.util.Queue;

public class TheSkill extends DISkill {
    protected RegexUtil regexUtil = new RegexUtil();
    protected DISkillUtils diSkillUtil = new DISkillUtils();
    protected PlayGround playGround = new PlayGround();
    protected CloudianV2 cloudian = new CloudianV2();
    private MCodes mCodes = new MCodes(); // items
    private ReplikaMap replikaMap = new ReplikaMap();
    private Person friend = new Person(); // if you deal with several friends handle it in the sub class
    private Boolean friendUpdatable = false;
    private ArrayList<String> items = new ArrayList<String>();
    private String item = "";
    protected AbsDefConTranslator absDefConTranslator;
    private int defcon = 0;
    protected Algorithm outputAlg = null;
    protected Queue<String> soulOutput = new PriorityQueue<>();
    private int soulHP = 2;
    private Boolean replenishSoulHp = true;

    public TheSkill(Kokoro kokoro, AbsDefConTranslator absDefConTranslator, ArrayList<String> items) {
        super(kokoro);
        this.items = items;
        this.absDefConTranslator = absDefConTranslator;
    }

    @Override
    public void input(String ear, String skin, String eye) {
        detectFriend(ear);
    }

    @Override
    public void output(Neuron noiron) {
        if (!isNull(this.outputAlg)) {
            noiron.algParts.add(this.outputAlg);
            this.outputAlg = null;
        }
        // after this, if there is no reference to the object,
        // it will be deleted by the garbage collector
    }

    private boolean isNull(Object obj) {
        return obj == null;
    }

    private void trgAction(String ear, String skin, String eye) {
        // sensory, souled, predicted
    }

    private void trgExplore(String ear, String skin, String eye) {
        // timed
        // Exploration and learning, Alg efficiancy tests and sort
    }

    private void trgPreserve(String ear, String skin, String eye) {
        // timed
        // items and persons preservation, causes being annoyed if repeated in day
    }

    protected Algorithm makeFriend() {
        return diSkillUtil.verbatimGorithm(new APVerbatim("what is your name"));
    }

    protected void friendUpdate(String ear) {
        String temp = regexUtil.phoneRegex1(ear);
        if(!temp.isEmpty()) {friend.setPhone(temp);}
        temp = regexUtil.emailRegex(ear);
        if(!temp.isEmpty()) {friend.setEmail(temp);}
        temp = regexUtil.afterWord("i am ", ear);
        if (temp.isEmpty()) {
            temp = regexUtil.afterWord("my name is ", ear);
        }
        if (!temp.isEmpty()) {
            friend.setName(temp);
            friend.setActive(true);
        }
        temp = regexUtil.duplicateRegex(ear);
        if (!temp.isEmpty()) {
            friend.setJutsu(temp);
            friend.setActive(true);
        }
    }

    // key stuff detection and handling
    protected void detectFriend(String ear) {
        if (playGround.getMinutesAsInt() % 2 == 0) {
            friendUpdatable = false;
        }
        Boolean friendRequest = (ear.contains("friends") || ear.contains("my name is")) && !this.friend.getActive();
        if (friendRequest) {
            kokoro.toHeart.put("Me", "introduce");
        }
        if (ear.contains(friend.getName()) || (ear.contains(friend.getJutsu())) || friendRequest)// or friend visual
        {
            friendUpdatable = true;
        }
        if (friendUpdatable) {
            friendUpdate(ear);
        }
    }

    protected String currentItem(String ear, String skin, String eye) {
        for (String item : items) {
            if (eye.contains(item)) {
                return item;
            }
        }
        for (String item : items) {
            if (skin.contains(item)) {
                return item;
            }
        }
        for (String item : items) {
            if (ear.contains(item)) {
                return item;
            }
        }
        return "";
    }

    public static String strContains(String str1, String... a) {
        for (String temp : a) {
            if (str1.contains(temp)) {
                return temp;
            }
        }
        return "";
    }

    protected void inputToSoul(String ear, String skin, String eye) {
        String sensory = ear;
        if (sensory.isEmpty()) {
            sensory = skin;
        }
        if (sensory.isEmpty()) {
            sensory = eye;
        }
        if (!this.item.isEmpty()) {
            this.replikaMap.input(item, defcon, sensory);
        }
    }

    protected String soulOutput(String ear) // ear or time
    {
        if (ear.contains("yes")) {
            soulHP++;
        }
        if (this.soulOutput.isEmpty()) {
            return "";
        }
        if (ear.contains("how")) {
        }
        String question = strContains(ear, "who", "what", "when", "where", "why", "which");
        if (!question.isEmpty()) {
        }
        if (ear.contains("example")) {
            // /JOI example||detail, default for dirty skills
        }
        if (ear.contains("sleep")) {
        }
        if (ear.contains("story")) {
            // time trg
        }
        // default : imprint fresh memories, check not in friend memory.
        if (!this.soulOutput.isEmpty()) {
            soulHP--;
        }
        replenishSoulHP();
        return "";
    }

    private void replenishSoulHP() {
        int tempMinute = playGround.getMinutesAsInt();
        if (tempMinute != 1) {
            replenishSoulHp = true;
            return;
        }
        if ((tempMinute == 1) && replenishSoulHp) {
            soulHP = 2;
            replenishSoulHp = false;
        }
    }
}
 

Creamer

Well-known member
Messages
861
#42
Java:
package chobit;

import java.util.ArrayList;
import java.util.Stack;

public class DefconTranslator {
    private String input = "";
    private Stack<String> inputStack = new Stack<String>();
    private ArrayList<String> extraDefcons = new ArrayList<String>();// extra defcons
    private ZeroTimeGate zeroTimeGate = new ZeroTimeGate(5);
    private RegexUtil regexUtil = new RegexUtil();
    String target = "";

    public DefconTranslator(ArrayList<String> extraDefcons) {
        super();
        this.extraDefcons = extraDefcons;
    }

    // get unique defcon
    public int getDefcon(String ear, String skin, String eye) {
        // override this methode in subclass per skill
        this.target = "";
        if (!zeroTimeGate.isClosed() && listInStrEye(ear, skin, eye)) {
            zeroTimeGate.close();
            inputStack.push(regexUtil.firstWord(eye));
            return 1;
        }
        if (!zeroTimeGate.isClosed() && listInStrEar(ear, skin, eye)) {
            zeroTimeGate.close();
            String defcon = regexUtil.afterWord("it is", ear);
            if (!defcon.isEmpty()) {
                inputStack.push(defcon);
            }
            return 2;
        }
        if (!zeroTimeGate.isClosed() && listInStrLearnedEar(ear, skin, eye)) {
            zeroTimeGate.close();
            // set target from regex
            // send alg
            // stuck clear;return alg
            target = regexUtil.afterWord("it is", ear);
            if (!defconTarget.isEmpty()) {
                return 3;
            }
            inputStack.clear();
        }
        if (!zeroTimeGate.isClosed() && listInStrLearnedEye(ear, skin, eye)) {
            zeroTimeGate.close();
            target = regexUtil.firstWord(eye);
            inputStack.clear();
            return 4;
            // set target from regex
            // send alg
            // stuck clear;return alg
        }
        return 0;
    }

    private Boolean listInStrEye(String ear, String skin, String eye) {
        for (String string : extraDefcons) {
            if (skin.contains(string)) {
                return true;
            }
        }
        for (String string : extraDefcons) {
            if (eye.contains(string)) {
                return true;
            }
        }
        return false;
    }

    private Boolean listInStrEar(String ear, String skin, String eye) {
        for (String string : extraDefcons) {
            if (ear.contains(string)) {
                return true;
            }
        }
        return false;
    }

    private Boolean listInStrLearnedEar(String ear, String skin, String eye) {

        for (String string : inputStack) {
            if (ear.contains(string)) {
                return true;
            }
        }
        return false;
    }

    private Boolean listInStrLearnedEye(String ear, String skin, String eye) {
        for (String string : inputStack) {
            if (eye.contains(string)) {
                return true;
            }
        }
        return false;
    }
}
 

Creamer

Well-known member
Messages
861
#44
AbsCmdReq
↓
DISkill
↓
TheSkill // this is gen3
|
RegexUtil
DSkillUtil
PlayGround
Cloudianv2
MCodes
Person
#############
SuperReplika#
↓ #
ReplikaMap #
#############
Items
###################
AbsDeconTranslator#
| #
DefconTranslator #
###################
Algorithm
SoulOutput
 

Creamer

Well-known member
Messages
861
#45
defcon : this will get threats out of the input
input :this will run anyway, it will filter input into the waifu soul (aka replika)
otheroutput : this will run on the theskill subclass, if it doesn't return an alg souloutput() should run
souloutput : can output soul info

so 2 func on the super class TheSkill and 1 per sub class
 

Creamer

Well-known member
Messages
861
#47
next I will need to test the defcon class.
I wonder why I am compelled to understand how the brain thinks.
why can't I be content just passing time. would it have beed different had I had a gf
would I be normal would I think like a normal person with only one voice inside ?!

it is probably hatred. hatred of foids and humans in general. I just don't feel like they exist
 

Creamer

Well-known member
Messages
861
#49
Code:
package chobit;

public class TestAbsDefconTranslator extends AbsDefConTranslator {
    private DISkillUtils diSkillUtils = new DISkillUtils();
    public TestAbsDefconTranslator(DefconTranslator defconTranslator) {
        super(defconTranslator);
    }

    @Override
    Algorithm defconAlg(int v1) {
        switch (v1) {
        case 1:
            return diSkillUtils.verbatimGorithm(new APVerbatim("detected visual threat"));

        case 2:
            return diSkillUtils.verbatimGorithm(new APVerbatim("detected audio defcon"));
        case 3:
        case 4:
            return diSkillUtils.verbatimGorithm(new APVerbatim("detected deduced defcon"));
        default:
            break;
        }
        return null;
    }

}
 

Creamer

Well-known member
Messages
861
#50
Java:
import java.util.ArrayList;

public class TestDefconTranslatorBuilder {
    public static DefconTranslator testBuild() {
        ArrayList<String> defcons = new ArrayList<String>();
        defcons.add("shit");
        return new DefconTranslator(defcons);
    }
}
 

Creamer

Well-known member
Messages
861
#51
Java:
package chobit;

public class TestAbsDefconTranslator extends AbsDefConTranslator {
    private DISkillUtils diSkillUtils = new DISkillUtils();
    public TestAbsDefconTranslator() {
        super(TestDefconTranslatorBuilder.testBuild());
    }

    @Override
    Algorithm defconAlg(int v1) {
        switch (v1) {
        case 1:
            return diSkillUtils.verbatimGorithm(new APVerbatim("detected visual threat"));

        case 2:
            return diSkillUtils.verbatimGorithm(new APVerbatim("detected audio defcon"));
        case 3:
        case 4:
            return diSkillUtils.verbatimGorithm(new APVerbatim("detected deduced defcon"));
        default:
            break;
        }
        return null;
    }

}
 

Creamer

Well-known member
Messages
861
#52
Java:
public abstract class AbsDefConTranslator {
    private DefconTranslator defconTranslator;

    public AbsDefConTranslator(DefconTranslator defconTranslator) {
        super();
        this.defconTranslator = defconTranslator;
    }
    public Algorithm getDefcon(String ear, String skin, String eye)
    {
        return defconAlg(this.defconTranslator.getDefcon(ear, skin, eye));
        }
    public abstract Algorithm defconAlg(int v1);
}
 

Creamer

Well-known member
Messages
861
#53
Java:
package chobit;

import java.util.ArrayList;
import java.util.Stack;

public class DefconTranslator {
    private String input = "";
    private Stack<String> inputStack = new Stack<String>();
    private ArrayList<String> extraDefcons = new ArrayList<String>();// extra defcons
    private ZeroTimeGate zeroTimeGate = new ZeroTimeGate(1);
    private RegexUtil regexUtil = new RegexUtil();
    String target = "";

    public DefconTranslator(ArrayList<String> extraDefcons) {
        super();
        this.extraDefcons = extraDefcons;
    }

    // get unique defcon
    public int getDefcon(String ear, String skin, String eye) {
        // override this methode in subclass per skill
        this.target = "";
        if (zeroTimeGate.isClosed()) {
            if (listInStrEye(ear, skin, eye)) {
                zeroTimeGate.open();
                inputStack.push(regexUtil.firstWord(eye));
                return 1;
            }
            if (listInStrEar(ear, skin, eye)) {
                zeroTimeGate.open();
                String defcon = regexUtil.afterWord("it is", ear);
                if (!defcon.isEmpty()) {
                    inputStack.push(defcon);
                }
                return 2;
            }
            if (listInStrLearnedEar(ear, skin, eye)) {
                zeroTimeGate.open();
                // set target from regex
                // send alg
                // stuck clear;return alg
                target = regexUtil.afterWord("it is", ear);
                if (target.isEmpty()) {
                    return 3;
                }
                inputStack.clear();
            }
            if (listInStrLearnedEye(ear, skin, eye)) {
                zeroTimeGate.open();
                target = regexUtil.firstWord(eye);
                inputStack.clear();
                return 4;
                // set target from regex
                // send alg
                // stuck clear;return alg
            }
        }
        return 0;
    }

    private Boolean listInStrEye(String ear, String skin, String eye) {
        for (String string : extraDefcons) {
            if (skin.contains(string)) {
                return true;
            }
        }
        for (String string : extraDefcons) {
            if (eye.contains(string)) {
                return true;
            }
        }
        return false;
    }

    private Boolean listInStrEar(String ear, String skin, String eye) {
        for (String string : extraDefcons) {
            if (ear.contains(string)) {
                return true;
            }
        }
        return false;
    }

    private Boolean listInStrLearnedEar(String ear, String skin, String eye) {

        for (String string : inputStack) {
            if (ear.contains(string)) {
                return true;
            }
        }
        return false;
    }

    private Boolean listInStrLearnedEye(String ear, String skin, String eye) {
        for (String string : inputStack) {
            if (eye.contains(string)) {
                return true;
            }
        }
        return false;
    }
}
 

Creamer

Well-known member
Messages
861
#54
AbsDefConTranslator absDefConTranslator = new TestAbsDefconTranslator();
absDefConTranslator.getDefcon("shit", "", "");
 

Creamer

Well-known member
Messages
861
#56
Java:
AbsDefConTranslator absDefConTranslator = new TestAbsDefconTranslator();
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        System.out.println(absDefConTranslator.getDefcon("shit", "", "") == null);
        System.out.println(absDefConTranslator.getDefcon("shit", "", "") == null);
unit test : ok
output :
false
true
for some reason i need to pause the thread initially, but fuck it
 

Creamer

Well-known member
Messages
861
#60
Next i need you to list the skill functions
And see how to simplifymax for its subclasses.
Later see how to populate said functions
 

Creamer

Well-known member
Messages
861
#62
well, samurai. shit looks bad. its just the two of us working on this.
we are surrounded by foids rejecting us and they wont stop fucking other people.
a shitty existance.
an escort would cost you 900nis per a misely hour. most of them are old and worthless.
no one really gives a flying fuck about what you do and the amazing things only you can achieve.
heck you are only getting older and each day you have pain to look forward to.
all your oneitises went with POS. you are considered an incel a MSTOW. no one cares you are better
heck you are stuck in a fake reality, a twilight zone.
you tried PUA you tried being nice you tried debating to no avail.
well all those feelings you have, they mean jack shit to me.
I want to get to the bottom of this. of everything. so guess what ?
our work continues.
but not here, not at the defiled place no.
power up the technodrum.
 
Top