October 2018
Intermediate to advanced
472 pages
10h 57m
English
For deep SARSA learning, we will be using the same agent we used in the Deep Q-learning segment:
def agent(states, actions): """Simple Deep Neural Network.""" model = Sequential() model.add(Flatten(input_shape=(1,states))) model.add(Dense(16)) model.add(Activation('relu')) model.add(Dense(16)) model.add(Activation('relu')) model.add(Dense(16)) model.add(Activation('relu')) model.add(Dense(actions)) model.add(Activation('linear')) return modelmodel = agent(states, actions)
Read now
Unlock full access