diff --git a/patterns/helpers.c b/patterns/helpers.c
index e08238c..c615f8f 100644
|
a
|
b
|
int distrust_tactics_helper(int str) |
| 881 | 881 | return 0; |
| 882 | 882 | } |
| 883 | 883 | |
| | 884 | |
| | 885 | /* |
| | 886 | * This helper returns 1 if str is part of a 4 stone string having a |
| | 887 | * bent four in the corner shape. |
| | 888 | * |
| | 889 | * |x??? |
| | 890 | * |Oxx? |
| | 891 | * |OOOx |
| | 892 | * +---- |
| | 893 | * |
| | 894 | */ |
| | 895 | |
| | 896 | int |
| | 897 | bent_four_helper(int str) |
| | 898 | { |
| | 899 | int stones[4]; |
| | 900 | int good_corner_found = 0; |
| | 901 | int color = board[str]; |
| | 902 | int k; |
| | 903 | |
| | 904 | if (!IS_STONE(color)) |
| | 905 | return 0; |
| | 906 | |
| | 907 | if (findstones(str, 4, stones) != 4) |
| | 908 | return 0; |
| | 909 | |
| | 910 | /* All stones must be on the edge. Also detect the presence of a |
| | 911 | * corner stone. |
| | 912 | */ |
| | 913 | for (k = 0; k < 4; k++) { |
| | 914 | if (!is_edge_vertex(stones[k])) |
| | 915 | return 0; |
| | 916 | if (is_corner_vertex(stones[k])) { |
| | 917 | int corner = stones[k]; |
| | 918 | if ((board[EAST(corner)] == color) |
| | 919 | + (board[SOUTH(corner)] == color) |
| | 920 | + (board[WEST(corner)] == color) |
| | 921 | + (board[NORTH(corner)] == color) == 2) |
| | 922 | good_corner_found = 1; |
| | 923 | } |
| | 924 | } |
| | 925 | |
| | 926 | return good_corner_found; |
| | 927 | } |
| | 928 | |
| | 929 | |
| 884 | 930 | /* |
| 885 | 931 | * LOCAL Variables: |
| 886 | 932 | * tab-width: 8 |
diff --git a/patterns/owl_defendpats.db b/patterns/owl_defendpats.db
index 3a3e7c8..79537e9 100644
|
a
|
b
|
O.a |
| 2885 | 2885 | |
| 2886 | 2886 | |
| 2887 | 2887 | Pattern D711 |
| | 2888 | # gf Revised constraint. (3.9.1) |
| | 2889 | # This pattern is really only helpful for bent four in the corner |
| | 2890 | # situations, see e.g. owl:223 and nicklas1:1902. In certain semeai |
| | 2891 | # situations it is directly harmful to capture the nakade stones |
| | 2892 | # prematurely. |
| 2888 | 2893 | |
| 2889 | 2894 | O? capture nakade, might give new possibilities |
| 2890 | 2895 | X* |
| … |
… |
X* |
| 2894 | 2899 | O? |
| 2895 | 2900 | A* |
| 2896 | 2901 | |
| 2897 | | ;lib(A)==1 && wormsize(A)>=3 |
| | 2902 | ;lib(A)==1 && wormsize(A)==4 && bent_four_helper(A) |
| 2898 | 2903 | |
| 2899 | 2904 | |
| 2900 | 2905 | Pattern D712 |
| | 2906 | # gf Revised constraint. (3.9.1) |
| | 2907 | # This pattern is really only helpful for bent four in the corner |
| | 2908 | # situations, see e.g. owl:223 and nicklas1:1902. In certain semeai |
| | 2909 | # situations it is directly harmful to capture the nakade stones |
| | 2910 | # prematurely. |
| 2901 | 2911 | |
| 2902 | 2912 | ?O capture nakade, might give new possibilities |
| 2903 | 2913 | X* |
| … |
… |
X* |
| 2907 | 2917 | ?O |
| 2908 | 2918 | A* |
| 2909 | 2919 | |
| 2910 | | ;lib(A)==1 && wormsize(A)>=3 |
| | 2920 | ;lib(A)==1 && wormsize(A)==4 && bent_four_helper(A) |
| 2911 | 2921 | |
| 2912 | 2922 | |
| 2913 | 2923 | Pattern D713 |
diff --git a/patterns/patterns.h b/patterns/patterns.h
index d8a353e..7904927 100644
|
a
|
b
|
int adjacent_to_defendable_stone_in_atari(int str); |
| 332 | 332 | void backfill_replace(int move, int str); |
| 333 | 333 | int break_mirror_helper(int str, int color); |
| 334 | 334 | int distrust_tactics_helper(int str); |
| | 335 | int bent_four_helper(int str); |
| 335 | 336 | int disconnect_helper(int apos, int bpos); |
| 336 | 337 | |
| 337 | 338 | |