Fewest room changes first, then shortest walks. Starts from the building you're in.
Pick a room on the board — Freiraum then counts down to the lecture that will evict you and lines up your next room.