This code performs SSX algorithm on DoorKey. 

This code is based on a DoorKey environment from the github repository available at: https://github.com/maximecb/gym-minigrid. Additional scripts to train models was taken from the github repository available at https://github.com/lcswillems/rl-starter-files.

Some extra steps are necessary in order to run SSX on DoorKey:
1. Copy the directory utils and file model.py from repo https://github.com/lcswillems/rl-starter-files into this directory
2. Install gym_minigrid package (https://github.com/maximecb/gym-minigrid)
3. Replace gym_minigrid/env/doorkey.py with envs/doorkey.py where gym_minigrid is the location of the package installed in Step 2. For example, if you have Anaconda3 installed, the path might be Anaconda3\Lib\site-packages\gym_minigrid\envs\doorkey.py. The new doorkey.py file has an extra environment for the unlocked version of the game.

Command to run SSX on DoorKey:

python doorkey_savefigs.py --mode mode

where mode is either locked or unlocked. Directories will be created in figures/strategic_states with the results of policy for locked or unlocked applied to the corresponding saved scenario in saved_boards. SSX will be applied to several states along the path of the saved scenario. Pretrained models for the locked and unlocked environments are in directory storage.