实装自动评分系统

This commit is contained in:
2025-08-06 06:46:30 +08:00
parent edf2f0868a
commit 6d3d2e665c
5 changed files with 20 additions and 294 deletions

View File

@@ -124,9 +124,8 @@ class Recognition(Composition):
def handler(self, event, type_):
if type_ == "button":
if event.button.id == self.getid("ok"):
self.reactor.report(self.atom, 5)
return 0
if type_ == 1:
pass
return -1
@@ -201,9 +200,11 @@ class FillBlank(Composition):
return 1
else:
if self.inputlist == self.puzzle.answer:
self.reactor.report(self.atom, 4)
return 0
else:
self.inputlist = []
self.reactor.report(self.atom, 2)
return 1
@@ -240,9 +241,11 @@ class DrawCard(Composition):
return 1
else:
if self.inputlist == self.puzzle.answer:
self.reactor.report(self.atom, 4)
return 0
else:
self.inputlist = []
self.reactor.report(self.atom, 2)
return 1

View File

@@ -1,9 +1,9 @@
# [调试] 将更改保存到文件
save = 1
# [调试] 覆写时间
time_override = 1
time_override = -1
# [调试] 一键通过
quick_pass = 1
quick_pass = 0
# 对于每个项目的新记忆核子数量
tasked_number = 8

View File

@@ -1,279 +0,0 @@
["臣/密/言: /臣/以/险衅/, 夙/遭/闵凶./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 1
last_modify = 1754432851.3210478
["生孩/六月/, 慈父/见背/; /行年/四岁/, 舅/夺/母志./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 1
last_modify = 1754432851.321053
["祖母/刘/愍/臣/孤弱/, 躬亲/抚养./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 1
last_modify = 1754432851.3210552
["臣/少/多/疾病/, 九岁/不行/, 零丁/孤苦/, 至于/成立./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 1
last_modify = 1754432851.3210573
["既/无/伯叔/, 终/鲜/兄弟/, 门/衰/祚/薄/, 晚/有/儿息./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 1
last_modify = 1754432851.3210585
["外/无/期功/强近/之亲/, 内/无/应门/五尺/之僮/, 茕茕/孑立/, 形影/相吊./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 1
last_modify = 1754432851.3210602
["而/刘/夙/婴/疾病/, 常/在/床蓐/, 臣/侍/汤药/, 未曾/废离./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 1
last_modify = 1754432851.3210614
["逮/奉/圣朝/, 沐浴/清化./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 1
last_modify = 1754432851.3210626
["前/太守/臣/逵/察/臣/孝廉/; /后/刺史/臣/荣/举/臣/秀才./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.3210633
["臣/以/供养/无主/, 辞/不赴命./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.321065
["诏书/特下/, 拜/臣/郎中/, 寻/蒙/国恩/, 除/臣/洗马./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.3210661
["猥/以/微贱/, 当/侍/东宫/, 非/臣/陨首/所能/上报./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.3210678
["臣/具/以表/闻/, 辞/不就职./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.3210688
["诏书/切峻/, 责/臣/逋慢/; /郡县/逼迫/, 催/臣/上道/; /州司/临门/, 急于/星火./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.3210697
["臣/欲/奉诏/奔驰/, 则/刘/病/日笃/, 欲/苟/顺/私情/, 则/告诉/不许./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.3210707
["臣/之/进退/, 实为/狼狈./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.3210716
["伏惟/圣朝/以/孝/治/天下/, 凡/在/故老/, 犹/蒙/矜育/, 况/臣/孤苦/, 特为/尤甚./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.3210728
["且/臣/少/仕/伪朝/, 历职/郎署/, 本图/宦达/, 不矜/名节./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.321074
["今/臣/亡国/贱俘/, 至微/至陋/, 过/蒙/拔擢/, 宠命/优渥/, 岂敢/盘桓/, 有所/希冀!/"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.3210752
["但/以/刘/日薄/西山/, 气息/奄奄/, 人命/危浅/, 朝不/虑夕./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.321079
["臣/无/祖母/, 无以/至今日/, 祖母/无/臣/, 无以/终余年./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.32108
["母孙/二人/, 更相/为命/, 是以/区区/不能/废远./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.3210814
["臣/密/今年/四十/有四/, 祖母/今年/九十/有六/, 是/臣/尽节/于/陛下/之日/长/, 报养/刘/之日/短./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.3210826
["乌鸟/私情/, 愿/乞/终养./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.3210835
["臣/之/辛苦/, 非独/蜀之/人士/及/二州/牧伯/所见/明知/, 皇天/后土/, 实所/共鉴./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.321085
["愿/陛下/矜悯/愚诚/, 听/臣/微志/, 庶/刘/侥幸/, 保/卒/余年./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.321086
["臣/生/当/陨首/, 死/当/结草./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.321087
["臣/不胜/犬马/怖惧/之情/, 谨/拜表/以闻./"]
efactor = 2.5
real_rept = 0
rept = 0
interval = 0
last_date = 0
next_date = 0
is_activated = 0
last_modify = 1754432851.3210886

View File

@@ -118,6 +118,7 @@ class MemScreen(Screen):
self.call_later(self.recompose)
def report(self, quality):
print(f"reported: {quality}")
assessment = self.reactor.report(self.reactor.current_atom, quality)
return assessment
@@ -139,6 +140,7 @@ class MemScreen(Screen):
threading.Thread(target=play).start()
def action_quick_pass(self):
self.report(5)
self._forward_judge(0)
def action_toggle_dark(self):
self.app.action_toggle_dark()

View File

@@ -108,14 +108,14 @@ class SelectionPuzzle(Puzzle):
def __str__(self):
return f"{self.wording}\n正确答案: {', '.join(self.answer)}"
puz = SelectionPuzzle(
{"1+1": "2", "1+2": "3", "1+3": "4"},
["2", "5", "0"],
3,
'求值: '
)
puz.refresh()
print(puz.wording)
print(puz.answer)
print(puz.options)
if __name__ == "__main__":
puz = SelectionPuzzle(
{"1+1": "2", "1+2": "3", "1+3": "4"},
["2", "5", "0"],
3,
'求值: '
)
puz.refresh()
print(puz.wording)
print(puz.answer)
print(puz.options)