Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulsavani committed Mar 15, 2024
1 parent 963625c commit d236f40
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/games/game.cc
Original file line number Diff line number Diff line change
Expand Up @@ -532,15 +532,14 @@ template <class T> MixedStrategyProfile<T> MixedStrategyProfile<T>::ToFullSuppor
template <class T> void MixedStrategyProfile<T>::ComputePayoffs() const
{
if (!map_profile_payoffs.empty()) {
// cache is valid, don't compute anything, simply return
// caches (map_profile_payoffs and map_strategy_payoffs) are valid,
// so don't compute anything, simply return
return;
}

for (auto player : m_rep->m_support.GetPlayers()) {
map_profile_payoffs[player] = GetPayoff(player);
// values of the player's strategies
for (auto strategy : m_rep->m_support.GetStrategies(player)) {
// const T &prob = (*this)[strategy];
map_strategy_payoffs[player][strategy] = GetPayoff(strategy);
}
}
Expand Down

0 comments on commit d236f40

Please sign in to comment.