MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply TodayAdd a new block to these towers without letting them fall.

To add a new block just choose the x-coordinate (between -10 and 10) where to drop your block. Try your luck and help us build Blockland!

*Figure*: Common/shared canvas, procedurally generated from all current solutions to this problem (visit http://www.mathworks.com/matlabcentral/trendy/plots/1192 for a more recent version)

**Description**:

This is a little experiment in collaborative engineering/art/fun.

We have a common/shared canvas where we are building a tower (or perhaps something else) one block at a time, adding the contributions of everyone who passes this problem. Your job is simply to add one or more blocks to this tower, without letting it fall.

To see the current **up-to-date state of the canvas** and interactively choose a location for your new block you may download **this Matlab code** and run it in your computer.

For a **slightly out-of-date version of the canvas** you can also visit **this Trendy plot** (note this plot only updates hourly so it may not reflect the current state of the canvas, where your solution will be evaluated; copy and paste the plot's code in your computer if you want an up-to-date version of the canvas).

**Details**:

Blocks are square of identical size and mass (with side equal to 1).

To add a new block your function should return the x-coordinate of the left-side of the new block that you wish to add. The block will be entered from the top and it will be dropped (tetris-style) at that position until it hits the floor or another block. The new configuration will then be evaluated and if it still holds (if the tower is still stable) you will pass this problem, and the new block will be added to the common canvas.

Valid x-coordinates range from -10 to 10, and they will be rounded to the nearest three-decimals precision.

Stability of the overall configuration is determined disregarding friction (blocks are perfectly smooth).

Visit Equilibrium for a related Cody problem.

220 correct solutions
152 incorrect solutions

Last solution submitted on Jan 23, 2015

5 players like this problem

1 Comment

Binbin Qi
on 19 Oct 2014

I think this is the only way to solve this problem now?

1 player likes this solution

2 Comments

Dimitris Kaliakmanis
on 22 Oct 2013

let nature decide!!!

J.R.! Menzinger
on 23 Oct 2013

No risk... NO FUN!!

4 Comments

Show
1 older comment

James
on 3 Oct 2013

I was curious what a random number for x would do. Fortunately, the value of x doesn't change once the code has been run, and the block does not move around.

Alfonso Nieto-Castanon
on 3 Oct 2013

Yes, once the code is run the new block position is encoded in your solution score, so as long as we do not attempt to rescore the solutions it should keep this value for all eternity... ;)

Alfonso Nieto-Castanon
on 4 Oct 2013

sorry I actually had to rescore the solutions to preemptively fix a potential issue (which could happen if two people submit valid but mutually incompatible solutions almost simultaneously), so that block DID move a little... I am hoping I will not need to rescore again...

James
on 4 Oct 2013

I see the rescoring changed a few things around with my solutions. The first random block I submitted was a failure, but the second one worked. This time, both the random ones worked, but a couple of my static ones are now failures. This will be "living art" each time the program gets rescored!

8 Comments