Skip to content

problem with recursion in axiom #74

Answered by rpgoldman
ko56 asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry I lost track of this and didn't answer...

Here's a working solution:

(defdomain simple
  (
    (:- (route ?x ?y)
      direct
      ((direct-connection ?x ?y))
      indirect
      ((direct-connection ?x ?z)
       (indirect-connection ?z ?y (?x))))

   ;; Is there a path from ?start to ?end that does not pass
   ;; through any of the nodes in ?disallowed
   (:- (indirect-connection ?start ?end ?disallowed)
       ((direct-connection ?start ?end))
       ((direct-connection ?start ?mid)
        (not (= ?mid ?end))
        (not
         (call member (quote ?mid) ?disallowed))
        (assign ?new-disallowed (cons '?mid ?disallowed))
        (indirect-connection ?mid ?end ?new-disallo…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@ko56
Comment options

ko56 Jul 1, 2021
Collaborator Author

@rpgoldman
Comment options

@ko56
Comment options

ko56 Jul 3, 2021
Collaborator Author

@rpgoldman
Comment options

@ko56
Comment options

ko56 Jul 3, 2021
Collaborator Author

Answer selected by ko56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants