From 36944820370b5ff14518415d030e4407e57bc12a Mon Sep 17 00:00:00 2001 From: Patrick Hammer <patham9@gmail.com> Date: Mon, 9 Apr 2018 01:11:55 -0400 Subject: [PATCH] Attaching the sensation to the term --- .../nars/plugin/perception/VisionChannel.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/nars_core/nars/plugin/perception/VisionChannel.java b/nars_core/nars/plugin/perception/VisionChannel.java index 38ae416fc1..aa0a3b9426 100644 --- a/nars_core/nars/plugin/perception/VisionChannel.java +++ b/nars_core/nars/plugin/perception/VisionChannel.java @@ -18,6 +18,8 @@ public class VisionChannel extends SensoryChannel { int cnt_updated = 0; int height = 0; int width = 0; + int px = 0; + int py = 0; Term label; NAR nar; public VisionChannel(Term label, NAR nar, SensoryChannel reportResultsTo, int width, int height) { @@ -66,7 +68,19 @@ public class VisionChannel extends SensoryChannel { public void step_start() { termid++; - Sentence s = new Sentence(Inheritance.make(new Term(subj+termid), this.label), + Term V = new Term(subj+termid); + //the visual space has to be a copy. + float[][] cpy = new float[height][width]; + for(int i=0;i<height;i++) { + for(int j=0;j<width;j++) { + cpy[height][width] = cpy[height][width]; + } + } + VisualSpace vspace = new VisualSpace(nar, cpy, py, px, height, width); + //attach sensation to term: + V.imagination = vspace; + + Sentence s = new Sentence(Inheritance.make(V, this.label), Symbols.JUDGMENT_MARK, new TruthValue(1.0f, Parameters.DEFAULT_JUDGMENT_CONFIDENCE), @@ -77,5 +91,4 @@ public class VisionChannel extends SensoryChannel { this.results.add(T);//feeds results into "upper" sensory channels: this.step_finished(); } - } -- GitLab