public void testingPartialSeqScenario3(){
    System.out.println("execute epi_test");
    System.out.println("=======================");
    System.out.println("ONE SEQUENCE LEARNT");
    System.out.println("=======================");
    
     int numTrials = seqStartIndexes.size()-1;
    int sumSuccess = 0;
    int len=this.partialCueLength;
    boolean fromLast=this.partialCueBackwards;
    
        curSeq.removeAllElements();
        curPSeq.removeAllElements();
        
        int selidx = ((Integer)seqStartIndexes.get(this.seq_ptr)).intValue();
        int epiLen = ((Integer)seqLenIndexes.get(this.seq_ptr)).intValue();
        if(len>epiLen)
            len = epiLen;
        int sidx = 0;
        if(fromLast){
            sidx = epiLen-len;
            if(sidx<0)
                sidx = 0;
            
        }
        System.out.println("IDXs: " + selidx + " " + len + " " + sidx);
        
        if(selidx==0){
            this.isNewStart=true;
        }
        else if(events.get(selidx-1).isForcedTer(events.get(selidx-1))){
            this.isNewStart=true;
        }
        else{
            this.isNewStart=false;
        }
        
        //get CurrentSeq list
        for(int i=0;i<epiLen;i++){
            this.curSeq.add(this.events.get(selidx+i));
        }
        
        int winidx = seqRecognition(selidx,len,sidx);
        if(winidx==this.seq_ptr){
            sumSuccess++;
            
        } 
        if(winidx>=0){
           curPSeq=episodic.getSeqEvents(episodic.seqLearner.getOneSeq(winidx));
        }
        
        this.jLabel10.setText("PREDICTION ACCURACY "+"("+selidx+"~"+(selidx+epiLen-1)+")"+"/("+0+"~"+(events.size()-1)+")");
        curStory=getStoryString(curSeq);
        curPStory=getStoryString(curPSeq);
        timer.start();
        
        this.seq_ptr=(this.seq_ptr+1)%numTrials;
    
    /*
    for(;eventIndex<events.size();eventIndex++){
        Event e=events.get(eventIndex);
        curSeq.add(e);
        int[] learntSeq=null;
        int curSeqLength=curSeq.size();
        int startIndex=curSeqLength/3;
        if(e.isForcedTer(e)){  
            System.out.println("Sequence Termimated by Battle Consequences");
            System.out.println("Sequence Length="+(eventIndex-curSeq.size()+1)+"~"+eventIndex);
            System.out.println("Contain Identicial Events?"+this.containsIdentical(curSeq));
            
            this.jLabel10.setText("PREDICTION ACCURACY "+"("+(eventIndex-curSeq.size()+1)+"~"+eventIndex+")"+"/("+0+"~"+events.size()+")");
            
            if(curSeqLength<3){
                startIndex=1;
            }
            System.out.println("Testing Partial Sequence Length="+startIndex);
            boolean succeed=true;
            for(int i=0;i<startIndex;i++){
                if(!episodic.newTrainEvent(curSeq.get(i).toArray())){
                    succeed=false;
                }
             }
            
            if(!succeed){
                learntSeq=null;
            }
            else{
                learntSeq=episodic.seqLearner.oneTrainIn();
                
                int index=startIndex;
                while(learntSeq!=null&&learntSeq[0]==-1&&index<curSeqLength){
                    if(!episodic.newTrainEvent(curSeq.get(index).toArray())){
                        learntSeq=null;
                        break;
                    }    
                    learntSeq=episodic.seqLearner.oneTrainIn();
                    index++;
                }
                
                if(learntSeq!=null&&learntSeq[0]==-1){
                    learntSeq=null;
                }
            }
            
            episodic.seqLearner.emptyAccumulated();
             
            if(learntSeq==null){
                System.out.println("Result: Sequence cant be retrieved");
                for(int j=0;j<curSeq.size();j++){
                    pEvents.add(new Event());
                    pEvents.lastElement().setDefault();
                }
                System.out.println("pEvents.length="+pEvents.size());
                
                //this.jTextArea1.setText(getSeqString(curSeq));
                //this.jTextArea2.setText(getSeqString(curPSeq));
                curStory=getStoryString(curSeq);
                curPStory=getStoryString(curPSeq);
                timer.start();
                System.out.println("Learnt Sequence Length="+curPSeq.size());
                System.out.println("Lerant Sequence Length="+(pEvents.size()-curSeq.size())+"~"+(pEvents.size()-1));
                this.jLabel11.setText(""+getPrecisionPerSeq());
                this.curPSeq.removeAllElements();
                this.curSeq.removeAllElements();                
                eventIndex++;
                
                break;
            }
            
             if(curSeq.size()==learntSeq.length){
                System.out.println("Result: Sequence Learnt with Identicial Length");
                curPSeq=episodic.getSeqEvents(learntSeq);
                for(int j=0;j<curPSeq.size();j++){
                    pEvents.add(curPSeq.get(j));
                }
                System.out.println("pEvents.length="+pEvents.size());
                System.out.println("Lerant Sequence Length="+(pEvents.size()-curSeq.size())+"~"+(pEvents.size()-1));
            }
            else if(curSeq.size()>learntSeq.length){
                System.out.println("Result: Sequence Learnt with Shorter Length");
                curPSeq=episodic.getSeqEvents(learntSeq);
                for(int j=0;j<curPSeq.size();j++){
                    pEvents.add(curPSeq.get(j));
                }
                System.out.println("Learnt Sequence Length="+curPSeq.size());
                for(int j=0;j<curSeq.size()-learntSeq.length;j++){
                    pEvents.add(new Event());
                    pEvents.lastElement().setDefault();
                }
                System.out.println("pEvents.length="+pEvents.size());
                System.out.println("Lerant Sequence Length="+(pEvents.size()-curSeq.size())+"~"+(pEvents.size()-1));
            }
            else{
                System.out.println("Result: Sequence Learnt with Longer Length");
                System.out.println("Learnt Sequence Length="+curPSeq.size());
                curPSeq=episodic.getSeqEvents(learntSeq);
                for(int j=0;j<curSeq.size();j++){
                    pEvents.add(curPSeq.get(j));
                }
                System.out.println("pEvents.length="+pEvents.size());
                System.out.println("Lerant Sequence Length="+(pEvents.size()-curSeq.size())+"~"+(pEvents.size()-1));
            }
            
            //this.jTextArea1.setText(getSeqString(curSeq));
            //this.jTextArea2.setText(getSeqString(curPSeq));
            curStory=getStoryString(curSeq);
            curPStory=getStoryString(curPSeq);
            timer.start();
            this.jLabel11.setText(""+getPrecisionPerSeq());
            this.curPSeq.removeAllElements();
            this.curSeq.removeAllElements();
            eventIndex++;
            break;
        }
    }
    
    if(eventIndex>=events.size()){
        this.jLabel10.setText("PREDICTION ACCURACY (0~"+events.size()+")");
        this.jLabel11.setText(""+this.getPrecision());
    }   
    */
}