From ccf5092116ef0c2ad4d85d7dce3374bda65513a6 Mon Sep 17 00:00:00 2001 From: SengokuCola <1026294844@qq.com> Date: Sun, 15 Jun 2025 19:28:54 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E5=85=B3?= =?UTF-8?q?=E7=B3=BB=E7=82=B8=E8=A3=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chat/normal_chat/normal_chat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chat/normal_chat/normal_chat.py b/src/chat/normal_chat/normal_chat.py index bfe59e4df..0ae9385f0 100644 --- a/src/chat/normal_chat/normal_chat.py +++ b/src/chat/normal_chat/normal_chat.py @@ -851,7 +851,7 @@ class NormalChat: reply_ratio = reply_count / total_messages if total_messages > 0 else 0 # 使用对数函数让低比率时概率上升更快:log(1 + ratio * k) / log(1 + k) + base # k=7时,0.05比率对应约0.4概率,0.1比率对应约0.6概率,0.2比率对应约0.8概率 - k_reply = 7 * global_config.normal_chat.relation_frequency + k_reply = 7 * global_config.relationship.relation_frequency base_reply_prob = 0.1 # 基础概率10% reply_build_probability = ( (math.log(1 + reply_ratio * k_reply) / math.log(1 + k_reply)) * 0.9 + base_reply_prob @@ -862,7 +862,7 @@ class NormalChat: # 计算接收概率(receive_count的影响) receive_ratio = receive_count / total_messages if total_messages > 0 else 0 # 接收概率使用更温和的对数曲线,最大0.5,基础0.08 - k_receive = 6 * global_config.normal_chat.relation_frequency + k_receive = 6 * global_config.relationship.relation_frequency base_receive_prob = 0.08 # 基础概率8% receive_build_probability = ( (math.log(1 + receive_ratio * k_receive) / math.log(1 + k_receive)) * 0.42 + base_receive_prob