Artificial intelligence that understands object relationships