You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I'm trying to visualize game play using the python example from the docs. I've tried the code with and without pygame.init(), and I still don't see anything. Thanks in advance.
from random import randrange
import atari_py
import pygame
ale = atari_py.ALEInterface()
pong_path = atari_py.get_game_path('pong')
#pygame.init()
#load the rom
ale.loadROM(pong_path)
ale.setInt('random_seed', 123)
ale.setBool('display_screen', True)
legal_actions = ale.getLegalActionSet()
for episode in range(10):
total_reward = 0
while not ale.game_over():
a = legal_actions[randrange(len(legal_actions))]
# Apply an action and get the resulting reward
reward = ale.act(a);
total_reward += reward
print('Episode', episode, 'ended with score:', total_reward)
ale.reset_game()
The text was updated successfully, but these errors were encountered:
Hi I'm trying to visualize game play using the python example from the docs. I've tried the code with and without pygame.init(), and I still don't see anything. Thanks in advance.
from random import randrange
import atari_py
import pygame
ale = atari_py.ALEInterface()
pong_path = atari_py.get_game_path('pong')
#pygame.init()
#load the rom
ale.loadROM(pong_path)
ale.setInt('random_seed', 123)
ale.setBool('display_screen', True)
legal_actions = ale.getLegalActionSet()
for episode in range(10):
total_reward = 0
while not ale.game_over():
a = legal_actions[randrange(len(legal_actions))]
# Apply an action and get the resulting reward
reward = ale.act(a);
total_reward += reward
print('Episode', episode, 'ended with score:', total_reward)
ale.reset_game()
The text was updated successfully, but these errors were encountered: