Commit d934c926 authored by Jayant Khatkar's avatar Jayant Khatkar

robot id added to avail funtions so that function knows who it is calculating the actions for

parent da036779
......@@ -189,7 +189,7 @@ class Tree:
"""
state = self._get_state(start_node)
options = self.available_actions(self.data, state)
options = self.available_actions(self.data, state, self.id)
# create empty nodes underneath the node being expanded
for o in options:
......
......@@ -21,8 +21,8 @@ data = {}
# Create an available actions function
# This returns a list of possible actions to take from a given state
# state input explained next
def avail_actions(data, state):
# state and robot_id inputs explained below
def avail_actions(data, state, robot_id):
# This example is simply getting max sum,
# options are same regardless of state
......
......@@ -3,7 +3,7 @@ from DecMCTS import Tree
data = {}
def avail_actions(data, state):
def avail_actions(data, state, robot_id):
return [1,2,3,4,5]
def reward(dat, state):
......
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