From 87def8d8258e25aca44551481536242f22b1666f Mon Sep 17 00:00:00 2001 From: Calcitem Date: Sun, 12 Sep 2021 23:27:34 +0800 Subject: [PATCH] settings: Change max value of skill level from 20 to 30 The reason to raise this maximum is because for the following game. 1. f4 d2 2. b4 d6 3. d1 d5 4. d7 c4 5. g1 a1 6. g4 e4 7. g7xe4 e4 8. a7xe4 e4 9. d3 a4 10. d3-c3 d5-e5 11. c3-d3 e5-d5 12. d3-e3 c4-c5 13. f4-f2 e4-f4 14. b4-c4 d5-e5 15. e3-e4 c5-d5 16. c4-c5 d2-b2 17. d1-d2 a1-d1 18. d2-d3 b2-b4 (bad move 39. Should be a4-b4) Set skill level to 24 and set thinking time to 0 (means infinite) can do the right move. --- src/mills.cpp | 2 +- src/ucioption.cpp | 2 +- src/ui/flutter_app/lib/widgets/game_page.dart | 2 +- src/ui/flutter_app/lib/widgets/game_settings_page.dart | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mills.cpp b/src/mills.cpp index 2c0a80d2..865f1736 100644 --- a/src/mills.cpp +++ b/src/mills.cpp @@ -628,7 +628,7 @@ Depth get_search_depth(const Position *pos) } // Do not too weak - if (depthLimit == 20 && d <= 4) { // TODO + if (depthLimit == 30 && d <= 4) { // TODO d = 4; } #endif diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 6ad4564b..a422cceb 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -180,7 +180,7 @@ void init(OptionsMap &o) o["Clear Hash"] << Option(on_clear_hash); o["Ponder"] << Option(false); o["MultiPV"] << Option(1, 1, 500); - o["SkillLevel"] << Option(1, 0, 20, on_skill_level); + o["SkillLevel"] << Option(1, 0, 30, on_skill_level); o["MoveTime"] << Option(1, 0, 60, on_move_time); o["AiIsLazy"] << Option(false, on_aiIsLazy); o["Move Overhead"] << Option(10, 0, 5000); diff --git a/src/ui/flutter_app/lib/widgets/game_page.dart b/src/ui/flutter_app/lib/widgets/game_page.dart index d07303b3..38f60ba1 100644 --- a/src/ui/flutter_app/lib/widgets/game_page.dart +++ b/src/ui/flutter_app/lib/widgets/game_page.dart @@ -1282,7 +1282,7 @@ class _GamePageState extends State return; } - bool isTopLevel = (Config.skillLevel == 20); // TODO: 20 + bool isTopLevel = (Config.skillLevel == 30); // TODO: 30 if (result == GameResult.win && !isTopLevel && diff --git a/src/ui/flutter_app/lib/widgets/game_settings_page.dart b/src/ui/flutter_app/lib/widgets/game_settings_page.dart index 05fb3cca..86dac2d3 100644 --- a/src/ui/flutter_app/lib/widgets/game_settings_page.dart +++ b/src/ui/flutter_app/lib/widgets/game_settings_page.dart @@ -69,8 +69,8 @@ class _GameSettingsPageState extends State { child: Slider( value: Config.skillLevel.toDouble(), min: 1, - max: 20, - divisions: 19, + max: 30, + divisions: 29, label: Config.skillLevel.round().toString(), onChanged: (value) { setState(() {