dimar has asked for the wisdom of the Perl Monks concerning the following question:

The Question

What is a good way to output polyomino shapes in simple ascii (and in HTML tables, later on) using Perl?

The Goal

I would like to provide a smallish integer (~ 10) to my script, and have it spit out all the possible polyominos that correspond to that integer in ascii. "Mastering Algorithms with Perl" gives some ideas, so the question is whats the best way to begin to approach this, directed graphs? matrices? seems like there's many ways to do this, any suggestions?

The Background

If you dont already know, polyominos are those little regular shapes that you see in games like "Tetris" and its numerous clones (you remember that?) I've seen lots of JAVA code and mathematical treatments of this subject, but have not seen any Perl (my preferred platform for polyomino pursuits).

  • Comment on Proliferating Pretty Polyominos with the Power of Perl

Replies are listed 'Best First'.
Re: Proliferating Pretty Polyominos with the Power of Perl
by Enlil (Parson) on May 20, 2004 at 07:25 UTC

      Ok, this is getting irritating, perhaps I should rephrase the question: "How can I do better searches to find questions that have already been asked using different terminology"? Oh well, thanks for the info anyway, exactly the kind of thing i was looking for.

Re: Proliferating Pretty Polyominos with the Power of Perl
by halley (Prior) on May 20, 2004 at 13:42 UTC

      Yes. Your page came up in a search using my new-found arsenal of Concept-Equivalent Synonym Keywords(TM) from the first response. What an amazing feat! There are many many many 'neat ideas' in there (a pitiful understatement of one who sees but a mere glimpse, to be sure).

      though it may take a little work to see how, at first.

      I'll say. It is eerily reminiscent of Gödel, Escher, Bach: An Eternal Golden Braid. by Douglas R. Hofstadter -- many levels of meaning and creativity all bundled into quite an impressive and noteworthy accomplishment. So, *applause*.

      Respectfully submitted