Experience-dependent emergence of a grouping bias