Skip to content

Commit

Permalink
Revise MixedBehaviorProfile.belief to allow for general node referenc…
Browse files Browse the repository at this point in the history
…e selector.

Closes #355.
  • Loading branch information
Konstantinos Varsos authored and tturocy committed Oct 24, 2023
1 parent d401f7c commit 1b23240
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pygambit/behav.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class MixedBehaviorProfile:
"""
return self._is_defined_at(self.game._resolve_infoset(infoset, 'is_defined_at'))

def belief(self, node: Node):
def belief(self, node: typing.Union[Node, str]):
"""Returns the conditional probability that a node is reached, given that
its information set is reached.
Expand All @@ -271,7 +271,7 @@ class MixedBehaviorProfile:
"""
if node.game != self.game:
raise MismatchError("belief: node must be part of the same game as the profile")
return self._belief(node)
return self._belief(self.game._resolve_node(node, 'belief'))

def payoff(self, player: typing.Union[Player, str]):
"""Returns the expected payoff to a player if all players play
Expand Down

0 comments on commit 1b23240

Please sign in to comment.