v0.2.5 修复初次激活相关问题
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
# [调试] 将更改保存到文件
|
# [调试] 将更改保存到文件
|
||||||
save = 1
|
save = 1
|
||||||
# [调试] 覆写时间
|
# [调试] 覆写时间
|
||||||
time_override = 10
|
time_override = 11
|
||||||
# 对于每个项目的新记忆核子数量
|
# 对于每个项目的新记忆核子数量
|
||||||
tasked_number = 12
|
tasked_number = 12
|
||||||
# 竖屏适配
|
# 竖屏适配
|
||||||
|
2
main.py
2
main.py
@@ -12,7 +12,7 @@ import particles as pt
|
|||||||
from reactor import Reactor
|
from reactor import Reactor
|
||||||
import auxiliary as aux
|
import auxiliary as aux
|
||||||
|
|
||||||
ver = '0.2.4'
|
ver = '0.2.6'
|
||||||
|
|
||||||
config = aux.ConfigFile("config.toml")
|
config = aux.ConfigFile("config.toml")
|
||||||
|
|
||||||
|
@@ -47,7 +47,7 @@ class Electron():
|
|||||||
'is_activated': self.is_activated
|
'is_activated': self.is_activated
|
||||||
}
|
}
|
||||||
|
|
||||||
def revisor(self, quality):
|
def revisor(self, quality: int = 5, is_new_activation: bool = False):
|
||||||
"""SM-2 算法迭代决策机制实现
|
"""SM-2 算法迭代决策机制实现
|
||||||
根据 quality(0 ~ 5) 进行参数迭代最佳间隔
|
根据 quality(0 ~ 5) 进行参数迭代最佳间隔
|
||||||
quality 由主程序评估
|
quality 由主程序评估
|
||||||
@@ -68,7 +68,11 @@ class Electron():
|
|||||||
else:
|
else:
|
||||||
self.rept += 1
|
self.rept += 1
|
||||||
self.real_rept += 1
|
self.real_rept += 1
|
||||||
|
|
||||||
|
if is_new_activation: # 初次激活
|
||||||
|
self.rept = 0
|
||||||
|
self.efactor = 2.5
|
||||||
|
|
||||||
if self.rept == 0: # 刚被重置或初次激活后复习
|
if self.rept == 0: # 刚被重置或初次激活后复习
|
||||||
self.interval = 1 # I(1)
|
self.interval = 1 # I(1)
|
||||||
elif self.rept == 1:
|
elif self.rept == 1:
|
||||||
|
@@ -103,6 +103,9 @@ class Reactor():
|
|||||||
self.electron_file.save()
|
self.electron_file.save()
|
||||||
|
|
||||||
def report(self, atom, quality):
|
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:
|
if atom[0] not in self.reported:
|
||||||
atom[0].revisor(quality)
|
atom[0].revisor(quality)
|
||||||
self.reported.add(atom[0])
|
self.reported.add(atom[0])
|
||||||
|
Reference in New Issue
Block a user