Before reading this essay, read about the Google-Trolley problem here.
As a utilitarian, I’d say you should of course run into the fat man. That’s not very interesting. But what other reasons might one give to make one choice or the other?
As far as I can see, only two factors distinguish the trolley case from the fat man case. The first is that you are killing the fat man with your own hands, whereas you only indirectly kill the man on the track.  If one believes that this is the relevant distinction, it would be acceptable to program a computer to kill the fat man since you are not killing him yourself.
The second factor is that you use the fat man as a means stop the train—it would not stop without pushing him—whereas the man on the track only just happens to be in the way. In Kantian terms, you treat the fat man as a means to an end and not as an end in himself. Kant would say that you should program the machine not to kill the fat man.
But the real answer is that you should kill the fat man because doing so increases utility.
 I think this is the reason why most people switch sides between the trolley problem and the fat man problem—an aversion to direct killing, not actual moral reasoning.