Pattern Matcher for AI course