Artifitial Intelligence Prolog Code