diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml new file mode 100644 index 0000000..a203c8f --- /dev/null +++ b/.github/workflows/typos.yml @@ -0,0 +1,13 @@ +name: Spell Check +on: [pull_request] + +jobs: + run: + name: Spell Check + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v4 + + - name: Check spelling of entire workspace + uses: crate-ci/typos@master diff --git a/crates/game-solver/src/reinforcement/agent.rs b/crates/game-solver/src/reinforcement/agent.rs index 9c55312..313cca9 100644 --- a/crates/game-solver/src/reinforcement/agent.rs +++ b/crates/game-solver/src/reinforcement/agent.rs @@ -8,7 +8,7 @@ pub trait Agent { /// Takes the given action, possibly mutating the current `State`. fn take_action(&mut self, action: &S::A); /// Takes a random action from the set of possible actions from this `State`. The default - /// implementation uses [State::random_action()](trait.State.html#method.random_action) to + /// implementation uses [`State::random_action()`](trait.State.html#method.random_action) to /// determine the action to be taken. fn pick_random_action(&mut self) -> S::A { let action = self.current_state().random_action(); diff --git a/crates/game-solver/src/reinforcement/mod.rs b/crates/game-solver/src/reinforcement/mod.rs index 773b4da..f7963ab 100644 --- a/crates/game-solver/src/reinforcement/mod.rs +++ b/crates/game-solver/src/reinforcement/mod.rs @@ -30,8 +30,8 @@ struct QNetWorkConfig. +/// and . pub struct DQNAgentTrainer< S, const STATE_SIZE: usize, diff --git a/crates/game-solver/src/transposition.rs b/crates/game-solver/src/transposition.rs index ca45b21..b229f04 100644 --- a/crates/game-solver/src/transposition.rs +++ b/crates/game-solver/src/transposition.rs @@ -74,13 +74,13 @@ impl< } /// Create a new transposition cache with - /// an estimated 3/4ths of the remaining memory. + /// an estimated three fourths of the remaining memory. #[must_use] pub fn new() -> Self { let score_size = std::mem::size_of::() as u64; Self::with_capacity( - // get 3/4ths of the memory, and divide that by the size of a score + // get three fourths of the memory, and divide that by the size of a score // to get the number of scores that can fit in the cache (sysinfo::System::new_all().total_memory() * 3 / 4) / score_size, ) diff --git a/crates/games/src/chomp/mod.rs b/crates/games/src/chomp/mod.rs index a89294b..c6740c1 100644 --- a/crates/games/src/chomp/mod.rs +++ b/crates/games/src/chomp/mod.rs @@ -1,4 +1,5 @@ -#[doc = include_str!("./README.md")] +#![doc = include_str!("./README.md")] + pub mod cli; use array2d::Array2D; diff --git a/crates/games/src/domineering/mod.rs b/crates/games/src/domineering/mod.rs index c19fcb9..6c68637 100644 --- a/crates/games/src/domineering/mod.rs +++ b/crates/games/src/domineering/mod.rs @@ -1,3 +1,5 @@ +#![doc = include_str!("./README.md")] + pub mod cli; use array2d::Array2D; diff --git a/crates/games/src/nim/mod.rs b/crates/games/src/nim/mod.rs index 8152300..a63bcc9 100644 --- a/crates/games/src/nim/mod.rs +++ b/crates/games/src/nim/mod.rs @@ -1,4 +1,5 @@ -#[doc = include_str!("./README.md")] +#![doc = include_str!("./README.md")] + pub mod cli; use game_solver::game::{Game, ZeroSumPlayer}; diff --git a/crates/games/src/order_and_chaos/mod.rs b/crates/games/src/order_and_chaos/mod.rs index 941d5a8..48b6d3d 100644 --- a/crates/games/src/order_and_chaos/mod.rs +++ b/crates/games/src/order_and_chaos/mod.rs @@ -1,4 +1,5 @@ -#[doc = include_str!("./README.md")] +#![doc = include_str!("./README.md")] + pub mod cli; use array2d::Array2D; diff --git a/crates/games/src/reversi/mod.rs b/crates/games/src/reversi/mod.rs index 496660d..c93f96a 100644 --- a/crates/games/src/reversi/mod.rs +++ b/crates/games/src/reversi/mod.rs @@ -1,4 +1,5 @@ -#[doc = include_str!("./README.md")] +#![doc = include_str!("./README.md")] + pub mod cli; use array2d::Array2D; diff --git a/crates/games/src/tic_tac_toe/mod.rs b/crates/games/src/tic_tac_toe/mod.rs index 50b0bf2..313d665 100644 --- a/crates/games/src/tic_tac_toe/mod.rs +++ b/crates/games/src/tic_tac_toe/mod.rs @@ -1,4 +1,5 @@ -#[doc = include_str!("./README.md")] +#![doc = include_str!("./README.md")] + pub mod cli; use game_solver::game::{Game, ZeroSumPlayer};