The Facebook CEO built artificial intelligence software to dim his lights and see who’s at the door. He even tried using it to help him get dressed.