valanga 0.1.7__py3-none-any.whl → 0.1.8__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.
@@ -6,18 +6,17 @@ from dataclasses import dataclass
6
6
  from typing import Protocol
7
7
 
8
8
  from .game import State
9
- from .represention_for_evaluation import ContentRepresentation
10
9
 
11
10
 
12
- class CreateFromState[StateT: State, EvalIn](Protocol):
11
+ class CreateFromState[StateT: State, RepT](Protocol):
13
12
  """
14
13
  Protocol for creating a state representation from a state.
15
14
  """
16
15
 
17
- def __call__(self, state: StateT) -> ContentRepresentation[StateT, EvalIn]: ...
16
+ def __call__(self, state: StateT) -> RepT: ...
18
17
 
19
18
 
20
- class CreateFromStateAndModifications[StateT: State, EvalIn, StateModT](Protocol):
19
+ class CreateFromStateAndModifications[StateT: State, StateModT, RepT](Protocol):
21
20
  """
22
21
  Protocol for creating a state representation from a state and modifications.
23
22
  """
@@ -26,29 +25,29 @@ class CreateFromStateAndModifications[StateT: State, EvalIn, StateModT](Protocol
26
25
  self,
27
26
  state: StateT,
28
27
  state_modifications: StateModT,
29
- previous_state_representation: ContentRepresentation[StateT, EvalIn],
30
- ) -> ContentRepresentation[StateT, EvalIn]: ...
28
+ previous_state_representation: RepT,
29
+ ) -> RepT: ...
31
30
 
32
31
 
33
32
  @dataclass
34
- class RepresentationFactory[StateT: State, EvalIn, StateModT]:
33
+ class RepresentationFactory[StateT: State, StateModT, RepT]:
35
34
  """Factory for creating content representations from states and state modifications.
36
35
  Attributes:
37
36
  create_from_state: Function to create a content representation from a state.
38
37
  create_from_state_and_modifications: Function to create a content representation from a state and state modifications.
39
38
  """
40
39
 
41
- create_from_state: CreateFromState[StateT, EvalIn]
40
+ create_from_state: CreateFromState[StateT, RepT]
42
41
  create_from_state_and_modifications: CreateFromStateAndModifications[
43
- StateT, EvalIn, StateModT
42
+ StateT, StateModT, RepT
44
43
  ]
45
44
 
46
45
  def create_from_transition(
47
46
  self,
48
47
  state: StateT,
49
- previous_state_representation: ContentRepresentation[StateT, EvalIn] | None,
48
+ previous_state_representation: RepT | None,
50
49
  modifications: StateModT | None,
51
- ) -> ContentRepresentation[StateT, EvalIn]:
50
+ ) -> RepT:
52
51
  """Creates a content representation from a state transition.
53
52
  Args:
54
53
  state: The current state of the game.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: valanga
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: Shared types and utilities for evaluation
5
5
  Author-email: Victor Gabillon <victorgabillon@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -6,10 +6,10 @@ valanga/over_event.py,sha256=jUqN3CXq3e55TvDZatZKFlEOzJfho7M1Zr7VjZUhP6M,7908
6
6
  valanga/policy.py,sha256=TkqcOSePRhHqtuoMbCKe5qZbizvF5H9uG1_oEcIZsuA,1229
7
7
  valanga/progress_messsage.py,sha256=3LnOXSgyU84UkwcpsakcbPt_d3el2ojRSUClAwoPyEk,361
8
8
  valanga/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- valanga/representation_factory.py,sha256=LAIfLCBKTMVPDCZbcRtMQs_VIJwIHeaEH86BWV8PgTc,2456
9
+ valanga/representation_factory.py,sha256=O1w-zUWhwzgaHcLwYTWYVgEGSk3gV-DYKocvvcA9mvc,2218
10
10
  valanga/represention_for_evaluation.py,sha256=9yCCOuN-h9FnoLJrffKGQ-oXiiXzZT3rP4e5wwMYfys,1135
11
- valanga-0.1.7.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
12
- valanga-0.1.7.dist-info/METADATA,sha256=4qCW9MTi80M1_3RJSi2hNiQlqV70UbzaZ0_YbdRvjTU,44645
13
- valanga-0.1.7.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
14
- valanga-0.1.7.dist-info/top_level.txt,sha256=cKFLhxKDTqygHnc0xc_L8jDx6oNu5hSHqZ4UExU4xPo,8
15
- valanga-0.1.7.dist-info/RECORD,,
11
+ valanga-0.1.8.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
12
+ valanga-0.1.8.dist-info/METADATA,sha256=AtjW9ISJV59EYnskyevc9_qdvBNu1sP49_xiMlf7UCo,44645
13
+ valanga-0.1.8.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
14
+ valanga-0.1.8.dist-info/top_level.txt,sha256=cKFLhxKDTqygHnc0xc_L8jDx6oNu5hSHqZ4UExU4xPo,8
15
+ valanga-0.1.8.dist-info/RECORD,,