patterns learning