tensorflow / minigo

An open-source implementation of the AlphaGoZero algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem in features.stone_features

zte960e opened this issue · comments

modify tests\test_features.py

for coord in ((0, 0), (0, 1), (0, 2), (0, 3), (1, 1) ,(5,5), (5,6) ,(4,4), (4,5), (6,7), (3,3) , (3,4), (3,5), (7,7), (7,6), (8,8), (8,0), (7,0), (7,1),(7,3)):
TEST_POSITION3.play_move(coord, mutate=True)

add posion up to 20
board output:
[[ 1 0 1 -1 0 0 0 0 0]
[ 0 1 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0]
[ 0 0 0 1 -1 1 0 0 0]
[ 0 0 0 0 -1 1 0 0 0]
[ 0 0 0 0 0 -1 1 0 0]
[ 0 0 0 0 0 0 0 -1 0]
[-1 1 0 -1 0 0 1 -1 0]
[ 1 0 0 0 0 0 0 0 -1]]
stone_features plan 0 output:
[1 0 1 0 0 0 0 0 0]
[0 1 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 1 0 1 0 0 0]
[0 0 0 0 0 1 0 0 0]
[0 0 0 0 0 0 1 0 0]
[0 0 0 0 0 0 0 0 0]
[0 1 0 0 0 0 1 0 0]
[1 0 0 0 0 0 0 0 0]

here is 10 posions, WHY not 8 ?

   A B C D E F G H J   
 9 X . X O . . . . .  9
 8 . X . . . . . . .  8
 7 . . . . . . . . .  7
 6 . . . X O X . . .  6
 5 . . . . O X . . .  5
 4 . . . . . O X . .  4
 3 . . . . . . . O .  3
 2 O X . O<. . X O .  2
 1 X . . . . . . . O  1
   A B C D E F G H J   

In Minigo, feature plane 0 always holds the current player's stones and plane 1 hold the opponent player's stones.
Since the last move was played by white (as indicated by the < at D2) , plane 0 holds the black stones.