Updated generate.py and replay.py, added replay.sh (replay.py wrapper)