For Deep SARSA learning, we will be using the same agent we have 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 model
model = agent(states, actions)