diff options
| author | Dylan <boss@tehbox.org> | 2026-11-09 23:00:58 +1300 |
|---|---|---|
| committer | Dylan <boss@tehbox.org> | 2026-11-09 23:00:58 +1300 |
| commit | 4eea7f726b5a7e0a55716a5c87e398dfb65fceb7 (patch) | |
| tree | 5ee3c289acbdf22f20d3b10c3a43fced6f085a1b /src/main.rs | |
| parent | 76fde82da0ef09d3635362e1fbf2a289c3d2c6dd (diff) | |
| download | tigers-and-sheep-4eea7f726b5a7e0a55716a5c87e398dfb65fceb7.tar.gz tigers-and-sheep-4eea7f726b5a7e0a55716a5c87e398dfb65fceb7.zip | |
refactor: Drop the neural command in favour of play's -S/-T weights files
-S and -T already accept a weights file, so the neural subcommand was
only a shorthand for one of them. Update the README and CLAUDE.md to
show the play form instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/src/main.rs b/src/main.rs index 5237100..9cd8e4c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ use std::{path::PathBuf, time::Duration}; -use clap::{Args, Parser, Subcommand, ValueEnum}; +use clap::{Args, Parser, Subcommand}; use crate::{board::Outcome, claude_player::ClaudePlayer, game::GameHandler, local_player::LocalPlayer, network::Network, neural_player::NeuralPlayer, player::Player}; @@ -35,18 +35,6 @@ enum Command { /// Play a game in the terminal (the default) Play(PlayArgs), - /// Play against a trained network - Neural - { - /// Weights file written by `train` - weights: PathBuf, - /// The side you play - #[arg(value_enum, default_value_t = Side::Sheep)] - side: Side, - /// Seconds the network may think per move - #[arg(short, long, default_value_t = 2.0)] - time: f64, - }, /// Time the computer player's search on fixed positions, without the TUI Bench { @@ -93,13 +81,6 @@ fn parse_player(s: &str) -> Result<PlayerKind, String> } } -#[derive(Clone, Copy, ValueEnum)] -enum Side -{ - Sheep, - Tiger, -} - #[derive(Args)] struct TrainArgs { @@ -190,17 +171,6 @@ fn main() -> std::io::Result<()> Ok(()) } Some(Command::Train(args)) => train::run(&args.into()), - Some(Command::Neural { weights, side, time }) => - { - let human = PlayerKind::Human; - let computer = PlayerKind::Neural(weights); - let (sheep, tiger) = match side - { - Side::Sheep => (human, computer), - Side::Tiger => (computer, human), - }; - play(PlayArgs { sheep, tiger, time }) - } Some(Command::Play(args)) => play(args), None => play(cli.play), } |
