ORIGASMIQUE Problem setters and judges: • • • • • Christian Colombo Jean Paul Ebejer Karl Fenech Gordon Pace Chris Porter Origami: The Art of Paper Folding Paper Folding Conundrums • In folding and unfolding a sheet of paper we can mark lines and intersection points. What points can be calculated in this manner? Is it possible to trisect an angle? • Is it possible to fold a piece of paper is such a manner that the perimeter of the resulting shape is bigger than that of the original rectangle? This Year’s Challenge • Given: • A 2x1 sheet of paper; and • A 2-dimensional shape (the target shape). This Year’s Challenge • Given: • A 2x1 sheet of paper; and • A 2-dimensional shape (the target shape). • Expected: • A sequence of instructions (move/translate the paper, rotate it around the origin or fold the paper along the x-axis); • which, if applied to the sheet of paper starting at the origin results in a shape similar to the target one. This Year’s Challenge • Given: • A 2x1 sheet of paper; and • A 2-dimensional shape (the target shape). • Expected: • A sequence of instructions (move/translate the paper, rotate it around the origin or fold the paper along the x-axis); • which, if applied to the sheet of paper starting at the origin results in a shape similar to the target one. • More: • In case of a tie, the solution with the least number of instructions wins. • A secondary prize for the fold resulting in the most original shape will be given. Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Comparing Solutions • A grid (per 1/64 units) is overlaid over the target shape and the given solution. • Let: • c be the number of correctly hit points (points both in the solution and the target shape); • w be the number of incorrectly hit points (points in the solution but not in the target shape); • a be the number of points (the area) of the target shape. • The score of such a solution is: Comparing Solutions • A grid (per 1/64 units) is overlaid over the target shape and the given solution. • Let: • c be the number of correctly hit points (points both in the solution and the target shape); • w be the number of incorrectly hit points (points in the solution but The count of correctly hit not in the target shape); points has to be larger than • a be the number of points (the area) ofincorrectly the targethit shape. that of ones • The score of such a solution is: Comparing Solutions • A grid (per 1/64 units) is overlaid over the target shape and the given solution. • Let: • c be the number of correctly hit points (points both in the solution and the target shape); • w be the number of incorrectly hit points (points in the solution but not in the target shape); The score is never below zero • a be the number of points (the area) of the target shape. • The score of such a solution is: Comparing Solutions • A grid (per 1/64 units) is overlaid over the target shape and the given solution. • Let: • c be the number of correctly hit points (points both in the solution and the target shape); • w be the number of incorrectly hit points (points in the solution but not in the target shape); • a be the number of points (the area) of score the target shape. The is normalised according to the size of the • The score of such a solution is: target shape Comparing Solutions • A grid (per 1/64 units) is overlaid over the target shape and the given solution. • Let: • c be the number of correctly hit points (points both in the solution and the target shape); • w be the number of incorrectly hit points (points in the solution but not in the target shape); Score may range between 0 and 1 • a be the number of points (the area) of the target shape. • The score of such a solution is: Some Observations • Most submissions were implementations of either a bounding box or a convex hull algorithm. There was also a single machine learning approach. Some Observations • Most submissions were implementations of either a bounding box or a convex hull algorithm. There was also a single machine learning approach. Some Observations • Most submissions were implementations of either a bounding box or a convex hull algorithm. There was also a single machine learning approach. Some Observations • Most submissions were implementations of either a bounding box or a convex hull algorithm. There was also a single machine learning approach. Some Observations • Most submissions were implementations of either a bounding box or a convex hull algorithm. There was also a single machine learning approach. Some Observations • Most submissions were implementations of either a bounding box or a convex hull algorithm. There was also a single machine learning approach. • Convex hull is intrinsically better than bounding box, • But still overapproximates shapes that are concave or have holes. • When the area of these holes exceeds that of the polygons, the convex hull algorithm drops to zero scores. The Solutions (the ones who answered) • 7 Java solutions, 1 C++ solution, 1 C# solution. • Some teams used a bounding box solution: • Team #3 (ARIA) • Team #7 (FusRoHuhs) • Team #6 (Programoids) – done via a convex hull calculation • Team #1 (Abstergo) used this for shapes with 6 or more sides • A common convex-hull implementation was to apply for a number of times: Take the next edge of the given shape, translate it to the origin, rotate and fold. • Team #2 (DCoders) applied this on each edge of the target shape. • Team #1 (Abstergo) applied this on the convex hull of the target shape, and performed the step 2*number of sides times. • Team #8 (Team *) iterated this step until the areas of the target shape and the generated one matched. Team #15: Ixaris • Two algorithms running on multiple threads were implemented: 1. 2. Convex hull solution; A greedy search, adding T;R;F parts to the solution. Team #16: Crimsonwing • Three methods were adopted (running on separate threads): 1. Bounding box fitting 2. Genetic algorithm – a sequence of translations and rotations as the chromosome (no longer than 4*number of edges), with an implicit fold every three operations. 3. Constraint Programming – on the parameters of the operations. • After 55 seconds, the best sequence from all the methods is optimised (removing operations with no parameters, collapses similar operations, etc.). • Unfortunately, some bugs in the geometry functions resulted in inaccurate results. Team #17: 6PMers • Our approach was divided into two parts: • Bounding box calculation • Find the points intersecting with the bounding box and join them to find lines corresponding to edges of the original object. • Rotate and fold accordingly – this was not done due to lack of time. Instead… • Re-position/translate it to the required destination without further operations. Some Problems and Solutions… Problem: #7 (The Flattened Cube) Problem: #7 (The Flattened Cube) Teams #1, #11, #15 Problem: #7 (The Flattened Cube) Team #8 Problem: #7 (The Flattened Cube) Teams #6, #7, #17 Problem: #7 (The Flattened Cube) Team #2 Problem: #9 (The Learner Plate) Problem: #9 (The Learner Plate) Teams #6, #7, #17 Problem: #9 (The Learner Plate) Team #8 Problem: #9 (The Learner Plate) Team #11 Problem: #9 (The Learner Plate) Problem: #16 (The Gents) Problem: #16 (The Gents) Team #8, #11, #15 Problem: #16 (The Gents) Teams #6, #17 Problem: #16 (The Gents) Problem: #18 (?) Problem: #18 (?) Teams #8, #11 Problem: #18 (?) Teams #6, #17 All the Problems in the Suite All the Problems in the Suite All the Problems in the Suite All the Problems in the Suite All the Problems in the Suite Some Unobserved Ideas • Where the convex hull approach fails due to concavity or holes, a “single hit” solution, which simply aims to hit a single grid point would be better. No one implemented this. • Another possibility for such shapes would have been to identify a better scoring convex shape than the convex hull. Some partial solutions to this seem to have been used by some. • A set of general shape solutions (e.g. V, X, U, O shapes) may have also been used to generate alternative algorithmic solutions. No one implemented this. • No team exploited the tie-breaker: • If everyone achieves a zero score for a shape, the points would be awarded to the teams with the least operations. • … in which case an empty list of instructions is the best solution The Results: Student Teams Team Score Ops The Results: Student Teams Team Score Ops Team #11: 450 15435 Team #7: FusRoHuhs 410 281 Team #2: DCoders 130 1136 The Results: Student Teams Team Score Ops Team #1: Abstergo 480 1012 Team #11: 450 15435 Team #7: FusRoHuhs 410 281 Team #2: DCoders 130 1136 The Results: Student Teams Team Score Ops Team #6: Programoids 550 314 Team #1: Abstergo 480 1012 Team #11: 450 15435 Team #7: FusRoHuhs 410 281 Team #2: DCoders 130 1136 The Results: Student Teams Team Score Ops Team #8: Team * 860 888 Team #6: Programoids 550 314 Team #1: Abstergo 480 1012 Team #11: 450 15435 Team #7: FusRoHuhs 410 281 Team #2: DCoders 130 1136 The Results: Student Teams Team Score Ops Team #8: Team * 860 888 Team #6: Programoids 550 314 Team #1: Abstergo 480 1012 Team #11: 450 15435 Team #7: FusRoHuhs 410 281 Team #2: DCoders 130 1136 Team #3, #5, #10, #14: No executable or batch file named origasmi. Team #4, #9, #12, #13: No submission. The Results: Industry Teams Team Score Ops The Results: Industry Teams Team Score Ops Team #15: Ixaris 1030 1689 Team #17: 6PMers 850 247 Team #16: CrimsonWing All crashed or timed out Combined Results Winner Team #8: Team * The Most Original Fold The Most Original Fold Team *’s Ugly Duckling Are All Solutions Really Possible? • Until 2002, it was thought that paper could only be folded a maximum of seven times, due to loss of paper in the folding process. • In 2002, a 17 year old high school student Britney Gallivan proved this belief wrong by successfully folding a single roll of toilet paper twelve times. • She used a 1200m long piece of toilet paper. The Problem of the Problem Problems… The password to decrypt the file with the judging problems is (final comma, grammatical, spelling mistakes but not quotes included): “Rajt ma rajtx, smajt ma smajtx, qal Duminku fuq l-ghatba ta nanntu,”