DIContacter

Creamer

Well-known member
#1
this is about a skill for AGI GF bots
it will manage summoning other persons when needed.

coding music :
https://www.youtube.com/watch?v=DxK9TGjTJuk

alg :

friends: dic : name, phone number
dic : skill, name
dic: name, quality
//map(per type) : name, location
//PersonBank visual, name
activePersons: String //from friend list
##############################################
phoneBook : dic : name, phone number
###########################ist ###################

input()
_friend needed ?
possible new friend : visual,counter :dic timegate counter, timegate2 reset to 0;

#######################
add()
//befriend
remove()
//delete useless friend
update()
//update info on alg fail

engage()
//person is near
invite()
//come over
goto()
// go to
meet()
//meet at
rerate()
//soul from different skill downrates person
message()
// tell person to x


############################################
 

Creamer

Well-known member
#2
adding a person :

//additional triggers : from soul class

if contains add contact mode = 11 //maybe only contact
regex contacts name->tempStr; timeGate.set(2 minutes);timegate.close; alg mode = 11//dewey decimal system

select case (mode=11)
if gate open{mode=1}else
_if phoneregex<>empty{save contact;notify input}
 

Creamer

Well-known member
#3
Java:
package chobit;

import java.util.Hashtable;

public class DIContacter extends DISkill {
    private Hashtable<String, String> friends = new Hashtable<>(); // key : name ,value: phone number
    private Hashtable<String, String> personUtil = new Hashtable<>(); // skill, personUtil name
    private Hashtable<String, Integer> rank = new Hashtable<>(); // name, rank
    // map : name, location
    // personVisual : visual representation Str, name : dictionary
    private String activePerson = "";
    private Hashtable<String, String> phoneBook = new Hashtable<>();// name, phone number
    private int algMode = 0;
    private int outputAlg = 0;
    private TimeGate timeGate = new TimeGate();
    private DISkillUtils diSkillUtil = new DISkillUtils();
    private RegexUtil regexUtil = new RegexUtil();
    private String tempStr = "";
    public DIContacter(Kokoro kokoro) {
        super(kokoro);
    }

    @Override
    public void input(String ear, String skin, String eye) {
        if (ear.contains("contact")) {
            tempStr = this.regexUtil.contactRegex(ear);
            this.algMode = 11;
            timeGate.close(2);
        }
        switch (algMode) {
        case 11:
            if (!this.timeGate.isClosed()) {
                algMode = 0;
            } else {
                String number = regexUtil.phoneRegex1(ear);
                if (!number.isEmpty()) {
                    phoneBook.put(tempStr, number);
                    outputAlg = 1;
                }
            }
            break;

        default:
            break;
        }
    }

    @Override
    public void output(Neuron noiron) {
        switch (outputAlg) {
        case 1:
            noiron.algParts.add(diSkillUtil
                    .verbatimGorithm(new APVerbatim("contact added")));
            outputAlg = 0;
            break;

        default:
            break;
        }
    }
}
 
Top