src/subgame_utils.cpp
// I always load probabilities for both players because I need the reach
// probabilities for both players in case we are performing nested subgame
// solving.  In addition, as long as we are zero-summing the T-values, we
// need the strategy for both players for the CBR computation.
I always load probabilities for both players because I need the reach
probabilities for both players in case we are performing nested subgame
solving.  In addition, as long as we are zero-summing the T-values, we
need the strategy for both players for the CBR computation.
I always load probabilities for both players because I need the reach probabilities for both players in case we are performing nested subgame solving . In addition as long as we are zero - summing the T - values we need the strategy for both players for the CBR computation .
unique_ptr<CFRValues> ReadSubgame(const string &action_sequence, BettingTrees *subtrees, int gbd,
				  const CardAbstraction &base_card_abstraction,
				  const CardAbstraction &subgame_card_abstraction,
				  const BettingAbstraction &base_betting_abstraction,
				  const BettingAbstraction &subgame_betting_abstraction,
				  const CFRConfig &base_cfr_config,
				  const CFRConfig &subgame_cfr_config,
				  const Buckets &subgame_buckets, ResolvingMethod method,
				  int root_bd_st, int root_bd, int asym_p) {
  int max_street = Game::MaxStreet();
  unique_ptr<bool []> subgame_streets(new bool[max_street + 1]);
  for (int st = 0; st <= max_street; ++st) {
    subgame_streets[st] = st >= subtrees->Root()->Street();
  }
  unique_ptr<CFRValues> sumprobs(new CFRValues(nullptr, subgame_streets.get(), gbd,
					       subtrees->Root()->Street(), subgame_buckets,
					       subtrees->GetBettingTree()));
  for (int st = 0; st <= max_street; ++st) {
    if (subgame_streets[st]) sumprobs->CreateStreetValues(st, CFRValueType::CFR_DOUBLE, false);
  }
  for (int target_pa = 0; target_pa <= 1; ++target_pa) {
    ReadSubgame(subtrees->Root(), action_sequence, gbd, base_card_abstraction,
		subgame_card_abstraction, base_betting_abstraction,
		subgame_betting_abstraction, base_cfr_config,
		subgame_cfr_config, method, sumprobs.get(), root_bd_st, root_bd,
		asym_p, target_pa, subtrees->Root()->Street());
  }
  return sumprobs;
}
unique_ptr < CFRValues > ReadSubgame ( const string & action_sequence , BettingTrees * subtrees , int gbd , const CardAbstraction & base_card_abstraction , const CardAbstraction & subgame_card_abstraction , const BettingAbstraction & base_betting_abstraction , const BettingAbstraction & subgame_betting_abstraction , const CFRConfig & base_cfr_config , const CFRConfig & subgame_cfr_config , const Buckets & subgame_buckets , ResolvingMethod method , int root_bd_st , int root_bd , int asym_p ) { int max_street = Game :: MaxStreet ( ) ; unique_ptr < bool [ ] > subgame_streets ( new bool [ max_street + 1 ] ) ; for ( int st = 0 ; st <= max_street ; ++ st ) { subgame_streets [ st ] = st >= subtrees -> Root ( ) -> Street ( ) ; } unique_ptr < CFRValues > sumprobs ( new CFRValues ( nullptr , subgame_streets . get ( ) , gbd , subtrees -> Root ( ) -> Street ( ) , subgame_buckets , subtrees -> GetBettingTree ( ) ) ) ; for ( int st = 0 ; st <= max_street ; ++ st ) { if ( subgame_streets [ st ] ) sumprobs -> CreateStreetValues ( st , CFRValueType :: CFR_DOUBLE , false ) ; } for ( int target_pa = 0 ; target_pa <= 1 ; ++ target_pa ) { ReadSubgame ( subtrees -> Root ( ) , action_sequence , gbd , base_card_abstraction , subgame_card_abstraction , base_betting_abstraction , subgame_betting_abstraction , base_cfr_config , subgame_cfr_config , method , sumprobs . get ( ) , root_bd_st , root_bd , asym_p , target_pa , subtrees -> Root ( ) -> Street ( ) ) ; } return sumprobs ; }
I always load probabilities for both players because I need the reach
probabilities for both players in case we are performing nested subgame
solving.
I always load probabilities for both players because I need the reach probabilities for both players in case we are performing nested subgame solving .
// Assume symmetric? // Buckets needed for num buckets and for knowing what streets are // bucketed. // Assume doubles