/
test_mc_parity.py
47 lines (34 loc) · 1.26 KB
/
test_mc_parity.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import unittest
import domain_parity_apptree
import domain_parity_stack
from app_tree import UnfinishedLeaf
from mcts import MCTNode
from test_mc_koza import run_gen_basic, run_basic_nmcs, run_basic_mcts
from tree_node import UFTNode, StackNode
class TestParityDomainApptree(unittest.TestCase):
def test_domain(self):
run_gen_basic(lambda: domain_parity_apptree.domain_parity(6), 17)
class TestKozaRegressionDomainStack(unittest.TestCase):
def test(self):
self.assertTrue(True)
class TestMCParityStack(unittest.TestCase):
def test_nmcs(self):
env = domain_parity_stack.make_env_stack()
node = StackNode([])
run_basic_nmcs(node, env, 0)
def test_mcts(self):
env = domain_parity_stack.make_env_stack()
node = MCTNode(StackNode([]))
run_basic_mcts(node, env, 1, 3)
class TestMCParityApptree(unittest.TestCase):
def test_nmcs(self):
env = domain_parity_apptree.make_env_app_tree()
node = UFTNode(UnfinishedLeaf(), 3)
run_basic_nmcs(node, env, 0)
def test_mcts(self):
env = domain_parity_apptree.make_env_app_tree()
node = MCTNode(UFTNode(UnfinishedLeaf(), 3))
run_basic_mcts(node, env, 1, 3)
if __name__ == "__main__":
pass
unittest.main()