Teaching cars to drive with foresight: Self-learning process