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

gen3 skill team work technodrum mode

power_settings_newLogin to reply
3 posters

descriptiongen3 skill team work technodrum mode - Page 3 EmptyRe: gen3 skill team work technodrum mode

more_horiz
who should handle deleting a transport or an item ?
well, who knows about it ?
the running algPart

I guess next is java doc and unit testing.

lucky we have kurosen on our side.

descriptiongen3 skill team work technodrum mode - Page 3 EmptyRe: gen3 skill team work technodrum mode

more_horiz
looks like I should delete the replikamap subclass.
tho we might need a subclass for priced items for when she shops.

descriptiongen3 skill team work technodrum mode - Page 3 EmptyRe: gen3 skill team work technodrum mode

more_horiz
hadoushouryuken mode !

:hkn: :shouryuken:

descriptiongen3 skill team work technodrum mode - Page 3 EmptyRe: gen3 skill team work technodrum mode

more_horiz
aquired directive : delete the replikamap subclass

descriptiongen3 skill team work technodrum mode - Page 3 EmptyRe: gen3 skill team work technodrum mode

more_horiz
replika, replika map : status : depracated

descriptiongen3 skill team work technodrum mode - Page 3 EmptyRe: gen3 skill team work technodrum mode

more_horiz
Admin wrote:
who should handle deleting a transport or an item ?

I guess next is java doc and unit testing.

lucky we have kurosen on our side.


acquired new directive, status, in progress

descriptiongen3 skill team work technodrum mode - Page 3 EmptyRe: gen3 skill team work technodrum mode

more_horiz
kyoro kyoro, looks like we haven't handled the prophesy module

DISkill

TheSkill // this is gen3
|
RegexUtil
DSkillUtil
PlayGround
Cloudianv2
MCodes
Person
SuperReplikaMap
|
ZeroTimeGate
Compass
###############
Items
###################
AbsDeconTranslator#
| #
DefconTranslator #
###################
TestDefconTranslatorBuilder

descriptiongen3 skill team work technodrum mode - Page 3 EmptyRe: gen3 skill team work technodrum mode

more_horiz
no need to handle the prophesy module, only a few skills use it
get on with the java docs

descriptiongen3 skill team work technodrum mode - Page 3 EmptyRe: gen3 skill team work technodrum mode

more_horiz
issue ticket : need for a quick friend delete method in the Person cls
tbh ngl tbph :alrt: :XX:

issue ticket 2 :

Code:

String currentDefcon = this.absDefConTranslator.getDefconTranslator().getSpecificDefcom(ear, skin, eye);
      if (currentDefcon.isEmpty()) {
         currentDefcon = absDefConTranslator.getDefconTranslator().aquiredTarget();
      }


this 2^ should have a unified single method

descriptiongen3 skill team work technodrum mode - Page 3 EmptyRe: gen3 skill team work technodrum mode

more_horiz

Code:

package chobit;

import java.util.ArrayList;

public abstract 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 SupeReplikaMap replikaMap = new SupeReplikaMap();
   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;

   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);
      // func1 :
      this.outputAlg = this.absDefConTranslator.getDefcon(ear, skin, eye);
      inputToSoul(ear, skin, eye);
      if (outputAlg != null) {
         return;
      }
      // func2
      triggeredAlgs(ear, skin, eye);
      if (isNull(outputAlg)) {
         return;
      }
      // func3
      soulOutput(ear);
   }

   private void triggeredAlgs(String ear, String skin, String eye) {
      trgAction(ear, skin, eye);
      if (isNull(outputAlg)) {
         return;
      }
      trgExplore(ear, skin, eye);
      if (isNull(outputAlg)) {
         return;
      }
      trgPreserve(ear, skin, eye);
   }

   @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;
   }

   protected abstract void trgAction(String ear, String skin, String eye);
   // sensory, souled(kokoro cls directives), predicted

   protected abstract void trgExplore(String ear, String skin, String eye);
      // timed
      // Exploration and learning, Alg efficiancy tests and sort
   protected abstract 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();
      // a friend is set to false and cleared on algPart failures
      if (friendRequest) {
         // at this case a friend volunteers himself.
         kokoro.toHeart.put("Me", "introduce");// this can be summoned in the trgPreserve in case
         // no friend.
      }
      if (ear.contains(friend.getName()) || (ear.contains(friend.getJutsu())) || friendRequest)// or friend visual
      {
         friendUpdatable = true;
         // the friend is active and therefore can update his info
      }
      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;
      String currentDefcon = this.absDefConTranslator.getDefconTranslator().getSpecificDefcom(ear, skin, eye);
      if (currentDefcon.isEmpty()) {
         currentDefcon = absDefConTranslator.getDefconTranslator().aquiredTarget();
      }
      if (sensory.isEmpty()) {
         sensory = skin;
      }
      if (sensory.isEmpty()) {
         sensory = eye;
      }
      this.item = currentItem(ear, skin, eye);
      if (!this.item.isEmpty()) {
         this.replikaMap.input(item, currentDefcon, sensory);
         this.item = "";
      }
   }

   protected Algorithm soulOutput(String ear) // ear or time
   {
      String question = strContains(ear, "what", "description", "where");
      switch (question) {
      case "where":
         String[] tempArray = (String[]) this.items.toArray();
         String tempItem = strContains(ear, tempArray);// gets item in question
         return diSkillUtil.verbatimGorithm(new APVerbatim(replikaMap.where(tempItem)));
      default:
         if (!question.isEmpty()) {
            return diSkillUtil.verbatimGorithm(new APVerbatim(replikaMap.answer(question)));
         }
         break;
      }
      return null;
   }
}


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