a propos pattern matcher: i intend to write one, too. but i'm still
thinking about what data structures to use to speed up search. would
you tell me, which ones you use and how many comparisons you need to
identify all patterns (out of a set of interesting ones) that are
on the board?
the question is also open for the rest of the group: does
anyone know about such 2 dimensional pattern matching algorithms
that need nearly as little as possible comparisons?
The tree approach others have mentioned seems like a good place to start.
It will use practically the minimum possible comparisons, but it may require
impossible amounts of space if you are unlucky.