def __init__(<EOL>self,<EOL>rom,<EOL>frame_skip=<NUM_LIT:1>,<EOL>repeat_action_probability=<NUM_LIT:0.0>,<EOL>loss_of_life_termination=False,<EOL>loss_of_life_reward=<NUM_LIT:0>,<EOL>display_screen=False,<EOL>seed=np.random.RandomState()<EOL>):
self.ale = ALEInterface()<EOL>self.rom = rom<EOL>self.ale.setBool(b'<STR_LIT>', display_screen)<EOL>self.ale.setInt(b'<STR_LIT>', seed.randint(<NUM_LIT:0>, <NUM_LIT>))<EOL>self.ale.setFloat(b'<STR_LIT>', repeat_action_probability)<EOL>self.ale.setBool(b'<STR_LIT>', False)<EOL>self.ale.setInt(b'<STR_LIT>', frame_skip)<EOL>self.ale.loadROM(rom.encode())<EOL>width, height = self.ale.getScreenDims()<EOL>self.gamescreen = np.empty((height, width, <NUM_LIT:3>), dtype=np.uint8)<EOL>self.frame_skip = frame_skip<EOL>self.action_inds = self.ale.getMinimalActionSet()<EOL>self.loss_of_life_reward = loss_of_life_reward<EOL>self.cur_lives = self.ale.lives()<EOL>self.loss_of_life_termination = loss_of_life_termination<EOL>self.life_lost = False<EOL>
Initialize ALE.

Args:
    rom: Rom filename and directory.
    frame_skip: Repeat action for n frames. Default 1.
    repeat_action_probability: Repeats last action with given probability. Default 0.
    loss_of_life_termination: Signals a terminal state on loss of life. Default False.
    loss_of_life_reward: Reward/Penalty on loss of life (negative values are a penalty). Default 0.
    display_screen: Displays the emulator screen. Default False.
    seed: Random seed