In railroading, the pilot (also known as a cowcatcher or cattle catcher) is the device mounted at the front of a locomotive to deflect obstacles on the track that might otherwise derail the train.
In addition to the pilot, small metal bars called life-guards, rail guards or (UK) guard irons are provided immediately in front of the wheels. They knock away smaller obstacles lying directly on the running surface of the railhead. Historically fenced-off railway systems in Europe relied exclusively on these devices and did not use pilots, but this design is rarely used in modern systems.
Trams use in place of the pilot a device called a fender. Objects lying on the tram track get hit by a sensor bracket, which triggers the lowering of a basket shaped device to the ground preventing overrunning of the obstacles by dragging it along the road surface in front of the wheels.
In snowy areas the pilot also has the function of a snowplow.
The pilot was invented by Charles Babbage in the 19th century, during his period of working for the Liverpool and Manchester Railway. However, Babbage's invention was not built, and it is uncertain whether later users were aware of Babbage's idea.