I read that block of text and I immediately was reminded of the main protagonist, R. Daneel Olivaw, in Asimov’s Robot and Foundation series.
In Robots and Empire, where Asimov finally links the Robot series with the Empire series, [R. Giskard Reventlov] and Daneel often discuss the limitations of the Laws of Robotics, a process lengthened by the fact that their positronic pathways prevent thought along these lines, thus often leading to a temporary loss in the ability to talk or move. By the end of the book, when Daneel has formulated the Zeroth Law of Robotics (“A robot may not harm humanity, or through inaction, allow humanity to come to harm"), Giskard is the first robot to act according to this new law.
Together Daneel and Giskard imagine the science of “psychohistory" or laws of humanics, that would enable them to execute the "Zeroth Law" in a quantitative sense. Thousands of years later this would be developed into practical application by Hari Seldon.