Wulfie Reanimator Posted November 13, 2019 Share Posted November 13, 2019 (edited) Small disclaimer: This is a little group project I'm working on outside of SL. I think it's interesting enough to share. You're given a list of 1-26 Tetris pieces (aka Tetrimino). (Valid input is assumed.) We get the Tetriminoes from a text file, where a 4x4 grid contains one piece. Basically a string. This isn't important for an SL implementation, just context. What is the smallest "square" (holes allowed) that these Tetriminoes can fit in? Rotating the given pieces is not allowed. Each piece should be as close to the top and to the left as possible. For example (ordered A to H): ...# ...# ...# ...# .... .... .... #### .### ...# .... .... .... ..## .##. .... .... .##. .##. .... .... .... ##.. .##. ##.. .#.. .#.. .... .... ###. .#.. .... Results in: ABBBB. ACCCEE AFFCEE A.FFGG HHHDDG .HDD.G Additionally, we prioritize the order that the pieces appear in the input file, when the smallest solution allows it. For example: ...# ...# ...# ...# .... .... .##. .##. Results in: ABB. ABB. A... A... This is a very short and simplified version of the full project. I could add more specific requirements but LSL is what it is. Here's some reference solutions I created by hand for 26 pieces of the same type. I at least wasn't able to find a smaller solution for any of them. Edited November 13, 2019 by Wulfie Reanimator Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now