Getting started: Use nle-ttyplay instead of regular ttyplay to play back recordings

NLE saves recordings of each run in the .ttyrec format. If you are like me and attempt to playback those files with “regular” ttyplay, then you’ll run into some difficulties (and the ttyrec will show up as garbage or without color or other issues). NLE packages their own version of ttyplay that works very well (and even offers color support!).

So after completing the regular starter-kit setup, you can run the random agent with a command like:

cd nethack_baselines/other_examples/

Exit early (may need to ctrl+c or close the terminal window) after a few iterations complete, then go into your specific log directory created within your other_examples folder (your specific folder / file names will be different from mine):

cd nle_data/20210623-111529_w6kyd95y/
nle-ttyplay nle.60710.0.ttyrec.bz2

And this will let you watch the recording of what your agent performed during that run! :slight_smile:

Good luck, have fun!



Yes, NLE saves ttyrec data in a different format than “standard” ttyrec, because it saves outputs as well. We provide nle-ttyrec and nle-ttyplay to record and play this format. The code for these scripts can be found at

Notice that nle-ttyplay has “secret” keyboard commands as well, namely “vi navigation” via h and l. For a full list of commands, check the source code at (notice that the navigation is necessarily limited to jumping to “clear screen” commands, as ttyrecs work incrementally).