Commit 1c895007 authored by Jayant Khatkar's avatar Jayant Khatkar

pip install ready

parent bcaefc81
from setuptools import setup, find_packages
REQUIRED = [
networkx
]
from distutils.core import setup
setup(
name='pyDecMCTS',
name='DecMCTS',
version='0.1dev',
packages=find_packages(where="src"),
package_dir={"":"src"},
install_requires = REQUIRED
py_modules=['DecMCTS']
)
from DecMCTS import Tree
data = {}
def avail_actions(data, state):
return [1,2,3,4,5]
def reward(dat, state):
other_robots = [sum(state[1][a]) for a in state[1]]
#if sum(other_robots) + sum(state[0]) >25:
# return 0
return sum(state[0]) + sum(other_robots)
comm_n = 5
tree1 = Tree(data, reward, avail_actions, comm_n)
tree2 = Tree(data, reward, avail_actions, comm_n)
for i in range(350):
tree1.grow()
tree2.grow()
tree1.receive_comms(tree2.send_comms(), 2)
tree2.receive_comms(tree2.send_comms(), 1)
from decmcts import tree
from DecMCTS import Tree
data = {}
def avail_actions(data, state):
return [1,2,3,4,5]
def reward(dat, state):
other_robots = [sum(state[1][a]) for a in state[1]]
#if sum(other_robots) + sum(state[0]) >25:
# return 0
return sum(state[0]) + sum(other_robots)
comm_n = 5
tree1 = Tree(data, reward, avail_actions, comm_n)
tree2 = Tree(data, reward, avail_actions, comm_n)
for i in range(350):
tree1.grow()
tree2.grow()
tree1.receive_comms(tree2.send_comms(), 2)
tree2.receive_comms(tree2.send_comms(), 1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment