Sanmill icon indicating copy to clipboard operation
Sanmill copied to clipboard

Iteration Plan for Q3 2022

Open calcitem opened this issue 3 years ago β€’ 10 comments

Iteration Plan for Q3 2022

This plan captures our work in Q3. This is a 3-month iteration. We will ship in early Oct.

Below is a summary of the top level plan items.

Legend of annotations:

Mark Description πŸƒ work in progress βœ‹ blocked task πŸ’ͺ stretch goal for this iteration πŸ”΄ missing issue reference πŸ”΅ more investigation required to remove uncertainty ⚫ under discussion within the team ⬛ a large work item, larger than one iteration

Flutter

Game

  • [x] Fix cannot show Game started. when starting a new game.
  • [x] When AI move first, cannot play the game.
  • [x] Score is reset when start new game.
  • [x] The icon in the middle of the Header is not displayed correctly.
  • [x] AI Vs AI mode, isAutoRestart in on, when a game is end, send to engine again and again and no stop.
  • [x] AI Vs AI mode, sometimes hang.
  • [x] AI Vs AI mode, cannot show every action, so fast.
  • [x] The difficulty increases. When the AI is thinking, it switches to the rule setting. After switching back, there will still be a piece on the board.
  • [x] In the case of adding a slash, when the I closes mill, the piece of the oppenent cannot be removed.
  • [x] Difficulty settings sometimes doen't work.
  • [x] Implement _moveNow()
  • [x] Fix click on First move -> Human and change AI to move first, and start a new game. AI does not make a move.
  • [x] After clicking into the settings, and then returning to the board, you can see that a piece is particularly large.
  • [x] Should reset then game when reset to default settings.
  • [x] https://github.com/calcitem/Sanmill/issues/476
  • [x] https://github.com/calcitem/Sanmill/issues/466
  • [x] package:sanmill/services/mill/src/position.dart: Failed assertion: line 772 pos 16: iterator.current!.move != iterator.prev!.move': is not true.
  • [x] Adjust shadow and ban color
  • [x] Should not show please place in Snackbar
  • [x] Sometimes level setting doesn't not take effect.
  • [x] Tip overlapped by please place.
  • [x] Sometimes places but no show.
  • [x] Increase the difficulty and place some, and open rule settings page, and open game page again, tap, the first step takes a long time.

Move list

  • [x] Fix move list is not completed
  • [x] Cannot show Moves and rules do not match. on the screen
  • [x] Fix when taken back, it does not work. Snackbar shows You are at the end of the move list
  • [x] Fix cannot show move list when screenReaderSupport is enabled and cannot import move list
  • [x] https://github.com/calcitem/Sanmill/issues/471
  • [x] FEN is wrong: position fen ********/O***O*@*/******** b p p 2 7 1 8 0 1 2 moves 2,7) (2,1)
  • [x] Take back after importing move list, the last line break error of move list
  • [x] Tip is wrong

Modal bottom sheet

  • [x] Fix clicking on an area outside the ModalBottomSheet does not close the ModalBottomSheet

Mill

  • [x] https://github.com/calcitem/Sanmill/issues/447
  • [x] https://github.com/calcitem/Sanmill/issues/446

l10n

  • [x] Fix show grey screen when switching languages
  • [x] https://github.com/calcitem/Sanmill/issues/407

Performance

  • [x] Fix during the startup of the App, a rotating progress bar will appear in the middle of the screen, and there will be a noticeable delay. CircularProgressIndicator.adaptive(),

Engineering

  • [x] Fix [WARNING] Configuring freezed:freezedin targetsanmill:sanmill but this is not a known Builder when running flutter-init.sh
  • [x] https://github.com/calcitem/Sanmill/issues/451

Exception

  • [x] https://github.com/calcitem/Sanmill/issues/503
  • [x] https://github.com/calcitem/Sanmill/issues/391

Windows

  • [x] https://github.com/calcitem/Sanmill/issues/478

Deferred

  • None.

calcitem avatar Feb 02 '22 11:02 calcitem

1. b4 f4
2. d2 d6
3. b6 c4
4. b2xc4 a4
5. f2xd6 d6
6. f6 d1
7. d3 c4
8. e3 e5
9. g4 g7
10. g7 e3-e4
11. a4-a7 a4-a7
12. d3-e3 a7-a4
13. a7-a4 d2-d3
14. d1-d2 d1-d2
15. d3-c3 g7-d7
16. g7-d7 c3-d3
17. e5-d5xg4 xg4
18. d3-c3 d7-g7
19. d7-g7 e4-e5
20. g7-d7xe3 xe3
21. e5-e4 d7-g7
22. d7-g7 e4-e5
23. g7-d7xc3 xc3
24. e5-e4 d7-g7
25. d7-g7 e4-e5
26. g7-d7xe5

Import error, rule not match.

calcitem avatar Apr 05 '22 04:04 calcitem

AI Vs AI:

D/MillEngine( 3869): [uci] input: position fen @**@**@*/O@**@OO@/@***@O@* w o s 4 0 9 0 0 16 28 moves (3,7)->(2,7) (3,8)->(3,7) (1,1)->(2,1) (1,2)->(1,1) (2,1)->(2,2) (1,3)->(2,3) (2,2)->(2,1) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)->(2,2) (2,3)-
D/MillEngine( 3869): [uci] input: go
D/MillEngine( 3869): Search depth: 1
D/MillEngine( 3869): println: bestmove (2,3)->(2,2)

calcitem avatar Apr 05 '22 14:04 calcitem

E/flutter ( 5619): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: 'package:flutter/src/animation/animation_controller.dart': Failed assertion: line 772 pos 7: '_ticker != null': AnimationController.stop() called after AnimationController.dispose()
E/flutter ( 5619): AnimationController methods should not be used after calling dispose.
E/flutter ( 5619): #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
E/flutter ( 5619): #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
E/flutter ( 5619): #2      AnimationController.stop (package:flutter/src/animation/animation_controller.dart:772:7)
E/flutter ( 5619): #3      AnimationController.value= (package:flutter/src/animation/animation_controller.dart:363:5)
E/flutter ( 5619): #4      AnimationController.reset (package:flutter/src/animation/animation_controller.dart:384:5)
E/flutter ( 5619): #5      TapHandler.engineToGo (package:sanmill/services/mill/src/tap_handler.dart:255:29)
E/flutter ( 5619): <asynchronous suspension>
E/flutter ( 5619): 

calcitem avatar Apr 05 '22 14:04 calcitem

C:\Flutter\bin\flutter.bat --no-color pub global run intl_utils:generate
ERROR: Failed to generate localization files.
RangeError (end): Invalid value: Only valid value is 9: 4
pub finished with exit code 2
Process finished with exit code 2

calcitem avatar Apr 05 '22 15:04 calcitem

  Future<void> shutdown() async {
    DB().listenGeneralSettings.removeListener(() => setOptions()); // Need?

    _isActive = false;
    await _platform.invokeMethod("shutdown");
  }

calcitem avatar Apr 06 '22 16:04 calcitem

          if (!disposed) {
            _animationController.reset();
          } else {
            print(
                "[engineToGo] Disposed, so do not reset animationController.");
          }

calcitem avatar Apr 06 '22 16:04 calcitem

5): [uci] input: setoption name Algorithm value 2
D/MillEngine( 9965): [uci] input: setoption name Algorithm value 2
D/MillEngine( 9965): [uci] input: setoption name Algorithm value 2
D/MillEngine( 9965): [uci] input: setoption name Algorithm value 2
D/MillEngine( 9965): [uci] input: setoption name Algorithm value 2
D/MillEngine( 9965): [uci] input: setoption name Algorithm value 2

Many times

calcitem avatar Apr 06 '22 17:04 calcitem

On branch master (v1.1.43), game_page.dart: Call initState() in Game.instance.init(); to call _position = Position(); to clean the board. So follow it. But now Position() does not call anything, why?

See master:

  init() {
    for (var i = 0; i < _grid.length; i++) {
      _grid[i] = Piece.noPiece;
    }

    for (var i = 0; i < board.length; i++) {
      board[i] = Piece.noPiece;
    }

    phase = Phase.placing;

    setPosition(rule); // TODO

    // TODO
    recorder = GameRecorder(lastPositionWithRemove: fen());
  }

  Position() {
    init();
  }

calcitem avatar Apr 06 '22 17:04 calcitem

slash, 9

 1.    b2    b4
 2.    f2    d2
 3.    g1    f4
 4.    a1    d6
 5.    c3xd2    d2
 6.    e3xb4    b4
 7.    b6    e5
 8.    c5    a7
 9.    a4    g7
10.    g7    c5-c4
11.    d6-d7    d6-d7
12.    d6-d7    d6-d7
13.    d6-d7    d6-d7
14.    d6-d7    d6-d7
15.    d6-d7    d6-d7
16.    d6-d7    d6-d7
17.    d6-d7    d6-d7
18.    d6-d7    d6-d7
19.    d6-d7    d6-d7
20.    d6-d7    d6-d7
21.    d6-d7    d6-d7
22.    d6-d7    d6-d7
23.    d6-d7    d6-d7
24.    d6-d7    d6-d7
25.    d6-d7    d6-d7
26.    d6-d7    d6-d7
27.    d6-d7    d6-d7
28.    d6-d7    d6-d7
29.    d6-d7    d6-d7
30.    d6-d7    d6-d7
31.    d6-d7    d6-d7
32.    d6-d7    d6-d7
33.    d6-d7    d6-d7
34.    d6-d7    d6-d7
35.    d6-d7    d6-d7
36.    d6-d7    d6-d7
37.    d6-d7    d6-d7
38.    d6-d7    d6-d7
39.    d6-d7    d6-d7
40.    d6-d7    d6-d7
41.    d6-d7    d6-d7
42.    d6-d7    d6-d7
43.    d6-d7    d6-d7
44.    d6-d7    d6-d7
45.    d6-d7    d6-d7
46.    d6-d7    d6-d7
47.    d6-d7    d6-d7
48.    d6-d7    d6-d7
49.    d6-d7    d6-d7
50.    d6-d7    d6-d7
51.    d6-d7    d6-d7
52.    d6-d7    d6-d7
53.    d6-d7    d6-d7
54.    d6-d7    d6-d7
55.    d6-d7    d6-d7
56.    d6-d7    d6-d7
57.    d6-d7    d6-d7
58.    d6-d7    d6-d7
59.    d6-d7    d6-d7
60.    d6-d7    d6-d7
61.    d6-d7    d6-d7
62.    d6-d7    d6-d7
63.    d6-d7    d6-d7
64.    d6-d7    d6-d7
65.    d6-d7    d6-d7
66.    d6-d7    d6-d7
67.    d6-d7    d6-d7
68.    d6-d7    d6-d7
69.    d6-d7    d6-d7
70.    d6-d7    d6-d7
71.    d6-d7    d6-d7
72.    d6-d7    d6-d7
73.    d6-d7    d6-d7
74.    d6-d7    d6-d7
75.    d6-d7    d6-d7
76.    d6-d7    d6-d7
77.    d6-d7    d6-d7
78.    d6-d7    d6-d7
79.    d6-d7    d6-d7
80.    d6-d7    d6-d7
81.    d6-d7    d6-d7
82.    d6-d7    d6-d7
83.    d6-d7    d6-d7
84.    d6-d7    d6-d7
85.    d6-d7    d6-d7
86.    d6-d7    d6-d7
87.    d6-d7    d6-d7
88.    d6-d7    d6-d7
89.    d6-d7    d6-d7
90.    d6-d7    d6-d7
91.    d6-d7    d6-d7
92.    d6-d7    d6-d7
93.    d6-d7    d6-d7
94.    d6-d7    d6-d7
95.    d6-d7    d6-d7
96.    d6-d7    d6-d7
97.    d6-d7    d6-d7
98.    d6-d7    d6-d7
99.    d6-d7    d6-d7
100.    d6-d7    d6-d7
101.    d6-d7    d6-d7
102.    d6-d7    d6-d7
103.    d6-d7    d6-d7
104.    d6-d7    d6-d7
105.    d6-d7    d6-d7
106.    d6-d7    d6-d7
107.    d6-d7    d6-d7
108.    d6-d7    d6-d7
109.    d6-d7    d6-d7
110.    d6-d7    d6-d7
111.    d6-d7    d6-d7
112.    d6-d7    d6-d7
113.    d6-d7    d6-d7
114.    d6-d7    d6-d7
115.    d6-d7    d6-d7
116.    d6-d7    d6-d7
117.    d6-d7    d6-d7
118.    d6-d7    d6-d7
119.    d6-d7    d6-d7
120.    d6-d7    d6-d7
121.    d6-d7    d6-d7
122.    d6-d7    d6-d7
123.    d6-d7    d6-d7
124.    d6-d7    d6-d7
125.    d6-d7    d6-d7
126.    d6-d7    d6-d7
127.    d6-d7    d6-d7
128.    d6-d7    d6-d7
129.    d6-d7    d6-d7
130.    d6-d7    d6-d7
131.    d6-d7    d6-d7
132.    d6-d7    d6-d7
133.    d6-d7    d6-d7
134.    d6-d7    d6-d7
135.    d6-d7    d6-d7
136.    d6-d7    d6-d7
137.    d6-d7    d6-d7
138.    d6-d7    d6-d7
139.    d6-d7    d6-d7
140.    d6-d7    d6-d7
141.    d6-d7    d6-d7
142.    d6-d7    d6-d7
143.    d6-d7    d6-d7
144.    d6-d7    d6-d7
145.    d6-d7    d6-d7
146.    d6-d7    d6-d7
147.    d6-d7    d6-d7
148.    d6-d7    d6-d7
149.    d6-d7    d6-d7
150.    d6-d7    d6-d7
151.    d6-d7    d6-d7
152.    d6-d7    d6-d7
153.    d6-d7    d6-d7
154.    d6-d7    d6-d7
155.    d6-d7    d6-d7
156.    d6-d7    d6-d7
157.    d6-d7    d6-d7
158.    d6-d7    d6-d7
159.    d6-d7    d6-d7
160.    d6-d7    d6-d7
161.    d6-d7    d6-d7
162.    d6-d7    d6-d7
163.    d6-d7    d6-d7
164.    d6-d7    d6-d7
165.    d6-d7    d6-d7
166.    d6-d7    d6-d7
167.    d6-d7    d6-d7
168.    d6-d7    d6-d7
169.    d6-d7    d6-d7
170.    d6-d7    d6-d7
171.    d6-d7    d6-d7
172.    d6-d7    d6-d7
173.    d6-d7    d6-d7
174.    d6-d7    d6-d7
175.    d6-d7    d6-d7
176.    d6-d7    d6-d7
177.    d6-d7    d6-d7
178.    d6-d7    d6-d7
179.    d6-d7    d6-d7
180.    d6-d7    d6-d7
181.    d6-d7    d6-d7
182.    d6-d7    d6-d7
183.    d6-d7    d6-d7
184.    d6-d7    d6-d7
185.    d6-d7    d6-d7
186.    d6-d7    d6-d7
187.    d6-d7    d6-d7
188.    d6-d7    d6-d7
189.    d6-d7    d6-d7
190.    d6-d7    d6-d7
191.    d6-d7    d6-d7
192.    d6-d7    d6-d7
193.    d6-d7    d6-d7
194.    d6-d7    d6-d7
195.    d6-d7    d6-d7
196.    d6-d7    d6-d7
197.    d6-d7    d6-d7
198.    d6-d7    d6-d7
199.    d6-d7    d6-d7
200.    d6-d7    d6-d7
201.    d6-d7    d6-d7
202.    d6-d7    d6-d7
203.    d6-d7    d6-d7
204.    d6-d7    d6-d7
205.    d6-d7    d6-d7
206.    d6-d7    d6-d7
207.    d6-d7    d6-d7
208.    d6-d7    d6-d7
209.    d6-d7    d6-d7
210.    d6-d7    d6-d7
211.    d6-d7    d6-d7
212.    d6-d7    d6-d7
213.    d6-d7    d6-d7
214.    d6-d7    d6-d7
215.    d6-d7    d6-d7
216.    d6-d7    d6-d7
217.    d6-d7    d6-d7
218.    d6-d7    d6-d7
219.    d6-d7    d6-d7
220.    d6-d7    d6-d7
221.    d6-d7    d6-d7
222.    d6-d7    d6-d7
223.    d6-d7    d6-d7
224.    d6-d7    d6-d7
225.    d6-d7    d6-d7
226.    d6-d7    d6-d7
227.    d6-d7    d6-d7
228.    d6-d7    d6-d7
229.    d6-d7    d6-d7
230.    d6-d7    d6-d7
231.    d6-d7    d6-d7
232.    d6-d7    d6-d7
233.    d6-d7    d6-d7
234.    d6-d7    d6-d7
235.    d6-d7    d6-d7
>>> position fen *@*O*OO*/@*@O@O@O/*@*O*OO@ b m s 9 0 7 0 0 3 11 moves (2,7) (2,8) (1,2) (1,8) (3,8) (3,7) (3,2) (3,2) (3,2) (1,8)->(1,7) 
>>> go
[uci] input: go
[uci] input: position fen *@*O*OO*/@*@O@O@O/*@*O*OO@ b m s 9 0 7 0 0 3 11 moves (2,7) (2,8) (1,2) (1,8) (3,8) (3,7) (3,2) (3,2) (3,2) (1,8)->(1,7) 
IDS: bestmove (none)
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: FormatException: [Move] Invalid Move: invalid char at pos 1. Expected one of '0123456789(,)->' but got n (at character 2)
(none)
 ^

#0      ExtMove._checkLegal (package:sanmill/services/mill/src/ext_move.dart:147:9)
#1      new ExtMove (package:sanmill/services/mill/src/ext_move.dart:91:5)
#2      Engine.search (package:sanmill/services/mill/src/engine.dart:91:14)
<asynchronous suspension>
#3      TapHandler.engineToGo (package:sanmill/services/mill/src/tap_handler.dart:251:25)
<asynchronous suspension>

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: [_HistoryResponse] Moves and rules do not match.
#0      HistoryNavigator.gotoHistory.<anonymous closure> (package:sanmill/services/mill/src/history_navigation.dart:149:9)
<asynchronous suspension>

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: [_HistoryResponse] Moves and rules do not match.
#0      HistoryNavigator.gotoHistory.<anonymous closure> (package:sanmill/services/mill/src/history_navigation.dart:149:9)
<asynchronous suspension>

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: [_HistoryResponse] Moves and rules do not match.
#0      HistoryNavigator.gotoHistory.<anonymous closure> (package:sanmill/services/mill/src/history_navigation.dart:149:9)
<asynchronous suspension>

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: [_HistoryResponse] Moves and rules do not match.
#0      HistoryNavigator.gotoHistory.<anonymous closure> (package:sanmill/services/mill/src/history_navigation.dart:149:9)
<asynchronous suspension>

calcitem avatar Apr 10 '22 02:04 calcitem

└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
E/flutter (26371): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: 'package:flutter/src/animation/animation_controller.dart': Failed assertion: line 772 pos 7: '_ticker != null': AnimationController.stop() called after AnimationController.dispose()
E/flutter (26371): AnimationController methods should not be used after calling dispose.
E/flutter (26371): #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
E/flutter (26371): #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
E/flutter (26371): #2      AnimationController.stop (package:flutter/src/animation/animation_controller.dart:772:7)
E/flutter (26371): #3      AnimationController.value= (package:flutter/src/animation/animation_controller.dart:363:5)
E/flutter (26371): #4      AnimationController.reset (package:flutter/src/animation/animation_controller.dart:384:5)
E/flutter (26371): #5      TapHandler.engineToGo (package:sanmill/services/mill/src/tap_handler.dart:256:29)
E/flutter (26371): <asynchronous suspension>

calcitem avatar Apr 12 '22 15:04 calcitem