Python features.stone_color_feature() Examples
The following are 7
code examples of features.stone_color_feature().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
features
, or try the search function
.
Example #1
Source File: test_features.py From training_results_v0.5 with Apache License 2.0 | 5 votes |
def test_stone_color_feature(self): f = features.stone_color_feature(TEST_POSITION) self.assertEqual(f.shape, (9, 9, 3)) # plane 0 is B self.assertEqual(f[0, 1, 0], 1) self.assertEqual(f[0, 1, 1], 0) # plane 1 is W self.assertEqual(f[0, 8, 1], 1) self.assertEqual(f[0, 8, 0], 0) # plane 2 is empty self.assertEqual(f[0, 5, 2], 1) self.assertEqual(f[0, 5, 1], 0)
Example #2
Source File: test_features.py From training_results_v0.5 with Apache License 2.0 | 5 votes |
def test_stone_color_feature(self): f = features.stone_color_feature(TEST_POSITION) self.assertEqual(f.shape, (9, 9, 3)) # plane 0 is B self.assertEqual(f[0, 1, 0], 1) self.assertEqual(f[0, 1, 1], 0) # plane 1 is W self.assertEqual(f[0, 8, 1], 1) self.assertEqual(f[0, 8, 0], 0) # plane 2 is empty self.assertEqual(f[0, 5, 2], 1) self.assertEqual(f[0, 5, 1], 0)
Example #3
Source File: test_features.py From alphago_demo with Apache License 2.0 | 5 votes |
def test_stone_color_feature(self): f = features.stone_color_feature(TEST_POSITION) self.assertEqual(f.shape, (9, 9, 3)) # plane 0 is B self.assertEqual(f[0, 1, 0], 1) self.assertEqual(f[0, 1, 1], 0) # plane 1 is W self.assertEqual(f[0, 8, 1], 1) self.assertEqual(f[0, 8, 0], 0) # plane 2 is empty self.assertEqual(f[0, 5, 2], 1) self.assertEqual(f[0, 5, 1], 0)
Example #4
Source File: test_features.py From MuGo with Apache License 2.0 | 5 votes |
def test_stone_color_feature(self): f = features.stone_color_feature(TEST_POSITION) self.assertEqual(f.shape, (9, 9, 3)) # plane 0 is B self.assertEqual(f[0, 1, 0], 1) self.assertEqual(f[0, 1, 1], 0) # plane 1 is W self.assertEqual(f[0, 8, 1], 1) self.assertEqual(f[0, 8, 0], 0) # plane 2 is empty self.assertEqual(f[0, 5, 2], 1) self.assertEqual(f[0, 5, 1], 0)
Example #5
Source File: test_features.py From training with Apache License 2.0 | 5 votes |
def test_stone_color_feature(self): f = features.stone_color_feature(TEST_POSITION) self.assertEqual((9, 9, 3), f.shape) # plane 0 is B self.assertEqual(1, f[0, 1, 0]) self.assertEqual(0, f[0, 1, 1]) # plane 1 is W self.assertEqual(0, f[0, 8, 0]) self.assertEqual(1, f[0, 8, 1]) # plane 2 is empty self.assertEqual(1, f[0, 5, 2]) self.assertEqual(0, f[0, 5, 1])
Example #6
Source File: test_features.py From AlphaGOZero-python-tensorflow with MIT License | 5 votes |
def test_stone_color_feature(self): f = features.stone_color_feature(TEST_POSITION) self.assertEqual(f.shape, (9, 9, 3)) # plane 0 is B self.assertEqual(f[0, 1, 0], 1) self.assertEqual(f[0, 1, 1], 0) # plane 1 is W self.assertEqual(f[0, 8, 1], 1) self.assertEqual(f[0, 8, 0], 0) # plane 2 is empty self.assertEqual(f[0, 5, 2], 1) self.assertEqual(f[0, 5, 1], 0)
Example #7
Source File: test_features.py From AlphaGOZero-python-tensorflow with MIT License | 5 votes |
def test_stone_color_feature(self): f = features.stone_color_feature(TEST_POSITION) self.assertEqual(f.shape, (9, 9, 3)) # plane 0 is B self.assertEqual(f[0, 1, 0], 1) self.assertEqual(f[0, 1, 1], 0) # plane 1 is W self.assertEqual(f[0, 8, 1], 1) self.assertEqual(f[0, 8, 0], 0) # plane 2 is empty self.assertEqual(f[0, 5, 2], 1) self.assertEqual(f[0, 5, 1], 0)