graph-games-proto 0.3.2044__py3-none-any.whl → 0.3.2046__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- graph_games_proto/fns.py +7 -7
- {graph_games_proto-0.3.2044.dist-info → graph_games_proto-0.3.2046.dist-info}/METADATA +1 -1
- {graph_games_proto-0.3.2044.dist-info → graph_games_proto-0.3.2046.dist-info}/RECORD +5 -5
- {graph_games_proto-0.3.2044.dist-info → graph_games_proto-0.3.2046.dist-info}/WHEEL +0 -0
- {graph_games_proto-0.3.2044.dist-info → graph_games_proto-0.3.2046.dist-info}/top_level.txt +0 -0
graph_games_proto/fns.py
CHANGED
@@ -2802,7 +2802,7 @@ def score_public_items(state, player_idx):
|
|
2802
2802
|
def score_private_items(state, player_idx):
|
2803
2803
|
items = []
|
2804
2804
|
goaluuid2goal = {goal.uuid: goal for goal in state.kernel.goals}
|
2805
|
-
goal_completions = get_goal_completions(state, player_idx)
|
2805
|
+
goal_completions = get_goal_completions(state.kernel, player_idx)
|
2806
2806
|
complete_goal_uuids = [gc.goal_uuid for gc in goal_completions if gc.complete]
|
2807
2807
|
incomplete_goal_uuids = [gc.goal_uuid for gc in goal_completions if not gc.complete]
|
2808
2808
|
for complete_goal_uuid in complete_goal_uuids:
|
@@ -4434,7 +4434,6 @@ def get_player_max_allotted_time(s, player_idx):
|
|
4434
4434
|
return None
|
4435
4435
|
|
4436
4436
|
|
4437
|
-
@dispatch(State, Any)
|
4438
4437
|
def get_deadline(s, max_allotted_time):
|
4439
4438
|
if not max_allotted_time:
|
4440
4439
|
return None
|
@@ -4728,6 +4727,7 @@ def getfirstplayeridx(rng, num_players):
|
|
4728
4727
|
return rng.randint(0, num_players-1)
|
4729
4728
|
|
4730
4729
|
|
4730
|
+
@dispatch(State, int)
|
4731
4731
|
def get_legal_actions3(s, player_idx):
|
4732
4732
|
return [a for a in s.legal_actions_3 if a.player_idx == player_idx]
|
4733
4733
|
|
@@ -4737,17 +4737,17 @@ def get_legal_actions(s, player_idx):
|
|
4737
4737
|
return [a for a in s.legal_actions_3 if a.player_idx == player_idx]
|
4738
4738
|
|
4739
4739
|
|
4740
|
-
@dispatch(
|
4741
|
-
def get_goal_completions(
|
4740
|
+
@dispatch(StateKernel, int)
|
4741
|
+
def get_goal_completions(kernel, player_idx):
|
4742
4742
|
# print("len(get_goals(s, player_idx)): ", len(get_goals(s, player_idx)))
|
4743
4743
|
# print("len(s.history): ", len(s.history))
|
4744
4744
|
# print("player.cards: ", len(s.players[player_idx].cards))
|
4745
4745
|
return [
|
4746
4746
|
GoalCompletion(
|
4747
4747
|
goal_uuid=goal.uuid,
|
4748
|
-
complete=is_goal_complete(
|
4748
|
+
complete=is_goal_complete(kernel, goal, player_idx),
|
4749
4749
|
)
|
4750
|
-
for goal in get_goals(
|
4750
|
+
for goal in get_goals(kernel, player_idx)
|
4751
4751
|
]
|
4752
4752
|
|
4753
4753
|
|
@@ -5243,7 +5243,7 @@ def getprivatestate(s, player_idx):
|
|
5243
5243
|
player_score=getprivateplayerscore(s, s.player_scores_3[player_idx]),
|
5244
5244
|
player=s.kernel.players[player_idx],
|
5245
5245
|
legal_actions_3 = get_legal_actions3(s, player_idx),
|
5246
|
-
goal_completions=get_goal_completions(s, player_idx),
|
5246
|
+
goal_completions=get_goal_completions(s.kernel, player_idx),
|
5247
5247
|
)
|
5248
5248
|
|
5249
5249
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
graph_games_proto/__init__.py,sha256=_EVQR-51XehfH45XZlba1WPdx3omS3Gm1nTwrgGyn2Q,667
|
2
2
|
graph_games_proto/all_types.py,sha256=IpbwftEcHS5Ewz-saFNk0lO9FvcbuHG36odRTayCXUk,54911
|
3
|
-
graph_games_proto/fns.py,sha256=
|
3
|
+
graph_games_proto/fns.py,sha256=SmHDJoY9wjq5IeBxeyuSyVXYxdz7dYupRogTdayJDds,193911
|
4
4
|
graph_games_proto/main.py,sha256=fj2U7KcwrpZtuUhjOX5yVxY18LZvvsxDFYZ_S5mxe04,145
|
5
5
|
graph_games_proto/state.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
graph_games_proto-0.3.
|
7
|
-
graph_games_proto-0.3.
|
8
|
-
graph_games_proto-0.3.
|
9
|
-
graph_games_proto-0.3.
|
6
|
+
graph_games_proto-0.3.2046.dist-info/METADATA,sha256=daJ0oF_WznJhx7VeKzX9krRvxSPogeYA0sFVYmoO5vk,188
|
7
|
+
graph_games_proto-0.3.2046.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
8
|
+
graph_games_proto-0.3.2046.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
|
9
|
+
graph_games_proto-0.3.2046.dist-info/RECORD,,
|
File without changes
|
File without changes
|