Example #1
0
 def __init__(self, worldRef, pos, sigma, agentType, trueBallPos,maxPlayerSpeed, maxBallSpeed , posession = False, epsilon=0.8,alpha=0.2,discount=0.9):
     agent.__init__(self, worldRef, pos, sigma, agentType, trueBallPos, maxPlayerSpeed, maxBallSpeed, posession)
     #I'm using these for some stupid hand coded decisions.
     #delete these when coming up with intelligent agents
     #TODO: FILL as needed for qlearning
     self.q_values = collections.defaultdict(int)
     self.epsilon = float(epsilon) #(exploration prob)
     self.alpha = float(alpha) #(learning rate)
     self.discount = float(discount) #(discount rate)
     #self.start = (self.startx, self.starty)
     #self.end = (self.goalx, self.goaly)
     self.isStochastic = True
     self.isInTraining = False
     self.oldState = []
     self.myAction = False
     self.action = "HoldBall"
     
     self.agent_block_size = 23
     self.thresh = 100
Example #2
0
    def __init__(self, env, start, discount, reward, tprob):

        agent.__init__(self, env, start, discount)
Example #3
0
 def __init__(self, name, symbol, gamma_discount_factor=0.9, alpha_learning_rate=0.2, exp_rate= 0.3):
     agent.__init__(self,name, symbol, gamma_discount_factor, alpha_learning_rate, exp_rate)