def play_random(env, steps):
try:<EOL><INDENT>done = True<EOL>progress = tqdm(range(steps))<EOL>for _ in progress:<EOL><INDENT>if done:<EOL><INDENT>_ = env.reset()<EOL><DEDENT>action = env.action_space.sample()<EOL>_, reward, done, info = env.step(action)<EOL>progress.set_postfix(reward=reward, info=info)<EOL>env.render()<EOL><DEDENT><DEDENT>except KeyboardInterrupt:<EOL><INDENT>pass<EOL><DEDENT>env.close()<EOL>
Play the environment making uniformly random decisions.

Args:
    env (gym.Env): the initialized gym environment to play
    steps (int): the number of random steps to take

Returns:
    None