def __hash__(self):
        """
        Allows states to be keys of dictionaries.
        """
        for i, state in enumerate(self.agentStates):
            try:
                int(hash(state))
            except __HOLE__ as e:
                print e
                # hash(state)
        return (
            int((hash(tuple(self.agentStates)) + 13 * hash(self.food) + 113 *
                hash(tuple(self.capsules)) + 7 * hash(self.score)) % 1048575)
        )
dataset/ETHPy150Open rlpy/rlpy/rlpy/Domains/PacmanPackage/game.py/GameStateData.__hash__