artificial-intelligence

Something wrong with Keras code Q-learning OpenAI gym FrozenLake

空扰寡人 提交于 2020-08-02 07:49:11
问题 Maybe my question will seem stupid. I'm studying the Q-learning algorithm. In order to better understand it, I'm trying to remake the Tenzorflow code of this FrozenLake example into the Keras code. My code: import gym import numpy as np import random from keras.layers import Dense from keras.models import Sequential from keras import backend as K import matplotlib.pyplot as plt %matplotlib inline env = gym.make('FrozenLake-v0') model = Sequential() model.add(Dense(16, activation='relu',