mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 17:57:01 +08:00
opt.提高基建技能识别准确率
This commit is contained in:
@@ -345,6 +345,7 @@ void asst::InfrastOperImageAnalyzer::skill_analyze()
|
||||
[](const auto& lhs, const auto& rhs) -> bool {
|
||||
return lhs.second.score < rhs.second.score;
|
||||
});
|
||||
double base_score = max_iter->second.score;
|
||||
std::string base_id = max_iter->first.id;
|
||||
size_t level_pos = 0;
|
||||
// 倒着找,第一个不是数字的。前面就是技能基础id名字,后面的数字就是技能等级
|
||||
@@ -356,9 +357,13 @@ void asst::InfrastOperImageAnalyzer::skill_analyze()
|
||||
}
|
||||
base_id = base_id.substr(0, level_pos);
|
||||
std::string max_level;
|
||||
for (const auto& [skill, _] : possible_skills) {
|
||||
for (const auto& [skill, skill_mr] : possible_skills) {
|
||||
if (size_t find_pos = skill.id.find(base_id);
|
||||
find_pos != std::string::npos) {
|
||||
// 得分差距过大的,直接忽略
|
||||
if (base_score - skill_mr.score > 0.5) {
|
||||
continue;
|
||||
}
|
||||
std::string cur_skill_level = skill.id.substr(base_id.size());
|
||||
if (max_level.empty() || cur_skill_level > max_level) {
|
||||
max_level = cur_skill_level;
|
||||
|
||||
Reference in New Issue
Block a user