Python features.would_capture_feature() Examples
The following are 7
code examples of features.would_capture_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_would_capture_feature(self): f = features.would_capture_feature(TEST_POSITION2) self.assertEqual( f.shape, (9, 9, features.would_capture_feature.planes)) # move at (1, 2) would capture 2 stones self.assertEqual(f[1, 2, 1], 1) # move at (0, 0) should not capture stones because it's B's move. self.assertEqual(f[0, 0, 0], 0) # move at (0, 7) would capture 3 stones self.assertEqual(f[0, 7, 2], 1) self.assertEqual(f[0, 7, 1], 0)
Example #2
Source File: test_features.py From training_results_v0.5 with Apache License 2.0 | 5 votes |
def test_would_capture_feature(self): f = features.would_capture_feature(TEST_POSITION2) self.assertEqual( f.shape, (9, 9, features.would_capture_feature.planes)) # move at (1, 2) would capture 2 stones self.assertEqual(f[1, 2, 1], 1) # move at (0, 0) should not capture stones because it's B's move. self.assertEqual(f[0, 0, 0], 0) # move at (0, 7) would capture 3 stones self.assertEqual(f[0, 7, 2], 1) self.assertEqual(f[0, 7, 1], 0)
Example #3
Source File: test_features.py From alphago_demo with Apache License 2.0 | 5 votes |
def test_would_capture_feature(self): f = features.would_capture_feature(TEST_POSITION2) self.assertEqual(f.shape, (9, 9, features.would_capture_feature.planes)) # move at (1, 2) would capture 2 stones self.assertEqual(f[1, 2, 1], 1) # move at (0, 0) should not capture stones because it's B's move. self.assertEqual(f[0, 0, 0], 0) # move at (0, 7) would capture 3 stones self.assertEqual(f[0, 7, 2], 1) self.assertEqual(f[0, 7, 1], 0)
Example #4
Source File: test_features.py From MuGo with Apache License 2.0 | 5 votes |
def test_would_capture_feature(self): f = features.would_capture_feature(TEST_POSITION2) self.assertEqual(f.shape, (9, 9, features.would_capture_feature.planes)) # move at (1, 2) would capture 2 stones self.assertEqual(f[1, 2, 1], 1) # move at (0, 0) should not capture stones because it's B's move. self.assertEqual(f[0, 0, 0], 0) # move at (0, 7) would capture 3 stones self.assertEqual(f[0, 7, 2], 1) self.assertEqual(f[0, 7, 1], 0)
Example #5
Source File: test_features.py From training with Apache License 2.0 | 5 votes |
def test_would_capture_feature(self): f = features.would_capture_feature(TEST_POSITION2) self.assertEqual( (9, 9, features.would_capture_feature.planes), f.shape) # move at (1, 2) would capture 2 stones self.assertEqualNPArray([1], f[1, 2]) # move at (0, 0) should not capture stones because it's B's move. self.assertEqualNPArray([0], f[0, 0]) # move at (0, 7) would capture 3 stones self.assertEqualNPArray([1], f[0, 7])
Example #6
Source File: test_features.py From AlphaGOZero-python-tensorflow with MIT License | 5 votes |
def test_would_capture_feature(self): f = features.would_capture_feature(TEST_POSITION2) self.assertEqual(f.shape, (9, 9, features.would_capture_feature.planes)) # move at (1, 2) would capture 2 stones self.assertEqual(f[1, 2, 1], 1) # move at (0, 0) should not capture stones because it's B's move. self.assertEqual(f[0, 0, 0], 0) # move at (0, 7) would capture 3 stones self.assertEqual(f[0, 7, 2], 1) self.assertEqual(f[0, 7, 1], 0)
Example #7
Source File: test_features.py From AlphaGOZero-python-tensorflow with MIT License | 5 votes |
def test_would_capture_feature(self): f = features.would_capture_feature(TEST_POSITION2) self.assertEqual(f.shape, (9, 9, features.would_capture_feature.planes)) # move at (1, 2) would capture 2 stones self.assertEqual(f[1, 2, 1], 1) # move at (0, 0) should not capture stones because it's B's move. self.assertEqual(f[0, 0, 0], 0) # move at (0, 7) would capture 3 stones self.assertEqual(f[0, 7, 2], 1) self.assertEqual(f[0, 7, 1], 0)