Skip to content

Commit

Permalink
before flight commit
Browse files Browse the repository at this point in the history
  • Loading branch information
patham9 committed Jul 15, 2016
1 parent 4a0c6d5 commit 3756656
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/narjure/memory_management/concept.clj
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@
(when (pos? (b/count-elements task-bag))
(let [[el] (b/lookup-by-index task-bag (selection-fn (b/count-elements task-bag)))]
(debuglogger search display ["selected inference task:" el])
(when-let [c-ref (select-termlink-ref)]
(when-let [[c-id c-ref] (select-termlink-ref)]
(try ;update termlinks at first
(update-termlink c-id) ;task concept here
(catch Exception e (debuglogger search display (str "task side termlink strength error " (.toString e)))))
(cast! c-ref [:belief-request-msg [(:id @state) (:task el)]])))))))

(defn termlink-strengthen-handler
Expand Down
2 changes: 1 addition & 1 deletion src/narjure/memory_management/termlink_utils.clj
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,5 @@
(if (and resbag (pos? (b/count-elements resbag)))
(let [[beliefconcept _] (b/get-by-index resbag (selection-fn (b/count-elements resbag)))]
#_(forget-termlink (:id beliefconcept)) ;apply forgetting for termlinks only on selection
(get-ref-from-term (:id beliefconcept)))
[(:id beliefconcept) (get-ref-from-term (:id beliefconcept))])
nil)))

0 comments on commit 3756656

Please sign in to comment.