actor critic玩cartpole
只能玩到reward=200多,gitimport gym, numpy as npimport tensorflow as tffrom tensorflow import kerasnp.random.seed(1)tf.random.set_seed(1)class Actor: def __init__(self,n_actions,n_features,learning_rate=1e-3): self.n_actions = n_actions