The goal of the lecture was that the train should have a constant speed despite hills introduced into the track. In order to measure the speed of the train, he noticed that there was a small glitch that would occur as the motor's armature switched polarity, and so a time measurement of the glitches was proportional to the speed of the engine.
[I took the course in 85 and still remember it, so he left something of an impression. A couple of generations learned analog feedback from this course.
RIP Prof Roberge.]
Edit: By some lesser miracle, his lectures are on youtube. The train lecture was last.
(above breaks with the bracket included)
Every time my model train interest rises, I consider setting up a small layout for puzzles like these.
Traversable doesn’t change if you bend parts of a track, and that can change the compass direction the switches point at.
For example, if part of the track containing a switch has an S shape, moving the switch from the center horizontal to the top or bottom one turns it by 180 degrees without affecting traversability.
*classic Lionel and Marklin designs used a third conductor in the centre. Since the outer rails are wired together, reversing designs are trivial.
I would think all ‘large enough’ puzzles of this kind are easy. You build a rectangle (needs four corners. If you don’t have those, no closed curve is possible), and use pairs of left-over curves to add detours to the straight ends, possibly compensating for an odd number of straight edges. I would guess there is an analog to Euler’s formula (https://en.wikipedia.org/wiki/Euler%27s_formula) that describes what number of small corners, large corners, and straight ends can form a large closed curve.
I also suspect ‘large enough’ isn’t that large, probably everything over 16 pieces or so (Smaller problems may be non-standard because they require effort to avoid overlap)
Very interesting to see these results about the more basic model, where we leave out the game part and just focus on movement! I may have to contact the authors about this...
It had the reputation of being one of the hardest CS classes in the undergrad curriculum.
"Here, we've got this model train set hooked up to a PC with nothing on it. Here are some specs. Write an RTOS and control program to make the trains do something interesting."