Pseudocode for various control algorithms.