In recent years, the evolution of technology has allowed the introduction of automation in vehicles, that improve road safety by reducing the contribution of the human factor to the driving process. The objective of this research is to propose a reinforcement learning algorithm for controlling driving behaviour with the aim to improve safety and comfort. The learning is based on detailed trajectory data from a highly visited signalized arterial in the Athens downtown area. The safe and comfortable driving profiles are identified from the trajectory data. Next, a simple Q-learning algorithm is developed and various combinations of the exploration rate, the discount factor γ and the learning rate were tested for the optimal parameterization. The final Q-Table can be used inside vehicles for collision avoidance in order to improve road safety. Results indicate that the algorithm converges fast and is trained efficiently to response to unseen conditions. Further training in extreme events or adverse weather conditions will increase the generalisability of the proposed safe driving assistance framework.