How close are we to replacing pilots with computers?
As a person that "tries to replace pilots with computers" I personally say: not even close.


The processing power (certified for flight, not the latest pentium sitting under your desk) is too behind, in particular concerning the point here below.
Synthetic vision is still extremely lacking. This is currently the biggest hurdle to overcome. While pilots can look out of the windows and assess the situation (with some limits, admittedly), computers still have several problems with it, starting from a general lack of cameras and going all the way to the daunting level of processing power required.
Ability to adapt is still a long way to come. Computers are "fundamentally stupid", they do what they are told (programmed) to do, they are not capable of adapting to an unforeseen (and never experienced before) emergency. There are several people working in machine learning and the field has advanced significantly in the latest years, but good luck certifying those programs.