Anyway, because I can never quite manage to half-ass something, I'm toying with the notion of going full tilt bozo on this back-into-Magic crap and actually doing something I swore to myself that I would learn how to do years ago. (This thing I don't want to name yet is part of the original impetus for me to start learning Perl in earnest, so I guess it's only fair that I have descended back to attempt to solve the problem again.)
Okay, I'll shut up about all this meta-whining and get to the whining. The form that Magic card text takes is now standardized, meaning that there are often-repeated structures, there are singular structures that can be extrapolated from smaller structures, etc. (There's a term for a system like this, but it escapes me at the moment.) What I wanted to attempt was to write a parser that would attempt to locate extremely powerful/efficient cards and automatically filter out the weaklings. The hope of this is that -- with a filtered list of the most powerful cards -- an expert system could be written that you feed characteristics and cardlists into and it produces a prototype deck.
This shouldn't be impossible, honestly. Provided with a list of powerful cards that can do X, Y, and Z in any combination, and with the rules about how X, Y, and Z affect win conditions, it should be possible to write an expert system that produces decks from cardlists.
The problems that crop up are the kinds of problems that make a person's mind think back to a Dirty Harry quote: "A man's got to know his limitations." Which is to say that I'm nowhere near experienced enough to write the code necessary for something like this. First, I have to write an expert system, and that's in the "no damn clue" category. I barely know what they do.
Second, I'd have to figure out how to build lexical parsers, and while I have a vague notion of what a lexical parser is, I don't have a faint clue how to write one.
I'm seriously considering posting at perlmonks and seeing if anybody there can assist me with either the lexical analysis part of this or the expert system portion. That, or see if I can somehow learn enough all on my own to do this.
Again, though -- this isn't for school, this isn't for work, and this isn't for anything but my twisted, twisted M:TG needs. It has sub-zero priority, but it holds my interest.