Permutations of a children's trainset visualized
mcconn.xyz
mcconn.xyz
There's a note at the end that you can get more solutions by forcing a little give in the track. It's also worth noting, if you're actually buying these for your kid to play with that there's aftermarket 3rd party flexbile connectors available on Amazon, which reduces the frustration of building a really "cool" track and finding that it's not actually possible to make that final connection.
Ideally, I'd input my platform shape and size, the list of pieces I have on hand, and then ask the engine to produce valid track layouts.
...
It seems the text says for 12 pieces there are 2 solutions, but the animation shows four.
Also, there doesn't seem to be a check to see whether the bridge pieces are together. (When all 's' pieces are used there has to be at least one connected pair).