Knex Ball Switch Puzzle

To play this puzzle: put the ball on one of the top two switches. The ball will then fall down the machine, flipping some of the switches. Repeat this process until the ball ends up in the square at the bottom of the machine.
No matter how the switches are arranged, it is always possible to solve this puzzle with 8 moves or fewer.
Scaffold




This machine has 3 layers.
The bottom layer has a square to catch the ball.
Switches




These switches have two stable states: one facing left and one facing right.
Diagonal Paths





These pieces help guide the balls from switch to switch.
Troubleshooting - Extra Supports




If you find that the balls keep falling off the side, you can add some vertical yellow rods to force the balls into the middle of the track.