MIT Mystery Hunt 2020/Hackin' The Beanstalk

Hackin' The Beanstalk is an interactive puzzle from the round of the 2020 MIT Mystery Hunt, presented as a computer terminal.

Puzzle Elements

 * Interactive - The puzzle is presented as a computer terminal—it prints a number of initialization messages (such as "Finding the best way through the woods...") before prompting the solver for input with a blinking cursor.


 * Technology - The various snippets of Python code obtained from the terminal can be assembled into implementations of eleven algorithms named after computer scientists, each of which solves one of the problems referenced in the initialization messages. For example, DIJKSTRA's algorithm corresponds to "Finding the best way through the woods..." As it turns out, the keys corresponding to the code snippets used in any given algorithm spells the eponym of that algorithm, and typing out that name in the terminal yields the whole algorithm.


 * Error Correction - The algorithm you are given, however, has a single mistake. The Dijkstra implementation, for example, has, where the   should be a   to properly locate the closest unvisited node.


 * Marked Elements - The error is localized to a single keypress in the terminal, which provides a letter to be extracted. The final answer can be obtained by ordering these letters using the message printed at the beginning.