Skip to content

Commit

Permalink
chore: drop reinforcement
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoDog896 committed Nov 4, 2024
1 parent 3a34d19 commit e12d2b9
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 364 deletions.
21 changes: 17 additions & 4 deletions crates/game-solver/src/disjoint_game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ use crate::{game::{Game, Normal, NormalImpartial}, player::ImpartialPlayer};
/// two impartial normal combinatorial games.
///
/// Since `Game` isn't object safe, we use `dyn Any` internally with downcast safety.
///
/// We restrict games to being normal impartial to force implementation of the marker trait.
#[derive(Clone)]
pub struct DisjointImpartialNormalGame<L: Game, R: Game> {
pub struct DisjointImpartialNormalGame<L: Game + NormalImpartial, R: Game + NormalImpartial> {
left: L,
right: R
}
Expand All @@ -31,9 +33,20 @@ pub enum DisjointMoveError<L: Game, R: Game> {
type LeftMoveMap<L, R> = Box<dyn Fn(<L as Game>::Move) -> DisjointMove<L, R>>;
type RightMoveMap<L, R> = Box<dyn Fn(<R as Game>::Move) -> DisjointMove<L, R>>;

impl<L: Game + Debug + 'static, R: Game + Debug + 'static> Normal for DisjointImpartialNormalGame<L, R> {}
impl<L: Game + Debug + 'static, R: Game + Debug + 'static> NormalImpartial for DisjointImpartialNormalGame<L, R> {}
impl<L: Game + Debug + 'static, R: Game + Debug + 'static> Game for DisjointImpartialNormalGame<L, R> {
impl<
L: Game + Debug + NormalImpartial + 'static,
R: Game + Debug + NormalImpartial + 'static
> Normal for DisjointImpartialNormalGame<L, R> {}

impl<
L: Game + Debug + NormalImpartial + 'static,
R: Game + Debug + NormalImpartial + 'static
> NormalImpartial for DisjointImpartialNormalGame<L, R> {}

impl<
L: Game + Debug + NormalImpartial + 'static,
R: Game + Debug + NormalImpartial + 'static
> Game for DisjointImpartialNormalGame<L, R> {
type Move = DisjointMove<L, R>;
type Iter<'a> = Interleave<
Map<<L as Game>::Iter<'a>, LeftMoveMap<L, R>>,
Expand Down
20 changes: 0 additions & 20 deletions crates/game-solver/src/reinforcement/agent.rs

This file was deleted.

278 changes: 0 additions & 278 deletions crates/game-solver/src/reinforcement/mod.rs

This file was deleted.

27 changes: 0 additions & 27 deletions crates/game-solver/src/reinforcement/state.rs

This file was deleted.

26 changes: 0 additions & 26 deletions crates/game-solver/src/reinforcement/strategy/explore.rs

This file was deleted.

2 changes: 0 additions & 2 deletions crates/game-solver/src/reinforcement/strategy/mod.rs

This file was deleted.

Loading

0 comments on commit e12d2b9

Please sign in to comment.