Does the autopilot attempt to recover from a mechanical failure of a single control surface?
Normal autopilots don't. They expect all systems to work correctly, and in case of  failure of a single control surface they will stubbornly command actions which are no longer possible. For them, thrust is only for controlling the vertical speed, and the application of asymmetric thrust for yaw control is not possible. 

There are experimental autopilots which compare the result of their actions with a number of pre-programmed scenarios and select for their next commands the scenario which agrees best with reality. These really do what you assumed, but the specific scenario must have been considered before so the specific control laws are part of the code. Computers small enough to be carried on airplanes became powerful enough to do this in real time maybe 20 to 25 years ago, but I am not aware that regular autopilots of airliners have this capability even today. It is, however, used for unmanned vehicles.