Pilots can be one of the factors in many air traffic accidents. When one or both pilots are impaired (e.g. fatigue, drunk), disabled, capable but wrong-headed, don’t have sufficient training, distracted, miscommunicate with the air traffic controller, or follow wrong instructions from the air traffic controller, the risk of accident will increase dramatically. In some of these cases, the risk can be mitigated by using big data and machine learning. The system will collect and analyze large amount of data about the state of the aircraft, e.g., the flight path, the immediate environment around the aircraft, the weather and terrain information, and the pilots’ input to control the aircraft. Additional sensors such as eye tracking devices and biological monitor can also be added to determine the condition of the pilots. If the pilots’ input do not match proper reaction to the situation or the pilots are impaired, the learning machine will first provide an advisory to the pilots. If both pilots are impaired or incapable, a warning will be sent to the flight attendants and air traffic controllers so that they can take appropriate actions. The learning machine will be trained by both accident database and an automatic training system.