An oligopoly model with rational and imitation rules