Skip to content

Commit

Permalink
Merge pull request #1244 from google-deepmind:lanctot-patch-59
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 652518556
Change-Id: I1fbca2a9f77d0cc5c2a585a5a89a0fdc479bd0be
  • Loading branch information
lanctot committed Jul 15, 2024
2 parents 6341ae2 + 76a3c79 commit 490892c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions open_spiel/python/egt/heuristic_payoff_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import abc
import collections
import math

import numpy as np

Expand Down Expand Up @@ -261,15 +262,18 @@ class _PayoffTableInterface(metaclass=abc.ABCMeta):
def __call__(self):
"""Returns a view of the table as a np.array."""

@abc.abstractproperty
@property
@abc.abstractmethod
def num_strategies(self):
pass

@abc.abstractproperty
@property
@abc.abstractmethod
def num_players(self):
pass

@abc.abstractproperty
@property
@abc.abstractmethod
def num_rows(self):
pass

Expand Down Expand Up @@ -501,7 +505,7 @@ def _multinomial_coefficients(distributions):
Args:
distributions: The distributions table [num_rows, num_strategies].
"""
v_factorial = np.vectorize(np.math.factorial)
v_factorial = np.vectorize(math.factorial)
# Multinomial coefficients (one per distribution Ni).
# ( P )
# ( Ni1, Ni1, ... Nik )
Expand Down

0 comments on commit 490892c

Please sign in to comment.