Computer: Format
Computer train set   (+12)  [vote for, against]

Computers are largely made of transistors which switch from one state to another, rather like points on a railway, and thus it would be possible to simulate a computer in a (very large) Hornby 'OO' train set. Trains, representing data, would pass down tracks and be diverted by points and would, as they pass down the track, flip trackside levers which would further alter the state of other sets of points, and so on. A medium-sized domestic train set could be used to simulate a NAND gate and many of these would be used to build up more complex components like adders, etc.
-- hippo, Jan 26 2017

"The Enemy" by Desmond Bagley https://astrofella....emy-desmond-bagley/
Paragraph 9 [8th of 7, Jan 26 2017]

MIT railroading clun comes up with "hacker" and information wants to be free https://en.wikipedi...Model_Railroad_Club
[beanangel, Jan 27 2017]

http://www.thingiverse.com/thing:1720219 [xenzag, Jan 27 2017]

Another take on the general idea Mechanical_20Internet
[doctorremulac3, Jan 29 2017]

Shunting-yard algorithm https://en.wikipedi...ting-yard_algorithm
WKTE [8th of 7, Jan 31 2017]

City And/Or Photo As CPU City_20And_2fOr_20Photo_20As_20CPU
Traffic FETs [8th of 7, Jan 31 2017]

MONIAC https://en.wikipedia.org/wiki/MONIAC
Very clever stuff [hippo, Feb 03 2017]

Yes, definitely! I'm trying to imagine the logic gates now. Would an inverter be like a yard full of carriages which were added to a train if and only if there were no trains coming? Could you represent zeroes by empty trucks and ones by full ones?
-- nineteenthly, Jan 26 2017


//Would an inverter be like a yard full of carriages which were added to a train if and only if there were no trains coming?//

You'd need some kind of clock signal to make sure you inserted the correct number of trains.

It might be better to represent a logic signal as a _pair_ of tracks. A 1 is represented by a train on one track, and a 0 is represented by a train on the other track.
-- Wrongfellow, Jan 26 2017


[8th] is going to get all moist over this one.
-- MaxwellBuchanan, Jan 26 2017


<whimpering and twitching>

There's a spy thriller that uses one of the protagonist's model railway story as a plot device.
-- 8th of 7, Jan 26 2017


MIT model railroading club ...around 1946!-50's [link]

although it does not look like they made linked logic gates from their trains, only very much sort of.

Also, did you know the .5b gets about 30,000 - 40,000 views a month from search engines. electric blanket ideas are popular.
-- beanangel, Jan 27 2017


That's a clocked flip-flop, not an AND gate. Ideal logic gates present the instantaneous result of their inputs and function at their output.

We consider it likely that you don't understand. The precise extent of your lack of understanding has not been defined, but is estimated to be very, very large.
-- 8th of 7, Jan 27 2017


An artist friend of mine made a mechanical gate based logic computer at Manchester Art college in the 60s. Last link doesn't show it, but it's a really interesting example. Trains should work equally well. +
-- xenzag, Jan 27 2017


// There are propagation delays //

Yes, we know. Hence the use of the adjective "ideal", referring to a theoretical model of a "Perfect" gate, which can not actually exist.
-- 8th of 7, Jan 28 2017


This would be a great way to suppress Skynet's progress. It'd have to figure out a way to change the points.
-- not_morrison_rm, Jan 28 2017


While integrating a train into the machinery of a mechanical computer system is possible, I don't know if the components currently exist in a Hornby 'OO' train set. Specifically, while there are switches that can select which track a train goes on, I am not aware of a mechanism by which a passing train can change the state of another switch. I'd like to be shown otherwise since building a computer from standard parts in a toy that has been available since 1938 would be very interesting.
-- scad mientist, Jan 29 2017


Yes, I don't know exactly what the mechanism would be for a passing train to trigger a set of points to change but it seems like it shouldn't be too complicated
-- hippo, Jan 29 2017


If the points aren't locked (or driven) then passing through them in the "wrong" direction will change their state.

In the early days of railways, "falling" or "slip" points were extensively used at the exit from passing loops. Points coud be weighted to lie normally for the through line, but a train from a branch could simply push them open.

However, when such points were "facing" to traffic, numerous accidents resulted, leading to the introduction of "facing-point locks". This is a two-lever system requiring the signalman to follow a defined sequence of lever movements, unlocking, moving and re-locking the points, to allow the relevant signal to be cleared.
-- 8th of 7, Jan 29 2017


The Borg's knowledge on these matters is clearly extensive. Out of curiosity, did you keep the anorak and dandruff after the assimilation?

<waits for Greater Anglia rail to announce that the 8:45 to Liverpool Street has been delayed due to Boolean failure>
-- MaxwellBuchanan, Jan 29 2017


// did you keep the anorak //

Yes.

// and dandruff after the assimilation? //

We have never experienced that particular affliction ...

// 8:45 to Liverpool Street has been delayed due to Boolean failure //

"This is a customer announcement. It appears that the 14:42 from Oxford Clarendon has entered a state of Quantum Indeteminacy in the vicinity of Didcot. We are unable to give an expected arrival time for this service as we cannot simultaneously determine the velocity and location of the train; further, it is also impossible to resolve if the train will leave Didcot, or Didcot will be moved by the train. Our emergency Physics crew is preparing to address the problem, just as soon as they've decided on which algebraic notation to use... "
-- 8th of 7, Jan 29 2017


Sounds like an animation would be easier to make but maybe less interesting to look at.

Then again, this could be made as a school or university project with engineering and computer science departments assisting each other in a national competition. [+]
-- pashute, Jan 30 2017


// maybe less interesting //

Definitely less interesting.

From an academic viewpoint, see <link>
-- 8th of 7, Jan 31 2017


Simple NAND gates are asynchronous, so it would have to be the presence of two or more trains triggering an output state change. The trains would have to be running on parallel tracks, and stop at a signal. This would release a third train to be the input to another logic element.

Real-world gates have fan-out, so there would have to be a way to route multiple trains.

Using points as "memory" is interesting, as they are a quantum state; they relate that a train has passed through previously, not that a train is immediately present. It becomes impossible to predict the arrival of a train, thus confirming the macroscopic observations of the behavior of Virgin Rail services.

This also leads to the concept of the Schrödinger train, which is fixed by the act of observation; no point in looking at a timetable, the only way to see if there's a train is to go to the station and wait until one appears.

Now, that's strangely familiar ...
-- 8th of 7, Jan 31 2017


// even whimsical ideas need to be vaguely workable. //

[marked-for-tagline]

So that means that the logic needs to be bit-serial using the wagons as the 0's and 1's - full waggons and empty ones, the loco being the start bit and the guards's van (caboose for the uneducated) being the stop bit.

4-bit operation should be easy to implement.
-- 8th of 7, Jan 31 2017


Now ... are the trains a representation of the data (words, opcodes) or the actual data items ?

A 4-bit parallel bus would require four tracks; a loco "present" represents a logic "1". Could be done ... but probably not synchronously.
-- 8th of 7, Jan 31 2017


The way I first thought about this idea was that you wouldn't try and replicate logic gates directly but instead would use trains and points to model transistors, and then build up a gate, such as a NAND gate, out of multiple transistors. So if a train (i.e a 1) went down the line representing the 'base' terminal of the transistor, this would switch a point to allow any trains to pass along the track representing the collector-emitter line. If this point wasn't switched, these trains would have to be sent to a train recycling branch line...
-- hippo, Jan 31 2017


The problem there is the train needs to pass continuously to sustain the logic "1" if the transistor analogy is to work, representing the flow of electrons (or holes) into or out of the base.

[IT] 's point about FETs - particularly IGFETs (or indeed thyristors, or UJTs) is an interesting one. <link>
-- 8th of 7, Jan 31 2017


//the train needs to pass continuously to sustain the logic "1"// That depends, shirley, on which architecture you're modelling? Some architectures approximate to an "ideal" system in which current only flows while the system is being charged to the new voltage - leakage is then low. So, a siding holding a train is sort of a perfect memory store.
-- MaxwellBuchanan, Jan 31 2017


"tristate" was a somewhat poor choice for a name, because the less-perceptive sometimes misinterpret it as meaning "trinary".

The three output states are 0, 1, and "invisible". There's got to be a name more catchy and precise than "tristate" ...
-- 8th of 7, Jan 31 2017


For a good time read a bit of steampunk scifi called "The Difference Engine" that postulates a mechanical computer big enough to develop self awareness. :-)
-- Steamboat, Jan 31 2017


Thinking about this more, it may be that a slightly different type of logic is required of a model-train-based computer. This is analagous to water-flow analogue computers such as MONIAC (see link) which have a logic that is not quite the same as traditional transistor-based computers.
-- hippo, Feb 03 2017


MONIAC, and similar machines, are surprisingly sophisticated when you look at the maths they're doing. They can, for example, solve multiple simultaneous differential equations (obviously far beyond the abilities of electronic computers at the time MONIAC was made) so some of the additional parameters you mention might not be beyond its abilities. Also, a good point about the information flow in the circuitry also being the visualisation - you might get this with trains too.
-- hippo, Feb 03 2017


Hold on.

This entire idea is wrongly named. Either that, or the name is right and the entire idea is wrong.

Shirley it should be "Train set computer"? A "Computer train set" would be some sort of railway simulacrum built from computers.
-- MaxwellBuchanan, Feb 04 2017



random, halfbakery