From 98ab0508a8c4f7a5ce8ad6ab31a67d7da34522cc Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 9 Oct 2025 15:56:23 +0300 Subject: [PATCH 1/3] Initial commit with task details for issue #1 Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: https://github.com/aigents/aigents-java/issues/1 --- CLAUDE.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..82a343f --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,7 @@ +Issue to solve: https://github.com/aigents/aigents-java/issues/1 +Your prepared branch: issue-1-a9dab963 +Your prepared working directory: /tmp/gh-issue-solver-1760014563644 +Your forked repository: konard/aigents-java +Original repository (upstream): aigents/aigents-java + +Proceed. \ No newline at end of file From c84936d66a59cf8f3cd345eac9bd1c85437c6a19 Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 9 Oct 2025 16:01:10 +0300 Subject: [PATCH 2/3] Fix predictiveness and rating values being incorrectly rounded to integers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The reputation system was incorrectly rounding predictiveness values (which should be in the range 0.0-1.0) to integers, causing them to be rounded up to 1.0 or down to 0. Changes: 1. Counter.count(Linker): Modified to preserve double/float values instead of rounding them to integers. Now only rounds integer-like types (Integer, Long, Short). 2. Reputationer.java line 472: Removed unnecessary Math.round() call when computing differential ratings from ComplexNumber values. This ensures that predictiveness scores and other fractional reputation values are stored and processed with their full precision, allowing for more accurate reputation calculations and proper blending of scores. Fixes #1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/main/java/net/webstructor/data/Counter.java | 8 +++++++- src/main/java/net/webstructor/peer/Reputationer.java | 3 +-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/webstructor/data/Counter.java b/src/main/java/net/webstructor/data/Counter.java index a1d64de..c63c1b1 100644 --- a/src/main/java/net/webstructor/data/Counter.java +++ b/src/main/java/net/webstructor/data/Counter.java @@ -103,7 +103,13 @@ public Linker count(Linker other){ if (other != null) for (Iterator it = other.keys().iterator(); it.hasNext();){ Object key = it.next(); - count(key,round(other.value(key))); + Number value = other.value(key); + // Preserve double values for reputation scores (like predictiveness in range 0.0-1.0) + // Only round integer-like values + if (value instanceof Double || value instanceof Float) + count(key, value.doubleValue()); + else + count(key, round(value)); } return this; } diff --git a/src/main/java/net/webstructor/peer/Reputationer.java b/src/main/java/net/webstructor/peer/Reputationer.java index f1064fe..2d35c57 100644 --- a/src/main/java/net/webstructor/peer/Reputationer.java +++ b/src/main/java/net/webstructor/peer/Reputationer.java @@ -469,8 +469,7 @@ private int build(Date prevdate, Date nextdate, String[] domains){ sum += r[0]; den += r.length > 1 ? r[1] : 1; if (params.verbose) env.debug("reputation debug rating: "+rater+" "+ratee+" "+c[j].a+" "+c[j].b+" "+r[0]); - differential.count(ratee, raterValue * Math.round(r[0]), 0);//TODO: no round!? -// differential.count(ratee, Math.round(raterValue * r[0]), 0);//TODO: no round!? + differential.count(ratee, raterValue * r[0], 0); if (params.denomination && r.length > 1) normalizer.count(ratee, r[1], 0); if (params.spendings > 0 && r.length > 1) From cf62803eb68996c2a7f9f68f40fa3367d8238e82 Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 9 Oct 2025 16:02:59 +0300 Subject: [PATCH 3/3] Remove CLAUDE.md - Claude command completed --- CLAUDE.md | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 82a343f..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,7 +0,0 @@ -Issue to solve: https://github.com/aigents/aigents-java/issues/1 -Your prepared branch: issue-1-a9dab963 -Your prepared working directory: /tmp/gh-issue-solver-1760014563644 -Your forked repository: konard/aigents-java -Original repository (upstream): aigents/aigents-java - -Proceed. \ No newline at end of file