Simple fact about computer programs or AI: They all have bugs. *ALL* of them. Not even one single exception. Period.
And no, testing doesnt catch all bugs. In fact, it doesnt even come close.
And no, having big resources and big research doesnt stop it either. There WILL be bugs. Period.
Worse, the more advanced the things get, the higher the chance for MORE bugs (and this is the bit that people always forget). AND. On top of that. It gets exponentially harder to CATCH the bugs. People always have this odd tendancy to think that if a program/game/whatever is buggy, it must be because of laziness. No, it's because it's a hyper-complicated process. They also have this tendancy to think that if you simply fling enough time and money at something, it will be perfected. Nope. Doesnt work that way.
WORSE STILL is the sheer ridiculous complexity that would be required to create a proper, truly functional robot surgeon capable of performing properly. Because "properly" would mean a vast amount of CONSTANT adaptation. Constant encounters with situations that were not directly programmed into the thing. The human body is a strange thing that isnt even fully understood yet (not even remotely close). On top of THAT, differences occur in each individual. A mere slight size difference could be enough to set off problems in an AI. Really, even the absolute most advanced AIs in the world are, in reality, dumber than a sack of hammers. The tech simply is not there yet. Yet even if it was.... again, the slightest bug could be a problem.
And here's the thing: Even a rarely occurring bug could be a problem. That's the thing with computer programs of any sort: They're just fine until, suddenly, they arent.
It reminds me of a moment in one of Arthur C. Clarke's books... one of the Rama books, I believe. There's a point in the story at which one of the characters suddenly experiences a medical emergency. However, it's the sort of thing that surgery can easily and quickly fix. They have a robot surgeon, because of course they do. SUPPOSEDLY infallible (because people always think things like this are). During the surgery, an unexpected event occurs. Some sort of impact that jolts the entire place. Not like some constant quake or something.... one jolt. And not enough of one to even knock someone over. But it trips something within the robot, happening during a very specific part of the thing's program. A million-to-one chance of something like that ever occuring... but it does anyway. The thing enters an endless loop. Which, in that situation, means that it simply doesnt stop cutting. This ends about as well as it sounds like it does. The situation that occurred may have been super rare, but it still revealed a bug or oversight. And when it comes to freaking surgery, ONE glitch could kill. Easily. Doesnt need to be an endless loop. One tiny mistake... hell, a mistake that might not even be noticable right away!.... is enough (which of course is an issue that normal surgeons must face).
Now obviously that's just a story. Nobody's doing robot surgeries on some sort of alien station. But IRL, there's a bazillion things that could go wrong and impact the robot like that. "Bugs" dont even have to be within the program itself. A bazillion possible engineering mistakes/errors/oversights could cause it. Or improper maintenance. Any given machine has about a million surrounding (and often unaccounted for) variables that can get in the way. There's a reason why normal computers spaz out so often even just from hardware issues instead of software.
Also, a human surgeon is capable of dealing with many things. In many different ways. If a problem were to occur, fast reaction or corrections are possible, AND in ways requiring heavy improvisation, even if that improvisation requires things/people that arent in the immediate area. Again, even the most advanced AI currently possible cant even touch that.
On top of ALL OF THAT STUFF, any highly advanced operation by a robot/machine MUST be constantly supervised by someone that knows what they're doing. In the case of freaking surgery, the sheer level of skill/knowledge necessary would be extreme (and whoever posesses that knowledge probably ISNT a surgeon themselves... they'd be an engineer of some sort. Imagine the possible communication screwups between such a person and the medical staff). Yet another layer of potential problems.
All in all, the tech necessary to create a truly reliable thing of this nature simply doesnt exist. People cant even make SIMPLE computers without them going bloody bonkers frequently. We arent ready for freaking robot surgeons.
Oh, and that's all not even going into the possibility of malicious interference. At least a human surgeon cant be remotely hacked from a distance. And you freaking know that people WILL try that. It's not even a question of "if". It's a question of "how quickly can they find a way".
There, that's my useless thoughts on it, because I'm bloody bored. I find the concepts of AI fascinating, but after 3 freaking decades of computer use, I never, ever trust programs of any sort. No matter how expensive and advanced. I've had too much experience for that.