def act(self, observation, last_reward):
if len(self.fun) == 0:
print("\nFUN", end="")
fun_length = random.randint(5, 15)
self.actions = self.actions[::-1]
self.fun = sum([[a] * fun_length for a in self.actions], [])
elif self.fun[0] == self.actions[0]:
print(">" if self.fun[0] == 2 else "<", end="")
action = self.fun.pop(-1)
if last_reward > 0: # lose
print("TENSAI!!!!!")
self.fun = [0] * 5 # stop a while to shout
return action
评论列表
文章目录