Every few seconds they roll an AI/20 chance of moving. So if their AI level is at 3 (like in night 1) they only have a 3/20 chance of attacking you every few seconds.