Balancing exploration with exploitation