úÎ RÝM:      !"#$%&'()*+,-./01234567891<A sequential team as a directed acyclic factor graph (DAFG) CCurrently all edges are Influence edges. Future versions will have  belief edges. An edge in a graph 2A type class for defining operations on all nodes  Name of node a Name of a list of nodes Check if node a is a reward node Check if node a is a non reward node Check if node a is a variable node Check if node a is a system dynamics Check if node a is a control node Check if node a is a factor node ;The attributes of the node. Used to contruct the dot file. A generic node of a graph Factor Vertexs *Factor node representing control function )Factor node representing system dynamics Variable nodes Non reard variable node Reward variable node Time .Create a sequence of nodes of a specific type "Create a sequence of reward nodes &Create a sequence of non reward nodes +Create a sequence of system dynamics nodes #Create a sequence of control nodes :HSince all edges are Influence edges, we do not differential between the  edges  Used with (.|.)8 to specify relation between the nodes. For example, if  x is a function of y and z, we can write  f.$.(x.|.[y,z]).  Used with (.$.)8 to specify relation between the nodes. For example, if  x is a function of y and z, we can write  f.$.(x.|.[y,z]). 4Construct a DAFG from a set of edges. For example,   f =  "f"  x =  "x"  y =  "y"  z =  "z"  g = mkTeam $ f.$.(x.|.[y,z]) KTo make a time homogeneous system. As an example, an MDP can be created as follows  x =  "x" u =  "u" r =  "r"  f =  "f" g =  "g" d =  "d"  2dynamics t = f(t-1).$.( x(t) .|. if t == 1 then [] else [x(t-1), u(t-1)] ) , ++ g(t) .$.( u(t) .|. map x[1..t] ++ map u[1..t-1] ) / ++ d(t) .$.( r(t) .|. [ x(t), u(t) ] )  mdp =  dynamics 3 !8Select nodes whose label satisfy a particular predicate "All variable nods #All reward nodes $All control factors % All factors &1find indices of parents from the index of a node '2find indices of children from the index of a node (5find indices of descendants from the index of a node )3find indices of ancestors from the index of a node *Hfind the indices of the ancestoral set from the indices of a given set. +Efind the indices of future nodes that satisfy a particular predicate ,Cfind the indices of past nodes that satisfy a particular predicate -$Pretty print the team specification .$Pretty print the team specification / Convert the graph to a dot file 0Convert the dot file to a pdf 1#Extensions of Data.Graph.Inductive Label of a particular node 2Labels of a list of nodes 3  !"#$%&'()*+,-./0123  !"#%$&')*(+,-./0123    !"#$%&'()*+,-./012&;A marked gream <4A class to convert a normal graph to a marked graph =A marked node of a graph >Visit ? Schedule @Mark A Change mark BChange schedule CThe mark of a marked node D"The node label of the marked node EThe scedule of a marked node F"The visit status of a marked node GAdd a mark to a marked node H Add a schedule to a marked node IAdd a visit to a marked node J&Remove all flags from the marked node K(Check if a marked node is marked on top L+Check if a marked node is marked on bottom M$Check if a marked node is scheduled N"Check if a marked node is visited OAll scheduled nodes PThe Bayes Ball algorithm Q*The main loop of the Bayes Ball algorithm RJCheck if a node is deterministic. Currently we simply check if its parent  is a control node. SModify a marked node T Mark a node USchedule a node VSchedule a list of nodes W Visit a node XClean a node of all marked Y4Filter out the result from the bayes ball algortihm 3Irrelevant nodes J The nodes that have not been visited from their parents are irrelevant 4Requisite observations N The observation nodes are thouse nodes in the condition that are marked as  visited 5Functionally determined nodes K Nodes that are irrelevant when we want to know about all variable nodes 6Effectively observed nodes M All the ancestors of the reward nodes that are functionally determined by  conditioned nodes. 70The graph restructuring algorithm of the paper. 8%Simplify all nodes of the graph once 90The graph simplification aglorithm of the paper M I believe that this algorithm will always converge. So, I do not stop the N loop after a finite number of iterations. If you find an example that does % not converge, please let me know. :  !"#$%&'()*+,-./012345678943567893456789 Z[\]^_`abcdef ghijklmnopqr      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk_lmcdnohipqr teams-0.0.1Data.Teams.GraphData.Teams.StructureData.Teams.Examples.Wit79Data.Teams.Examples.DecMdpTeamEdgeTypeBelief InfluenceEdgeVertexnamenamesisReward isNonReward isVariable isDynamics isControlisFactor attributeNodeFactorControlDynamicsVariable NonRewardRewardTimemkVertexmkReward mkNonReward mkDynamics mkControl.$..|.mkTeam mkTeamTime mkTeamTimeByselNodes variablesrewardscontrolsfactorsparentschildren descendants ancestors ancestoral futureNodes pastNodes printTeamshowTeam graphToDot printGraphlabellabels irrelevant observations determined effective simplifyAt simplifyOncesimplify edgeAttributeMTeam InitializableMarkedVisitScheduleMarkchMark chSchedulemarknodeschedulevisitaddMark addScheduleaddVisitclean isTopMarkedisBottomMarked isScheduled isVisitedscheduledNodes bayesBall doBayesBallisDeterministic modifyNodemarkNode scheduleNode scheduleNodes visitNode cleanNoderesultxx'ymrfcglddynamicsrtrt'u1u2g1g2decMdpdecMdp'