Skip to content

Commit e12d2b9

Browse files
committed
chore: drop reinforcement
1 parent 3a34d19 commit e12d2b9

File tree

7 files changed

+17
-364
lines changed

7 files changed

+17
-364
lines changed

crates/game-solver/src/disjoint_game.rs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ use crate::{game::{Game, Normal, NormalImpartial}, player::ImpartialPlayer};
88
/// two impartial normal combinatorial games.
99
///
1010
/// Since `Game` isn't object safe, we use `dyn Any` internally with downcast safety.
11+
///
12+
/// We restrict games to being normal impartial to force implementation of the marker trait.
1113
#[derive(Clone)]
12-
pub struct DisjointImpartialNormalGame<L: Game, R: Game> {
14+
pub struct DisjointImpartialNormalGame<L: Game + NormalImpartial, R: Game + NormalImpartial> {
1315
left: L,
1416
right: R
1517
}
@@ -31,9 +33,20 @@ pub enum DisjointMoveError<L: Game, R: Game> {
3133
type LeftMoveMap<L, R> = Box<dyn Fn(<L as Game>::Move) -> DisjointMove<L, R>>;
3234
type RightMoveMap<L, R> = Box<dyn Fn(<R as Game>::Move) -> DisjointMove<L, R>>;
3335

34-
impl<L: Game + Debug + 'static, R: Game + Debug + 'static> Normal for DisjointImpartialNormalGame<L, R> {}
35-
impl<L: Game + Debug + 'static, R: Game + Debug + 'static> NormalImpartial for DisjointImpartialNormalGame<L, R> {}
36-
impl<L: Game + Debug + 'static, R: Game + Debug + 'static> Game for DisjointImpartialNormalGame<L, R> {
36+
impl<
37+
L: Game + Debug + NormalImpartial + 'static,
38+
R: Game + Debug + NormalImpartial + 'static
39+
> Normal for DisjointImpartialNormalGame<L, R> {}
40+
41+
impl<
42+
L: Game + Debug + NormalImpartial + 'static,
43+
R: Game + Debug + NormalImpartial + 'static
44+
> NormalImpartial for DisjointImpartialNormalGame<L, R> {}
45+
46+
impl<
47+
L: Game + Debug + NormalImpartial + 'static,
48+
R: Game + Debug + NormalImpartial + 'static
49+
> Game for DisjointImpartialNormalGame<L, R> {
3750
type Move = DisjointMove<L, R>;
3851
type Iter<'a> = Interleave<
3952
Map<<L as Game>::Iter<'a>, LeftMoveMap<L, R>>,

crates/game-solver/src/reinforcement/agent.rs

Lines changed: 0 additions & 20 deletions
This file was deleted.

crates/game-solver/src/reinforcement/mod.rs

Lines changed: 0 additions & 278 deletions
This file was deleted.

crates/game-solver/src/reinforcement/state.rs

Lines changed: 0 additions & 27 deletions
This file was deleted.

crates/game-solver/src/reinforcement/strategy/explore.rs

Lines changed: 0 additions & 26 deletions
This file was deleted.

crates/game-solver/src/reinforcement/strategy/mod.rs

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)