This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [tasks (:priority-index (:tasks @state)) | |
projected-beliefs (map #(project-eternalize-to (:occurrence task) (:id %) @nars-time) | |
(filter #(and (= (:statement (:id %)) (:id @state)) | |
(= (:task-type (:id %)) :belief)) tasks))] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(conclusions "<(*,{SELF}) --> op_down>. :|50|:" | |
"<a --> b>. :|10|:") | |
=> | |
#{{:statement [pred-impl [seq-conj [--> a b] [:interval 32]] [--> [* [ext-set SELF]] op_down]], | |
:task-type :belief, | |
:occurrence 50, | |
:truth [1.0 0.44751381215469616]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(filter | |
(fn [z] (and (not= (second z) nil) | |
(= ((second z) '?goal) (:statement goal)) | |
(operation? ((second z) '?operation)))) | |
(for [form precondition-op-forms] | |
(for [belief (for [b beliefs] | |
(project-eternalize-to @nars-time b @nars-time))] | |
[belief (unify form (:statement belief))]))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading src/examples/pong.clj... done | |
rand action | |
operator selector sending to task-creator [1.0 0.3336384439359268] | |
system decided up | |
rand action | |
system decided up | |
rand action | |
operator selector sending to task-creator [1.0 0.0891330684000754] | |
system decided up | |
rand action |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn project-eternalize-to2 | |
[target-time t cur-time reason] | |
(println "sass") | |
(if (= nil t) | |
nil | |
(do (println "lol") (let [source-time (:occurrence t) | |
get-eternal (fn [x] (if (= x :eternal) :eternal :temporal))] | |
(case [(get-eternal target-time) (get-eternal source-time)] | |
[:eternal :eternal] t | |
[:temporal :eternal] t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(project-to 1 {:statement '[--> ballpos [int-set above]], :evidence '(2 1 0), :source :derived, :task-type :belief, :budget [0.3055 0.0 0.1973], :sc 4, :truth [1.0 0.9152542372881356], :depth 1, :solution nil, :occurrence 0} 1) | |
=> | |
{:statement [--> ballpos [int-set above]], | |
:evidence (2 1 0), | |
:source :derived, | |
:task-type :belief, | |
:budget [0.3055 0.0 0.1973], | |
:sc 4, | |
:truth [1.0 0.0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
above below truth[[1.0 0.48322147651006714] [1.0 0.48711340206185566]] | |
rewarded belief<(&&,<ballpos --> [above]>,(&/,<(*,{SELF}) --> op_down>,i32)) =/> <ballpos --> [equal]>> [1.0 0.047958952623607075] | |
rewarded belief<(&&,<ballpos --> [above]>,(&/,<(*,{SELF}) --> op_down>,i32)) =/> <ballpos --> [equal]>> [1.0 0.047958952623607075] | |
above below truth[[1.0 0.48322147651006714] [1.0 0.48711340206185566]] | |
rewarded belief<(&&,<ballpos --> [above]>,(&/,<(*,{SELF}) --> op_down>,i32)) =/> <ballpos --> [equal]>> [1.0 0.047958952623607075] | |
rewarded belief<(&&,<ballpos --> [above]>,(&/,<(*,{SELF}) --> op_down>,i32)) =/> <ballpos --> [equal]>> [1.0 0.047958952623607075] | |
above below truth[[1.0 0.48322147651006714] [1.0 0.48711340206185566]] | |
above below truth[[1.0 0.48322147651006714] [1.0 0.48711340206185566]] | |
rewarded belief<(&&,<ballpos --> [above]>,(&/,<(*,{SELF}) --> op_down>,i32)) =/> <ballpos --> [equal]>> [1.0 0.047958952623607075] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [same-content-beliefs (filter (fn [z] (and (same-occurrence-type z task) | |
(= (:statement z) (:statement task)))) beliefs) | |
total-revision (reduce (fn [a b] (if (non-overlapping-evidence? (:evidence a) (:evidence b)) | |
(revise a (project-eternalize-to (:occurrence a) b @nars-time) :belief) | |
a)) | |
task (shuffle same-content-beliefs))] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn lense-max-statement-confidence-projected-to-now [concept-term task-type] | |
(apply max-key | |
(fn [y] | |
(second (:truth | |
(project-eternalize-to | |
@nars-time | |
(:task (second y)) | |
@nars-time)))) | |
(filter (fn [z] (and (= (:task-type (:task (second z))) task-type) | |
(= (:statement (:task (second z))) concept-term))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(:truth (apply max-key | |
(fn [y] | |
(second (:truth | |
(:task (second y))))) | |
'([[a :belief :eternal] | |
{:id [a :belief :eternal], | |
:priority 0.5, | |
:task {:statement a, | |
:terms (a), | |
:evidence (0), |