src/assemble_subgames2.cpp
// When we get to the target street, read the entire base strategy for
// this subtree into merged sumprobs.  Then go through and override parts
// with the subgame strategy.
When we get to the target street, read the entire base strategy for
this subtree into merged sumprobs.  Then go through and override parts
with the subgame strategy.
When we get to the target street read the entire base strategy for this subtree into merged sumprobs . Then go through and override parts with the subgame strategy .
void Assembler::WalkTrunk(Node *base_node, Node *subgame_node, int p, const string &action_sequence,
			  Writer **writers, int last_st) {
  if (base_node->Terminal()) return;
  int st = base_node->Street();
  if (st == solve_street_) {
    fprintf(stderr, "P%i %s\n", p, action_sequence.c_str());
    unique_ptr<BettingTrees> subtrees(new BettingTrees(subgame_node));
    WalkSubgame(subtrees.get()->Root(), p, action_sequence, writers);
    return;
  }
  int num_succs = base_node->NumSuccs();
  for (int s = 0; s < num_succs; ++s) {
    string action = base_node->ActionName(s);
    WalkTrunk(base_node->IthSucc(s), subgame_node->IthSucc(s), p, action_sequence + action,
	      writers, st);
  }
}
void Assembler :: WalkTrunk ( Node * base_node , Node * subgame_node , int p , const string & action_sequence , Writer * * writers , int last_st ) { if ( base_node -> Terminal ( ) ) return ; int st = base_node -> Street ( ) ; if ( st == solve_street_ ) { fprintf ( stderr , " \n " , p , action_sequence . c_str ( ) ) ; unique_ptr < BettingTrees > subtrees ( new BettingTrees ( subgame_node ) ) ; WalkSubgame ( subtrees . get ( ) -> Root ( ) , p , action_sequence , writers ) ; return ; } int num_succs = base_node -> NumSuccs ( ) ; for ( int s = 0 ; s < num_succs ; ++ s ) { string action = base_node -> ActionName ( s ) ; WalkTrunk ( base_node -> IthSucc ( s ) , subgame_node -> IthSucc ( s ) , p , action_sequence + action , writers , st ) ; } }
When we get to the target street, read the entire base strategy for
this subtree into merged sumprobs.
When we get to the target street read the entire base strategy for this subtree into merged sumprobs .