1 | <?php |
||
8 | class AlphaBeta |
||
9 | { |
||
10 | /** |
||
11 | * @var float |
||
12 | */ |
||
13 | public $alpha; |
||
14 | |||
15 | /** |
||
16 | * @var float |
||
17 | */ |
||
18 | public $beta; |
||
19 | |||
20 | public function __construct(float $alpha, float $beta) |
||
25 | |||
26 | public static function initial(): AlphaBeta |
||
30 | |||
31 | /** |
||
32 | * Update the constraint with new information |
||
33 | */ |
||
34 | public function update(Evaluation $evaluation, NodeType $nodeType) |
||
42 | |||
43 | /** |
||
44 | * Check whether the value ranges (alpha..inf and -inf..beta) still overlap |
||
45 | * If not, the conclusion is that the game tree branch can be pruned. |
||
46 | */ |
||
47 | public function isPositiveRange(): bool |
||
51 | |||
52 | public function __toString(): string |
||
56 | } |
||
57 |