This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# function that takes the action and outputs state + reward | |
def make_step(step, episode_reward, cliff): | |
new_state, reward, done, _ = cliff.step(step) | |
print(f'New state {new_state} with extra award {reward} to total {episode_reward}') | |
cliff.render() | |
return episode_reward + reward | |
# walk the entire grid | |
env = gym.make('cliff-v0') | |
state = env.reset() |
OlderNewer