memory: add Memory.window_patterns(), to simplify decoders.