User blog comment:DWither/Doubt about busy beaver/@comment-30869823-20180904192714

The problem with "checking for loops" is that it is actually impossible to determine if a given program halts, this is called the halting problem. A simple proof by contradiction is:

Suppose there is a program H which could always check if a given program halts and outputs True if it does and false if it doesn't.

Now define P to be a program which doesn't halt if it is predicted to halt (using H) like:

def P: while not H(P): pass

P halts if it doens't halt, this is a contradiction so our assumption "there is a program H which could always check if a given program halts" is false.