0

I'm currently trying to code the Question 2 here: Assignment

All I need is a rough outline of how to go about this. All the examples I have seen of MCTS seem to be about 2X2 board games and I don't understand how to extrapolate that to this example. I just need someone to ask questions to. Thanks

I have created a list with node addresses and built the BINARY Tree as such:

def create_tree(depth):
    l = []
    lst = ['S', 'L', 'R']
    dummy = ['L', 'R']
    while len(l)<2**depth:
        l = []
        for i in dummy:
            l.append(i+'L')
            l.append(i+'R') 
        lst.append(l)
        dummy = l.copy()
    return lst

# Building the binary tree
binary_tree = build(list(chain.from_iterable(create_tree(4))))
print('Binary tree from list :\n',
      binary_tree)

Now I'm confused on how to proceed. Use UCB to select on child node of root and then simulate a path until we reach a leaf who's value is backpropagted to the chosen node. We repeat this as long as we can. Is this the way to go? Is creating the tree from a list the right choice? Please help!

Jay
  • 19
  • 7

0 Answers0