Reinforcement Learning Cryptography in TensorFlow
by Faris Sbahi -- final project for CS 590: Reinforcement Learning by Prof. Parr
A project inspired by Google Brain's work regarding using neural networks to protect communications. Here, we seek to use reinforcement learning as an alternative model.
In this setting, we model attackers by neural networks; alternative models may perhaps be enabled by reinforcement learning. [2]
- Install pip and virtualenv
On MacOS
$ sudo easy_install pip
$ sudo pip install --upgrade virtualenv
- Clone the repository and install the requirements
$ git https://github.com/farice/RL-Cryptography
$ cd RL-Cryptography
$ mkdir ~/rl-cryp
$ virtualenv --system-site-packages ~/rl-cryp
$ source ~/rl-cryp/bin/activate
$ pip install -r requirements.txt
rl-cryp
is an arbitrary directory. You can replacerl-env
with a directory of your choice.
To train the neural networks, run the main.py
script.
$ python main.py --msg-len 32 --epochs 50
Once finished deactivate the virtual environment
$ (rl-cryp) deactivate
- Learning to Communicate with Deep Multi-Agent Reinforcement Learning, Oxford [1]
- Learning to Protect Communications with Adversarial Neural Cryptography (ANC)), Google Brain [2]
- ankeshanand's implementation of ANC in TensorFlow
- Thanks to @agakshat for his MADDPG starter code