harbecke / HexHex

AlphaGo Zero adaptation for Hex
GNU General Public License v3.0
20 stars 4 forks source link

Two channel board tensor #18

Closed harbecke closed 5 years ago

harbecke commented 5 years ago

I changed the board tensor to two channels. The channels exchanged (torch.roll) and transposed after every move. I tried converting three layer models to two layer models but the output required retraining so I suggest just training new models (which appears to be faster). Please take a look at the branch and notify me whether it works for you.

harbecke commented 5 years ago

there is also the possibility of introducing a legacy_board_tensor that is not transposed and rolled in hex.logic.hexboard.Board and retrieving all information for e.g. Gui from there. do you think think this is better?

PascalCremer commented 5 years ago

I wouldn't introduce a legacy board tensor but rather have board provide a function get_owner(position) which knows about the roatation logic.

PascalCremer commented 5 years ago

I think that anything that doesn't need backpropagation / gpu support should use easy to use board functions instead of board_tensor