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

descriptionDIDirty skill EmptyDIDirty skill

more_horiz
DIDirty skill 3iv9kq

made this to test mutation of actions within algorithms, and to do other stuff 🤷

APFilth1.java :

Code:

package chobit;

public class APFilth1 extends AbsAlgPart implements Mutatable{
 Boolean mode = false; // manual
 final int PAUSELIM = 3;
 final int MANUALLIM = 5;
 final int AUTOLIM = 3;
 int countDown = MANUALLIM;
 int moanPause = 0;
 Boolean isCompleted = false;
 enumFail failure = enumFail.ok;
 int CountDownLatch;
 String myMoan = "make a creamy";
 @Override
 public String action(String ear, String skin, String eye) {
 if (countDown < 1) {
 isCompleted = true;
 if (!mode) {
 this.failure = enumFail.fail;
 isCompleted = false;
 return "finished";
 }
 }
 switch (ear) {
 case "can i fuck you":
 return "no you may not fuck me";
 case "auto":
 countDown = AUTOLIM;
 mode = true;
 break;
 case "manual":
 countDown = MANUALLIM;
 mode = false;
 break;
 case "ok":
 this.isCompleted = true;
 return "i love you";// *finisher
 case "continue":
 case "again":
 countDown = (!mode) ? MANUALLIM : AUTOLIM;
 default:
 moanPause--;
 if (moanPause < 1) {
 moanPause = PAUSELIM;
 countDown--;
 return myMoan;
 }
 break;
 }
 // continue on gyro input
 if (skin.contains("shake")) {
 countDown = (mode) ? MANUALLIM : AUTOLIM;
 }
 return "";
 }

 @Override
 public Boolean itemize() {
 // TODO Auto-generated method stub
 return false;
 }

 @Override
 public enumFail failure(String input) {
 // TODO Auto-generated method stub
 return this.failure;
 }

 @Override
 public Boolean completed() {
 // TODO Auto-generated method stub
 return this.isCompleted;
 }

 @Override
 public AbsAlgPart clone() {
 // TODO Auto-generated method stub
 return new APFilth1();
 }
 @Override
 public int getMutationLimit() {
 // TODO Auto-generated method stub
 return 1;
 }

 @Override
 public AbsAlgPart mutation() {
 // TODO Auto-generated method stub
 return new APFilth2();
 }
}


APFilth2.java :

Code:

package chobit;

public class APFilth2 extends AbsAlgPart implements Mutatable {
   Boolean mode = false; // manual
   final int PAUSELIM = 3;
   final int MANUALLIM = 5;
   final int AUTOLIM = 3;
   int countDown = MANUALLIM;
   int moanPause = 0;
   Boolean isCompleted = false;
   enumFail failure = enumFail.ok;
   int CountDownLatch;
   String myMoan = "lick my feet";

   @Override
   public String action(String ear, String skin, String eye) {
      if (countDown < 1) {
         isCompleted = true;
         if (!mode) {
            this.failure = enumFail.fail;
            isCompleted = false;
            return "finished";
         }
      }
      switch (ear) {
      case "can i fuck you":
         return "no you may not fuck me";
      case "auto":
         countDown = AUTOLIM;
         mode = true;
         break;
      case "manual":
         countDown = MANUALLIM;
         mode = false;
         break;
      case "ok":
         this.isCompleted = true;
         return "i love you";// *finisher
      case "continue":
      case "again":
         countDown = (!mode) ? MANUALLIM : AUTOLIM;
      default:
         moanPause--;
         if (moanPause < 1) {
            moanPause = PAUSELIM;
            countDown--;
            return myMoan;
         }
         break;
      }
      // continue on gyro input
      if (skin.contains("shake")) {
         countDown = (mode) ? MANUALLIM : AUTOLIM;
      }
      return "";
   }

   @Override
   public Boolean itemize() {
      // TODO Auto-generated method stub
      return false;
   }

   @Override
   public enumFail failure(String input) {
      // TODO Auto-generated method stub
      return this.failure;
   }

   @Override
   public Boolean completed() {
      // TODO Auto-generated method stub
      return this.isCompleted;
   }

   @Override
   public AbsAlgPart clone() {
      // TODO Auto-generated method stub
      return new APFilth2();
   }

   @Override
   public int getMutationLimit() {
      // TODO Auto-generated method stub
      return 1;
   }

   @Override
   public AbsAlgPart mutation() {
      // TODO Auto-generated method stub
      return new APFilth1();
   }
}


:swt:

Last edited by Moti Barski on Sat Dec 14, 2019 8:14 am; edited 1 time in total

descriptionDIDirty skill EmptyRe: DIDirty skill

more_horiz
DIDirty

Code:

package chobit;

import java.util.ArrayList;

public class DIDirty extends DISkill {
   private Boolean exeAlg = false;

   public DIDirty(Kokoro kokoro) {
      super(kokoro);
      // TODO Auto-generated constructor stub
   }

   @Override
   public void input(String ear, String skin, String eye) {
      if (ear.contains("horny")) {
         this.exeAlg = true;
         this.setSentAlg(true);
      }
   }

   @Override
   public void output(Neuron noiron) {
      if (this.exeAlg) {
         AbsAlgPart AP1 = new Chi(this.kokoro, this.getClass().getSimpleName(), new APSay(1, "cum toilet"));
         AbsAlgPart AP2 = new Chi(this.kokoro, this.getClass().getSimpleName(), new APFilth1());
         String representation = "dirty";
         ArrayList<AbsAlgPart> algParts1 = new ArrayList<>();
         algParts1.add(AP1);
         algParts1.add(AP2);
         Algorithm algorithm = new Algorithm("dirty", representation, algParts1);
         noiron.algParts.add(algorithm);
         exeAlg = false;
      }
   }
}

descriptionDIDirty skill EmptyRe: DIDirty skill

more_horiz
https://streamable.com/pk1xk
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply