News for hackers. Stuff that matters.
Re:Permutations of a children's trainset visualized by ZeroGravitas on Monday November 30, 2015 @12:27PM (#10650549)
Nice.

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.

Re:Permutations of a children's trainset visualized by dekhn on Monday November 30, 2015 @10:54AM (#10649996)
I really want this for Marklin track (HO trains). The tracks have some interesting geometric constraints, but can also produce really nice layouts: http://www.scarm.info/blog/tutorials-and-examples/examples-o...

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.

Re:Permutations of a children's trainset visualized by czers on Monday November 30, 2015 @09:43AM (#10649602)
Re:Permutations of a children's trainset visualized by biomcgary on Monday November 30, 2015 @01:12PM (#10650761)
My wife and I bought a set of tracks for the kids. Then we bought a couple more sets for ourselves. We have a friendly competition to see who can build the most elaborate/aesthetics configurations. Occasionally, the kids get to play with them too.
Re:Permutations of a children's trainset visualized by cafard on Monday November 30, 2015 @08:54AM (#10649331)
John Graham-Cumming posted something like this some years ago.
Re:Permutations of a children's trainset visualized by mcconnma on Monday November 30, 2015 @09:23AM (#10649499)
Thanks for the name, I found the article here: http://blog.jgc.org/2010/01/more-fun-with-toys-ikea-lillabo-.... However, he only solves for 16 pieces. This post and program solves for any number of pieces.
Re:Permutations of a children's trainset visualized by zokier on Monday November 30, 2015 @11:38AM (#10650234)
You an jgc also use different criteria for symmetry/rotation removal, evidenced by different count of layouts for 16 pieces (jgc 9, you 15)
Re:Permutations of a children's trainset visualized by mcconnma on Monday November 30, 2015 @12:39PM (#10650616)
I noticed that as well, I need to figure out what is the difference ...
Re:Permutations of a children's trainset visualized by jacquesm on Monday November 30, 2015 @09:07AM (#10649398)
Re:Permutations of a children's trainset visualized by rzzzt on Monday November 30, 2015 @12:58PM (#10650705)
This reminds me of the C64 game Scalextric, which had an integrated level editor with blocks inspired by its real-life counterpart. There were turns covering different angles, which (at the time) made it very hard for me to create a custom level. :)

https://youtu.be/StYH6GPsddU

Re:Permutations of a children's trainset visualized by jon-wood on Monday November 30, 2015 @01:40PM (#10650914)
If you enjoyed that, pick up a copy of Trackmania.
Re:Permutations of a children's trainset visualized by ant6n on Monday November 30, 2015 @10:42AM (#10649922)
This is very neat. When playing with this set, I've wondered about this.

...

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).

Re:Permutations of a children's trainset visualized by mcconnma on Monday November 30, 2015 @10:56AM (#10650011)
Thanks. I updated the code and the post to reflect tests for the bridge case as you mention. It affected the 12 piece and 16 piece solutions. The animated gifs are udpated and should be correct now.
Re:Permutations of a children's trainset visualized by mayoff on Monday November 30, 2015 @08:00PM (#10653018)
Fun project. The output would be easier to understand as small multiples instead on animated gifs.