In recent years, government bodies in technologically advanced countries increasingly rely on artificial intelligence and machine learning algorithms to form and implement public policies. These new technologies pose a serious threat to core principles of public administration, such as transparency and reason-giving. This paper explores the potential role of the judiciary in mitigating the accountability deficit created by the governmental use of algorithmic decision making. It discusses the challenges that courts face when they review automated or semi-automated governmental decisions, and examines the methods and strategies that courts can employ to address these challenges. Finally, the paper discusses the implications of these judicial strategies for both administrative and judicial legitimacy.