Class: ALEInterface

Inherits:
Object
  • Object
show all
Defined in:
lib/ale_ruby_interface.rb

Instance Method Summary collapse

Constructor Details

#initializeALEInterface

include ALELib



58
59
60
# File 'lib/ale_ruby_interface.rb', line 58

def initialize
  @obj = ALELib.ALE_new
end

Instance Method Details

#act(action) ⇒ Object



98
99
100
# File 'lib/ale_ruby_interface.rb', line 98

def act(action)
  return ALELib.act(@obj, action.to_i)
end

#clone_stateObject



174
175
# File 'lib/ale_ruby_interface.rb', line 174

def clone_state
end

#clone_system_stateObject



180
181
# File 'lib/ale_ruby_interface.rb', line 180

def clone_system_state
end

#decode_stateObject



195
196
# File 'lib/ale_ruby_interface.rb', line 195

def decode_state
end

#delete_stateObject



186
187
# File 'lib/ale_ruby_interface.rb', line 186

def delete_state
end

#encode_stateObject



192
193
# File 'lib/ale_ruby_interface.rb', line 192

def encode_state
end

#encode_state_lenObject



189
190
# File 'lib/ale_ruby_interface.rb', line 189

def encode_state_len
end

#game_overObject



102
103
104
# File 'lib/ale_ruby_interface.rb', line 102

def game_over
  return ALELib.game_over(@obj)
end

#get_available_difficutiesObject



126
127
# File 'lib/ale_ruby_interface.rb', line 126

def get_available_difficuties
end

#get_available_modesObject



120
121
# File 'lib/ale_ruby_interface.rb', line 120

def get_available_modes
end

#get_bool(key) ⇒ Object



70
71
72
# File 'lib/ale_ruby_interface.rb', line 70

def get_bool(key)
  return ALELib.getBool(@obj, key)
end

#get_episode_frame_numberObject



144
145
# File 'lib/ale_ruby_interface.rb', line 144

def get_episode_frame_number
end

#get_float(key) ⇒ Object



74
75
76
# File 'lib/ale_ruby_interface.rb', line 74

def get_float(key)
  return ALELib.getFloat(@obj, key)
end

#get_frame_numberObject



138
139
# File 'lib/ale_ruby_interface.rb', line 138

def get_frame_number
end

#get_int(key) ⇒ Object



66
67
68
# File 'lib/ale_ruby_interface.rb', line 66

def get_int(key)
  return ALELib.getInt(@obj, key)
end


110
111
112
113
114
115
# File 'lib/ale_ruby_interface.rb', line 110

def get_legal_action_set
  act_size = ALELib.getLegalActionSize(@obj)
  act = NMatrix.zeros[act_size]
  ALELib.getLegalActionSet(@obj, act)
  return act
end

#get_minimal_action_setObject



117
118
# File 'lib/ale_ruby_interface.rb', line 117

def get_minimal_action_set
end

#get_RAMObject



162
163
# File 'lib/ale_ruby_interface.rb', line 162

def get_RAM
end

#get_RAM_sizeObject



159
160
# File 'lib/ale_ruby_interface.rb', line 159

def get_RAM_size
end

#get_screenObject



150
151
# File 'lib/ale_ruby_interface.rb', line 150

def get_screen
end

#get_screen_dimsObject



147
148
# File 'lib/ale_ruby_interface.rb', line 147

def get_screen_dims
end

#get_screen_grayscaleObject



156
157
# File 'lib/ale_ruby_interface.rb', line 156

def get_screen_grayscale
end

#get_screen_RGBObject



153
154
# File 'lib/ale_ruby_interface.rb', line 153

def get_screen_RGB
end

#get_string(key) ⇒ Object



62
63
64
# File 'lib/ale_ruby_interface.rb', line 62

def get_string(key)
  return ALELib.getString(@obj, key)
end

#livesObject



141
142
# File 'lib/ale_ruby_interface.rb', line 141

def lives
end

#load_rom(rom_file) ⇒ Object



94
95
96
# File 'lib/ale_ruby_interface.rb', line 94

def load_rom(rom_file)
  ALELib.loadROM(@obj, rom_file)
end

#load_stateObject



171
172
# File 'lib/ale_ruby_interface.rb', line 171

def load_state
end

#reset_gameObject



106
107
108
# File 'lib/ale_ruby_interface.rb', line 106

def reset_game
  ALELib.game_over(@obj)
end

#restore_stateObject



177
178
# File 'lib/ale_ruby_interface.rb', line 177

def restore_state
end

#restore_system_stateObject



183
184
# File 'lib/ale_ruby_interface.rb', line 183

def restore_system_state
end

#save_screen_PNGObject



165
166
# File 'lib/ale_ruby_interface.rb', line 165

def save_screen_PNG
end

#save_stateObject



168
169
# File 'lib/ale_ruby_interface.rb', line 168

def save_state
end

#set_bool(key, value) ⇒ Object



86
87
88
# File 'lib/ale_ruby_interface.rb', line 86

def set_bool(key, value)
  ALELib.setBool(@obj, key, value)
end

#set_difficultyObject



129
130
# File 'lib/ale_ruby_interface.rb', line 129

def set_difficulty
end

#set_float(key, value) ⇒ Object



90
91
92
# File 'lib/ale_ruby_interface.rb', line 90

def set_float(key, value)
  ALELib.setFloat(@obj, key, value)
end

#set_int(key, value) ⇒ Object



82
83
84
# File 'lib/ale_ruby_interface.rb', line 82

def set_int(key, value)
  ALELib.setInt(@obj, key, value)
end

#set_modeObject



123
124
# File 'lib/ale_ruby_interface.rb', line 123

def set_mode
end

#set_string(key, value) ⇒ Object



78
79
80
# File 'lib/ale_ruby_interface.rb', line 78

def set_string(key, value)
  ALELib.setString(@obj, key, value)
end