diff --git a/__pycache__/particles.cpython-313.pyc b/__pycache__/particles.cpython-313.pyc index 4fd1865..aedfaad 100644 Binary files a/__pycache__/particles.cpython-313.pyc and b/__pycache__/particles.cpython-313.pyc differ diff --git a/__pycache__/reactor.cpython-313.pyc b/__pycache__/reactor.cpython-313.pyc index cb0f8e2..6a7c399 100644 Binary files a/__pycache__/reactor.cpython-313.pyc and b/__pycache__/reactor.cpython-313.pyc differ diff --git a/config.toml b/config.toml index 538c6d0..e64f846 100644 --- a/config.toml +++ b/config.toml @@ -1,7 +1,7 @@ # [调试] 将更改保存到文件 save = 1 # [调试] 覆写时间 -time_override = 10 +time_override = 11 # 对于每个项目的新记忆核子数量 tasked_number = 12 # 竖屏适配 diff --git a/main.py b/main.py index 5a832e1..6728422 100644 --- a/main.py +++ b/main.py @@ -12,7 +12,7 @@ import particles as pt from reactor import Reactor import auxiliary as aux -ver = '0.2.4' +ver = '0.2.6' config = aux.ConfigFile("config.toml") diff --git a/particles.py b/particles.py index d54e2d4..a089b3a 100644 --- a/particles.py +++ b/particles.py @@ -47,7 +47,7 @@ class Electron(): 'is_activated': self.is_activated } - def revisor(self, quality): + def revisor(self, quality: int = 5, is_new_activation: bool = False): """SM-2 算法迭代决策机制实现 根据 quality(0 ~ 5) 进行参数迭代最佳间隔 quality 由主程序评估 @@ -68,7 +68,11 @@ class Electron(): else: self.rept += 1 self.real_rept += 1 - + + if is_new_activation: # 初次激活 + self.rept = 0 + self.efactor = 2.5 + if self.rept == 0: # 刚被重置或初次激活后复习 self.interval = 1 # I(1) elif self.rept == 1: diff --git a/reactor.py b/reactor.py index 038045a..088def5 100644 --- a/reactor.py +++ b/reactor.py @@ -103,6 +103,9 @@ class Reactor(): self.electron_file.save() def report(self, atom, quality): + if atom in self.atoms_new: + atom[0].revisor(quality, True) + return 0 if atom[0] not in self.reported: atom[0].revisor(quality) self.reported.add(atom[0])