I am attempting to create a neural network to play the emulated atari game "BreakoutDeterministic". The action space for the game is [0,1,2,3].
When inputting
frame, reward, is_done, _ = env.step(env.action_space.sample())
The game will play out and and the "is_done" variable will eventually be set to True
(when the game ends)
When inputting
frame, reward, is_done, _ = env.step(3)
The game will end but done will not be set to True
. Instead I have to manually end the process.
Any explanation to why this happens and how I can fix it?
Full code:
import gym
env = gym.make('BreakoutDeterministic-v4')
frame = env.reset()
env.render()
is_done = False
while not is_done:
frame, reward, is_done, _ = env.step(env.action_space.sample())
#frame, reward, is_done, _ = env.step(3)
env.render()