Example #1
0
            #need to set Beta[accel] to 1
            #algo.updateBeta([0,1,0,0])
            #algo.updateBetaFinal([0,1,0,0])
            var = [2]  
            
            algo.reset_ygradient()
            for point in algo.build_gradient(vars = var):
                
                algo.updateBeta(point)
                
                perf = gameStrat(strat = 6, totalgames=3,Algo=algo, \
                                renderme = False)
                
                y = evalGames(perf)
                
                algo.update_ygradient(y)    
            
            #update algo
            updateB = algo.eval()
            algo.updateBetaFinal(updateB)
            
            #Exit Training Conditions
            if y > 500:
                break
                
        #Print summary of loop outcome
        print str(algo.BetaFinal)
            

        
    else:
Example #2
0
 
     
     var = [0,1,2,3]  
     ep = [0.2,0.1,.005,0.01]
     
     algo.reset_ygradient()
     algo.reset_ymisc()
     for point in algo.build_gradient(vars = var, eps = ep):
         
         algo.updateBeta(point)
         
         ret = gameStrat(strat = 6, totalgames=50,Algo=algo, \
                         renderme = True, env = env)
         
         
         algo.update_ygradient(ret['perf'])   
         algo.update_ymisc(ret['loss'])
         
     #update algo
     updateB = algo.eval(l = 0.5, logbestrun=True, logbestrunloss=True)
     algo.updateBetaFinal(updateB)
     
     
     logit(logMt = (ind, algo))
     
     #Exit Training Conditions
     ind += 1
     if algo._perf > 5000:
         break
         
 #Print summary of loop outcome
Example #3
0
        while True:

            var = [0, 1, 2, 3]
            ep = [0.2, 0.1, .005, 0.01]

            algo.reset_ygradient()
            algo.reset_ymisc()
            for point in algo.build_gradient(vars=var, eps=ep):

                algo.updateBeta(point)

                ret = gameStrat(strat = 6, totalgames=50,Algo=algo, \
                                renderme = True, env = env)

                algo.update_ygradient(ret['perf'])
                algo.update_ymisc(ret['loss'])

            #update algo
            updateB = algo.eval(l=0.5, logbestrun=True, logbestrunloss=True)
            algo.updateBetaFinal(updateB)

            logit(logMt=(ind, algo))

            #Exit Training Conditions
            ind += 1
            if algo._perf > 5000:
                break

        #Print summary of loop outcome
        print str(algo.BetaFinal)
Example #4
0
            #need to set Beta[accel] to 1
            #algo.updateBeta([0,1,0,0])
            #algo.updateBetaFinal([0,1,0,0])
            var = [2]

            algo.reset_ygradient()
            for point in algo.build_gradient(vars=var):

                algo.updateBeta(point)

                perf = gameStrat(strat = 6, totalgames=3,Algo=algo, \
                                renderme = False)

                y = evalGames(perf)

                algo.update_ygradient(y)

            #update algo
            updateB = algo.eval()
            algo.updateBetaFinal(updateB)

            #Exit Training Conditions
            if y > 500:
                break

        #Print summary of loop outcome
        print str(algo.BetaFinal)

    else:
        for s in [1, 2, 3, 4]:
            perf = gameStrat(strat=s, totalgames=5)