- moved most of the code to Agent class in rl.py