Retrieving rules for behavior from long-term memory