- move list_item_divider into lib/shared
- move lib/engine into lib/services/engine
unify Import style
- I've unified the way files are imported. We now use absolute imports everywhere.
This is not a must but I find it more usefull.
cleanup imports
- prefer using part files where needed
cleanup the drawer code.
- fixes the drawer design
Home drawer performance improvements
As the child doesn't depend on the transformation we shouldn't repaint it => better performance
Most notably:
- require_trailing_commas
- prefer_const_constructors
- type_annotate_public_apis
- always_declare_return_types
- prefer_foreach
- use_string_buffers
- join_return_with_assignment
For now disabled rules:
- avoid_positional_boolean_parameters
- constant_identifier_names
- avoid_escaping_inner_quotes
- use_build_context_synchronously
Those lint rules are going to be disabled for now as they require massive restructure and logic change of the current codebase
Already fixed:
- avoid_print (previous commit)
this enables vscode to auto format files in the flutter project.
Also fixes a formatting error
enable formatting only for dart files
format settings.json
Fix 0e8ab57b18
1. f4 d6
2. d2 b4
3. c4 d1
4. d7 d3
5. e4 g4
White:
3 d5 X 39
5 a7 OK
c37bd7cc74 said:
From test result we can known that 3/5/7/8 is OK.
0e8ab57b18 said:
Now, For this game:
1. b4 d2
2. f4 d6
3. d1 d5
4. d7 c4
5. g4 e4
5 and 7 is bad move.
Only choose 3, White place at a4/d3 (D).
But, if apply 6e547e162b,
1. b4 d2
2. f4 d6
3. d1 d5
4. d7 c4
White's 5th will not do g4 to attack. So ignore it.
1. d6 d2
2. b4 f4
3. e4 c4
4. d1 g4
5. a1
Black
bad a4 (47)
1 X
2 X
3+ OK
Can fit Commit b65d513678
Black:
Bad move: f6
Good move: c5 / b4 / d3 / d2 / e3
1. d1 d6
2. c4 f4
3. g7 d7
4. d5 g4
5. e4
3 OK
4 X
5 D or 65
6+ X
BTW:
Commit ff37bc3310
1. d6 f4
2. b4 d2
3. b6 f6
4. b2xf6 f6
5. d7
Actually, d7 is bad move.
So we do not need to consider this case.
c37bd7cc74
Limit white 6th move thinking depth to less than 8
From test result we can known that 3/5/7/8 is OK.
But if set to 8, for this game:
1. f4 d2
2. b4 d6
3. d7 e4
4. d3 g4
5. a4 c4
White will place at a7 which will lost in 45.
If change to 3/5/7, sometimes place at d5(D), sometimes place at d1(49).
So it's better than 8. Not perfect.
We choose 7.
Now, For this game:
1. b4 d2
2. f4 d6
3. d1 d5
4. d7 c4
5. g4 e4
5 and 7 is bad move.
Only choose 3, White place at a4/d3 (D).
Case 1:
1. d6 f4
2. b4 d2
3. d3 d7
4. d1 g4
White b6 is bad (29)
1-6 OK
7 X
8 OK
9 X
10 OK
11 X
12+ OK
Case 2:
1. b4 f4
2. d2 d6
3. g4 d1
4. d7 b2
1 OK
2 OK
3 OK
4 X 47
5 OK
6 X 47
7 OK
8 X 47
9 OK
10 X 47
11 X 57
12 X 47
13-16 X 57 half
17 X 57
18+ OK
Case 3:
1. d6 f4
2. d2 b4
3. g4 d7
4. a4 d1
5 50% X (73, acceptable)
Case 4:
b0d8255aad said:
As long as the depth of White's 5th move is >= 5, there will maybe no bad move.
So it is not conflict.
c37bd7cc74
Limit white 6th move thinking depth to less than 8
From test result we can known that 3/5/7/8 is OK.
But if set to 8, for this game:
1. f4 d2
2. b4 d6
3. d7 e4
4. d3 g4
5. a4 c4
White will place at a7 which will lost in 45.
If change to 3/5/7, sometimes place at d5(D), sometimes place at d1(49).
So it's better than 8. Not perfect.
We choose 7.
White:
Bad move: a4 (Draw, but next black will do c4, and then white cannot do c5)
Good move: c5
1. b4 f4
2. d2 d6
3. d7 d3
White Depth 1-3 will do e4 or g4.
The strategy is defensive rather than offensive.
As long as the depth of White's 5th move is >= 5, there will maybe no bad move.
For this move list:
1. b4 f4
2. d6 d2
3. b6 b2
4. f6xb2 b2
5. c5
Black:
Bad move: f2xb4 (lost in 39)
Good move: f2xc5/ or no mill
(From so_gewinnt_man_muehle)
We cannot stop black to do bad move at 5th.
So we try to stop black to do b2 at 4th.
Through change black's 3rd move depth to 3,
Black will do d7/d5/a4/c4.
This commit is not conflict with
"depth: Limit 6th and 7th move depth to 15"
(fefa064cb9)
Test result:
If change depth to less than 2 (not 3), played 600-800 games.
Before change:
20% : 32% : 48%
After change:
17% : 43% : 39%