A LuaJIT/FFI wrapper for the Arcade Learning Environment.
There is another Lua wrapper (alewrap), but it requires a separate build step with its own dynamic library and has a slightly different API.
local alecwrap = require 'alecwrap' local ale = alecwrap.new("roms/breakout.bin") local reward = ale:act(ale:getLegalActionSet()) print(reward, ale:getFrameNumber(), ale:isGameOver(), "\n")
- Download or clone ALE repository and build ALE using the following commands (if you are building on Windows using mingw, add
-G "MSYS Makefiles"to the cmake command):
cmake -E make_directory build cd build cmake .. -DCMAKE_BUILD_TYPE=Release make
build/libale_cdynamic library to your project directory (
libale_c.dllv0.5.0 compiled for 32bit Windows is already included).
alecwrap.luafile to your project directory or make it available to your script so that it's loaded with
Running example script using ZeroBrane Studio
- Download and install ZeroBrane Studio.
- Launch ZeroBrane Studio and load the example by using the following command:
zbstudio alecwrap-directory alectest.lua
- Run the example using
Project | Runmenu command.
Paul Kulchenko (firstname.lastname@example.org)
See LICENSE file.
The license doesn't apply to ROM files (in the
roms directory), which are only included for educational purposes.