The Lost Mind of Dr. Brain/Train of Thought

Train of Thought is a minigame where you direct colored balls traveling on rails by toggling track switches.

The game will spit out balls in a set pattern from one machine and your task is to guide the marbles into the receiving machine, in the correct order.

Balls must not collide.

Some tracks are colored. These tracks will redirect balls with the same color to a different path. Gray balls are entirely unaffected by colored tracks.

Some boards have parts of the track underground.

Easy difficulty will have simple track layouts that let you trap balls in loops easily and don't need to worry about tricky junctions. Harder difficulties add more track, make liberal use of colored track and in general have messier layouts.

Strategy
While the game says that it wants "the COLOR ball", it will accept any ball with that color. Likewise, you don't need to worry about the timing of the balls entering the receiving machine, just the order.

The pattern for the balls being sent out and requested is fixed for each board, so you can memorize it if needed.

The primary strategy is to capture balls in loops so that you can let them out one at a time in the order the game calls for.

Note that you can pause the game by clicking the switch again. Everything remains on the screen and you can gather your thoughts and calm your nerves.

Balls, unlike normal trains, can not crash from taking a misconfigured switch. They will just carry on as if the switch was correctly set. As such, you don't need to spend time maintaining switches that join two tracks together.

Underground tracks may seem obvious at first glance, but some boards add in junctions and colored tracks underground to throw you off.