graph-games-proto 0.3.1898__py3-none-any.whl → 0.3.1899__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 +16 -1
- {graph_games_proto-0.3.1898.dist-info → graph_games_proto-0.3.1899.dist-info}/METADATA +1 -1
- {graph_games_proto-0.3.1898.dist-info → graph_games_proto-0.3.1899.dist-info}/RECORD +5 -5
- {graph_games_proto-0.3.1898.dist-info → graph_games_proto-0.3.1899.dist-info}/WHEEL +0 -0
- {graph_games_proto-0.3.1898.dist-info → graph_games_proto-0.3.1899.dist-info}/top_level.txt +0 -0
graph_games_proto/fns.py
CHANGED
@@ -4078,8 +4078,21 @@ class StateKernal(PClass):
|
|
4078
4078
|
history = field(type=list) # List[PublicAction]
|
4079
4079
|
player_scores = field(type=list) # List[PlayerScore]
|
4080
4080
|
game_config = field(type=GameConfig)
|
4081
|
+
uuid2edge = field(type=dict) # Dict[str, BiEdge]
|
4082
|
+
idx2path = field(type=list) # List[Path2]
|
4083
|
+
uuid2segment = field(type=dict) # Dict[str, Segment]
|
4084
|
+
|
4081
4085
|
|
4082
4086
|
def init_state_kernal(**kwargs):
|
4087
|
+
uuid2edge = {}
|
4088
|
+
idx2path = []
|
4089
|
+
uuid2segment = {}
|
4090
|
+
for edge in kwargs.get('edges'):
|
4091
|
+
uuid2edge[edge.uuid] = edge
|
4092
|
+
for path in edge.paths:
|
4093
|
+
idx2path.append(path)
|
4094
|
+
for segment in path.segments:
|
4095
|
+
uuid2segment[segment.uuid] = segment
|
4083
4096
|
return StateKernal(
|
4084
4097
|
edges=kwargs.get('edges'),
|
4085
4098
|
decks=kwargs.get('decks'),
|
@@ -4089,10 +4102,12 @@ def init_state_kernal(**kwargs):
|
|
4089
4102
|
history=kwargs.get('history'),
|
4090
4103
|
player_scores=kwargs.get('player_scores'),
|
4091
4104
|
game_config=kwargs.get('game_config'),
|
4105
|
+
uuid2edge=uuid2edge,
|
4106
|
+
idx2path=idx2path,
|
4107
|
+
uuid2segment=uuid2segment,
|
4092
4108
|
)
|
4093
4109
|
|
4094
4110
|
|
4095
|
-
|
4096
4111
|
def getnextstate2(s, a, log=False):
|
4097
4112
|
is_legal, reason = isactionlegal2(s, a)
|
4098
4113
|
if not is_legal:
|
@@ -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=KTIphQZY1BFWH22Ujqu4MdBjHY1d16JLt0Exf9lH-uU,187823
|
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.1899.dist-info/METADATA,sha256=jLL2r4ROFRYQwBWIy1FCaLuRyYUuAPewICilDfng0lw,188
|
7
|
+
graph_games_proto-0.3.1899.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
8
|
+
graph_games_proto-0.3.1899.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
|
9
|
+
graph_games_proto-0.3.1899.dist-info/RECORD,,
|
File without changes
|
File without changes
|