Intelligent decision-making at T-junctions