Added Q learning and data collection method