Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about Test function #35

Open
AlexTo opened this issue Oct 11, 2020 · 1 comment
Open

Question about Test function #35

AlexTo opened this issue Oct 11, 2020 · 1 comment

Comments

@AlexTo
Copy link

AlexTo commented Oct 11, 2020

Hi, I'd to have a question about the following block

if player.done and not player.info:

    if player.done and not player.info:
        state = player.env.reset()
        player.eps_len += 2
        player.state = torch.from_numpy(state).float()
        if gpu_id >= 0:
            with torch.cuda.device(gpu_id):
                player.state = player.state.cuda()
    elif player.info:

I don't quite understand when the info equals True or False, what is the meaning off having info=True and info=False ?

I can't seem to find a documentation about this info flag on Gym website :(

Thanks

@dgriff777
Copy link
Owner

Hi,

This is related to environment wrapper class EpisodicLifeEnv, found in environment.py, which makes the games episodic per life, for games with multiple lives, which can improve training speed. So if agent is in a game that has multiple lives the code you reference above is to help differentiate between when a game is truly over for test agent after loss of life and when a game is still playing for test agent after loss of life.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants