graph-games-proto 0.3.2045__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 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:
@@ -4727,6 +4727,7 @@ def getfirstplayeridx(rng, num_players):
4727
4727
  return rng.randint(0, num_players-1)
4728
4728
 
4729
4729
 
4730
+ @dispatch(State, int)
4730
4731
  def get_legal_actions3(s, player_idx):
4731
4732
  return [a for a in s.legal_actions_3 if a.player_idx == player_idx]
4732
4733
 
@@ -4736,17 +4737,17 @@ def get_legal_actions(s, player_idx):
4736
4737
  return [a for a in s.legal_actions_3 if a.player_idx == player_idx]
4737
4738
 
4738
4739
 
4739
- @dispatch(State, int)
4740
- def get_goal_completions(s, player_idx):
4740
+ @dispatch(StateKernel, int)
4741
+ def get_goal_completions(kernel, player_idx):
4741
4742
  # print("len(get_goals(s, player_idx)): ", len(get_goals(s, player_idx)))
4742
4743
  # print("len(s.history): ", len(s.history))
4743
4744
  # print("player.cards: ", len(s.players[player_idx].cards))
4744
4745
  return [
4745
4746
  GoalCompletion(
4746
4747
  goal_uuid=goal.uuid,
4747
- complete=is_goal_complete(s, goal, player_idx),
4748
+ complete=is_goal_complete(kernel, goal, player_idx),
4748
4749
  )
4749
- for goal in get_goals(s.kernel, player_idx)
4750
+ for goal in get_goals(kernel, player_idx)
4750
4751
  ]
4751
4752
 
4752
4753
 
@@ -5242,7 +5243,7 @@ def getprivatestate(s, player_idx):
5242
5243
  player_score=getprivateplayerscore(s, s.player_scores_3[player_idx]),
5243
5244
  player=s.kernel.players[player_idx],
5244
5245
  legal_actions_3 = get_legal_actions3(s, player_idx),
5245
- goal_completions=get_goal_completions(s, player_idx),
5246
+ goal_completions=get_goal_completions(s.kernel, player_idx),
5246
5247
  )
5247
5248
 
5248
5249
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graph_games_proto
3
- Version: 0.3.2045
3
+ Version: 0.3.2046
4
4
  Requires-Dist: multipledispatch==1.0.0
5
5
  Requires-Dist: pyrsistent==0.20.0
6
6
  Requires-Dist: numpy==2.2.4
@@ -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=5FkQQV9pzpX8d5ss1XL1rR29ef6rTZgcM0U94aKcAI4,193861
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.2045.dist-info/METADATA,sha256=52qZ63D-sHB6TVNoa7FgJ_2_svgDpuPWsJLG8mnJuZg,188
7
- graph_games_proto-0.3.2045.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
- graph_games_proto-0.3.2045.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
- graph_games_proto-0.3.2045.dist-info/RECORD,,
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,,