First more or less working version.

Definition is not a good one... It gives good result for 2-2-box-world, but formally it seems that we need to do sth different.
I archive the code at this stage, maybe will be useful later, and open new branch.