Road surface conditions can cause serious traffic accidents, often with tragic consequences. Thus, an efficient system for mapping road anomalies can significantly promote the safety of drivers and pedestrians. This paper proposes a novel road anomaly mapping system that is able to detect a wide variety of conditions with high accuracy. The smartphone's accelerometer and GPS sensors are used for detection to minimize infrastructure costs. In addition, to ensure the system is adaptive to different road conditions, pattern recognition techniques are used to automatically calculate the detection threshold. Furthermore, to compensate for GPS inaccuracies, reinforcement learning based on a proposed reward system is used to maximize confidence in the detected anomalies. The reward system is also able to forget anomalies that have been fixed. Moreover, the system is implemented in a distributed way between the smartphone and a cloud server to minimize cellular bandwidth usage, while still retaining the accuracy advantages of a centralized cloud. Live tests have been conducted to evaluate the performance of the system and the results show it is accurate under different driving conditions.