I'm not a railroad expert but I think AI involves much more speculation. They knew what a locomotive could do and what problem it solved. We can't really say that with AI.
A locomotive was an _input_. Like a GPU, arguably. They _didn't_ really know what a railway could do, at the time; a lot of speculative railway projects were terribly ill-conceived and could never have made economic sense (or in extreme cases, worked at all, at least with the tech available; the first attempt at a Channel Tunnel was in the late 19th century, for instance).