-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fixed reinforcement learning to run with any screen size; added diagram #389
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
Conversation
@@ -23,7 +23,10 @@ | |||
As the agent observes the current state of the environment and chooses | |||
an action, the environment *transitions* to a new state, and also | |||
returns a reward that indicates the consequences of the action. In this | |||
task, the environment terminates if the pole falls over too far. | |||
task, rewards are +1 for every incremental timestep and the environment | |||
terminates if the pole falls over too far or the crat mover more then 2.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crat mover -> cart moves
policy_net = DQN().to(device) | ||
target_net = DQN().to(device) | ||
# Get screen size so that we can initialize layers correctly based on shape | ||
# returned from AI gym. Typical dimentions at this pont are close to 3x40x90 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dimentions -> dimensions
# which is the result of a clamped and down-scaled buffer in get_screen() | ||
init_screen = get_screen() | ||
_, _, screen_height, screen_width = init_screen.shape | ||
#screen_height = init_screen.shape[2] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented code?
the two failures are because of the mnist deadlock appearing again cc: @yf225 |
Fixed reinforcement learning to run with any screen size; added diagram
Fixed reinforcement learning to run with different screen sizes (it looks like the resolution coming in was incorrect, which caused the wrong screen subregion to be accessed and training fo fail).
Also, added some improved comments in the tutorial and a diagram of data-plow to make things more understandable.
Don't merge until it passes tests (we see tutorial updated).