コード例 #1
0
ファイル: impl.py プロジェクト: johndpope/automusica
    def get_current_robs(self, robsid):
        robs= self.ec.robses.get(robsid)
        if robs is None:
            robs= DPRandomObservation(self.ec.hmm, 1)
            #robs= RandomObservation(self.ec.hmm)
            for i in xrange(1000): robs.next()
            self.ec.robses[robsid]= robs

        robs.actual_state= self.ec.actual_state                
        return robs
コード例 #2
0
    def start_creation(self):
        self.ec= ExecutionContext()
        self.ec.chords= []
        self.ec.hmm= self.create_model()
        self.ec.robses= {}

        robs= DPRandomObservation(self.ec.hmm, 10)
        robs= FullyRepeatableObservation(self.ec.hmm)
        for i in range(1000): robs.next()

        self.ec.robs= robs
        self.ec.robsids= []
        self.ec.parts= defaultdict(lambda : [[]])