Reconfigurable flight control systems have been a topic of research in military aircraft for decades. The science is existing and mature, but not an easy one: damage cannot be predefined, and therefore cannot be explicitly programmed in.
Classical re-configurable flight control systems attempt to re-program on the fly: the transfer function between input and expected aircraft response is constantly monitored, and if actual response differs from expected response, the gains in the loop are reset on the fly in order to get closer to a stable, matching response with neutral trim.
From this paper, which is almost 20 years old:
The goal of control reconfiguration is to maintain handling qualities in the presence of a large universe of damage and failure modes. In contrast to robust control design methods of the past, the emphasis in control reconfiguration involves a combination of on-line parameter identification control redesign and/or adaptation for a degraded mode of flight.
Neural networks are now being implemented in reconfigurable flight control systems. These work as the synapses in our brain: there are a lot of possible connections, which are defined in our childhood as a result of positive and negative experiences. The system is self learning, from a multitude of outcomes that are labeled either "desirable" or "not desirable". Neural networking is what makes Google Translate possible; translating a language by programming is quite difficult and often less accurate because of all of the different inflections and double meanings in a language.
So in military aircraft an auto-damage-pilot is very well possible. Civil airliners are a different matter, not because of technology but because of certification. Safety is of the highest importance, and how can we prove that our re-configuration is actually helpful?