In Avengers:Age of Ultron, during the final battle that ensues in Sokovia, Ultron faces the Avengers guarding that thingy which held the city of Sokovia and prevented it from falling:
Thor: Is that the best you can do?
(Ultron summons his army of robots to join him.)
Steve Rogers: You had to ask.
Ultron: This is the best I can do. This is exactly what I wanted. All of you, against all of me. How could you possibly hope to stop me?
Tony Stark: Well, like the old man said. Together.
(They fight off Ultron's attacking robots.)
Ultron: You know, with the benefit of hindsight...
(Hulk knocks him far away.)
Just as Hulk punches Ultron away, he roars and the Ultron bots flee immediately. Ultron (and his bots) evolved over human imperfections. As Ultron puts it:
Everyone creates the thing they fear. Men of peace create engines of war. Invaders create avengers. Parents create children, that will supplant them.
So evidently, his programming overcame the concept of fear. But when Hulk punches him off, the Ultron bots flee in fear. Is there a reason why they ran?