Skip to content

Sarah-wookey/RL_NetHack_2020

Repository files navigation

RL_NetHack_2020

Reinforcement Learning solution for NetHack environment

Authors:

  • Rifumo Mzimba
  • Caston Nyabadza
  • Sarah Wookey

We attempt to solve the NetHack environment using the two different implementations listed below:

Policy Gradient method

  • Actor-Critic

Value Function method

  • Deep Q-network

Code

The code is set up to run on colab as a jupyter notebook, to set NLE enviroment go see NetHack

Install NLE

For information on how to install the enviroment locally, go see NLE. For Windows install, go see NLE for the docker install or follow the install instructions below for instructions on how to install on linux. :

Update cMake

cd
wget https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4.tar.gz
tar xzvf cmake-3.18.4.tar.gz
cd cmake-3.18.4/
./configure --prefix=$HOME
make
make install

Now put this in your ~/.bashrc

export PATH=$HOME/bin:$PATH

Now run

source ~/.bashrc

To confirm, run the following, which should tell you the version is 3.18

cmake --version

Install Bison

cd
wget http://ftp.gnu.org/gnu/bison/bison-2.3.tar.gz
tar -xvzf bison-2.3.tar.gz
cd bison-2.3
./configure --prefix=$HOME
make
make install
source ~/.bashrc
which bison

Install Flex

cd
wget https://downloads.sourceforge.net/project/flex/flex-2.6.0.tar.gz
tar xzvf flex-2.6.0.tar.gz
cd flex-2.6.0/
./configure --prefix=$HOME
make
make install
source ~/.bashrc
which flex

Install NLE

conda create -n nle python=3.8
conda activate nle
pip install --no-use-pep517 nle

Verify all is well

python
import gym
import nle
env = gym.make("NetHackScore-v0")
env.reset()
env.step(1)
env.render()

Useful NLE links

Nethack baseline Agent:
https://github.com/facebookresearch/nle/blob/master/nle/agent/agent.py

NetHack Learning Environment:
https://github.com/facebookresearch/nle

NetHack Wiki:
https://nethackwiki.com/

NetHack Learning Environment Research Paper:
https://arxiv.org/pdf/2006.13760.pdf

About

Reinforcement Learning solution for NetHack environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published