Dr. C. informs me that, in technical terminology, Hal became trapped in a Hofstadter–Moebius loop, a situation apparently not uncommon among advanced computers with autonomous goal-seeking programs. He suggests that for further information you contact Professor Hofstadter himself.