Skip to content

Commit

Permalink
Create looping-mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
mdehavensift committed Aug 24, 2023
1 parent ee93b76 commit f3adfb8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions shop3/looping-tasks/conditional-extensions.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
(unifier state) (unifier entry))
(decf (depth state)))

(defmethod expand-conditional-task ((domain looping-domain)
(defmethod expand-conditional-task ((domain looping-mixin)
ess-search-state)
(trace-print :loop domain ess-search-state "~%Expanding the conditional now...")
(with-slots (top-tasks tasks current-task
Expand Down Expand Up @@ -186,7 +186,7 @@
(setf reduction `(:ordered (:task !!inop))))
reduction))

(defmethod seek-plans-conditional ((domain looping-domain) task1 state tasks
(defmethod seek-plans-conditional ((domain looping-mixin) task1 state tasks
top-tasks partial-plan partial-plan-cost depth
which-plans protections
in-unifier)
Expand Down
9 changes: 6 additions & 3 deletions shop3/looping-tasks/exts-common.lisp
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
(in-package :shop)

(defclass looping-domain (domain)
()
(defclass looping-mixin ()
()
(:documentation "Mixin domain class for HTNs with LOOP tasks in them."))

(defclass looping-domain (looping-mixin domain)
())

(defmethod seek-plans-task ((domain looping-domain) task1 state tasks

(defmethod seek-plans-task ((domain looping-mixin) task1 state tasks
top-tasks
partial-plan
partial-plan-cost depth which-plans
Expand Down
4 changes: 2 additions & 2 deletions shop3/looping-tasks/loop-extensions.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
(unifier state) (unifier entry))
(decf (depth state)))

(defmethod unfold-loop-task ((domain looping-domain)
(defmethod unfold-loop-task ((domain looping-mixin)
ess-search-state)
(shop-trace "Unfolding now...~%")
(with-slots (top-tasks tasks current-task
Expand Down Expand Up @@ -306,7 +306,7 @@
;; RETURN
unfolded-loop))

(defmethod seek-plans-loop ((domain looping-domain) task1 state tasks
(defmethod seek-plans-loop ((domain looping-mixin) task1 state tasks
top-tasks partial-plan partial-plan-cost depth
which-plans protections
in-unifier)
Expand Down

0 comments on commit f3adfb8

Please sign in to comment.