3 ms·
For starters, the "solution" here doesn't ensure that the ending piece meets the starting piece in the right direction. :p
by lightbendover 3y ago
For starters, the "solution" here doesn't ensure that the ending piece meets the starting piece in the right direction. :p
- tylerneylon 3y agoOk, a snarky way to phrase things, but it's a good point - in general the vectors could add to zero and the angles may not align. So perhaps a better expression may be a metric for tension = [ norm(sum(piece_vectors)) + abs(angle_displacement) ] / n where angle_displacement = sum(angles) - 360 and the angles are signed accordingly.
- themeiguoren 3y agoCounterexample: a dozen (+1, 0) tiles followed by a dozen (-1, 0) tiles. Vector sum is fine, total angle is fine, but at each end you have an impossible 180 deg connection. I don’t think you can get away from local measures of tension with a global look.