Trainyard for iOS and Android (website, iTunes, Play Store) is probably the best puzzle game I have ever played. Not only does it beat out any mobile app of any kind for the title of "How Is This So Impossibly Awesome", it's a strong contender even against real-life games like Clue or basketball. If you have access to an iOS or Android device and you still have not yet played it, drop everything and do so, then return here after you've mastered the basics.
I love Trainyard because it parallels my three other main passions in life: physics, education, and writing. The common characteristic shared by these disparate fields is that they all involve very simple patterns which are creatively layered to build new and beautiful structures. Here's an example:
(Click the solution to watch it play out. Note that the solutions make sounds, and require a browser that supports flash.)
Someone with no experience playing the game may see this as a chaotic mess that somehow generates the required colours of cars, much as a student who hates physics will see a mathematical proof on a teacher's chalk board as a bunch of scribbles that apparently equals fifteen. A well-trained player, however, will see this solution as a clever way to use some common track forms within the boundaries and limitations of this particular puzzle.
I have two reasons for creating this guide: the first is that writing about the details of these kinds of patterns often reveals surprising new insights. The second is that maybe someone will find it a useful tool for getting even more enjoyment out of the game. I don't intend to go over the basic rules of gameplay, since these are covered within the game itself.