From d424b9ae4d84a1828b259e1b413688c48ca0051e Mon Sep 17 00:00:00 2001
From: Patrick Hammer <patham9@gmail.com>
Date: Mon, 9 Apr 2018 14:43:00 -0400
Subject: [PATCH] use average if more than 1 statements fall on the same
 position.

---
 nars_core/nars/plugin/perception/VisionChannel.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/nars_core/nars/plugin/perception/VisionChannel.java b/nars_core/nars/plugin/perception/VisionChannel.java
index aa317564fd..48dbfc5de7 100644
--- a/nars_core/nars/plugin/perception/VisionChannel.java
+++ b/nars_core/nars/plugin/perception/VisionChannel.java
@@ -41,10 +41,13 @@ public class VisionChannel extends SensoryChannel {
         }
         int x = t.getTerm().term_indices[2];
         int y = t.getTerm().term_indices[3];
-        inputs[y][x] = t.sentence.getTruth().getFrequency();
         if(!updated[y][x]) {
+            inputs[y][x] = t.sentence.getTruth().getFrequency();
             cnt_updated++;
             updated[y][x] = true;
+        } else { //a second value, so take average of frequencies
+                 //revision wouldn't be proper as each sensory point can just have 1 vote
+            inputs[y][x] = (inputs[y][x]+t.sentence.getTruth().getFrequency()) / 2.0f;
         }
         if(cnt_updated == height*width) {
             cnt_updated = 0;
-- 
GitLab