Skip to content

Commit fe59c84

Browse files
committed
Update dependencies.
1 parent ed867c0 commit fe59c84

34 files changed

+3126
-1778
lines changed

Cargo.lock

Lines changed: 2700 additions & 1377 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,34 +28,35 @@ members = [
2828
]
2929

3030
[workspace.dependencies]
31-
rand = "0.8"
32-
rand_xoshiro = "0.6"
33-
rand_distr = "0.4"
34-
either = "1.12"
35-
itertools = "0.13"
31+
rand = "0.9"
32+
rand_xoshiro = "0.7"
33+
rand_distr = "0.5"
34+
either = "1.14"
35+
itertools = "0.14"
3636
num-traits = "0.2"
37-
ndarray = "0.15"
37+
ndarray = "0.16"
3838
crossbeam = "0.8"
3939
rayon = "1.10"
4040
num_cpus = "1.16"
41-
burn = { version = "0.13", default-features = false, features = [ "std" ] }
42-
strum = { version = "0.26", features = [ "derive" ] }
41+
burn = { version = "0.16", default-features = false, features = [ "std" ] }
42+
strum = { version = "0.27", features = [ "derive" ] }
4343
serde = "1.0"
4444
serde_json = "1.0"
45-
serde_with = "3.8"
46-
svg = "0.17"
45+
serde_with = "3.12"
46+
svg = "0.18"
4747
web-time = "1.1"
4848
sgf-parse = "4.2"
4949
log = "0.4"
5050
env_logger = "0.11"
51-
thiserror = "1.0"
51+
thiserror = "2.0"
5252
anyhow = "1.0"
5353
criterion = "0.5"
5454
clap = "4.5"
5555
humantime = "2.1"
5656
futures = "0.3"
57-
async-process = "2.2"
58-
postcard = "1.0"
57+
async-process = "2.3"
58+
postcard = "1.1"
59+
derive_more = "2.0"
5960

6061
[profile.dev]
6162
opt-level = 0

ai/src/ai.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::marker::PhantomData;
33
use crate::analysis::Analysis;
44
use either::Either;
55
use oppai_field::{field::Field, player::Player};
6-
use rand::{distributions::Standard, prelude::Distribution, Rng, SeedableRng};
6+
use rand::{distr::StandardUniform, prelude::Distribution, Rng, SeedableRng};
77

88
pub trait AI {
99
/// Analysis result of this AI.
@@ -22,7 +22,7 @@ pub trait AI {
2222
) -> Self::Analysis
2323
where
2424
R: Rng + SeedableRng<Seed = S> + Send,
25-
Standard: Distribution<S>,
25+
StandardUniform: Distribution<S>,
2626
SS: Fn() -> bool + Sync;
2727

2828
fn map<A: Analysis, C: Clone + 'static, AF: Fn(Self::Analysis) -> A, CF: Fn(C) -> Self::Confidence>(
@@ -71,7 +71,7 @@ impl<T: AI> AI for &mut T {
7171
) -> Self::Analysis
7272
where
7373
R: Rng + SeedableRng<Seed = S> + Send,
74-
Standard: Distribution<S>,
74+
StandardUniform: Distribution<S>,
7575
SS: Fn() -> bool + Sync,
7676
{
7777
(*self).analyze(rng, field, player, confidence, should_stop)
@@ -92,7 +92,7 @@ impl<A: AI, B: AI> AI for (A, B) {
9292
) -> Self::Analysis
9393
where
9494
R: Rng + SeedableRng<Seed = S> + Send,
95-
Standard: Distribution<S>,
95+
StandardUniform: Distribution<S>,
9696
SS: Fn() -> bool + Sync,
9797
{
9898
let analysis = self.0.analyze(
@@ -124,7 +124,7 @@ impl<A: AI, B: AI> AI for Either<A, B> {
124124
) -> Self::Analysis
125125
where
126126
R: Rng + SeedableRng<Seed = S> + Send,
127-
Standard: Distribution<S>,
127+
StandardUniform: Distribution<S>,
128128
SS: Fn() -> bool + Sync,
129129
{
130130
match self {
@@ -172,7 +172,7 @@ impl<
172172
) -> Self::Analysis
173173
where
174174
R: Rng + SeedableRng<Seed = S> + Send,
175-
Standard: Distribution<S>,
175+
StandardUniform: Distribution<S>,
176176
SS: Fn() -> bool + Sync,
177177
{
178178
let c = match confidence {

ai/src/analysis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub trait Analysis {
3131
Ordering::Greater => (pos1, value1),
3232
Ordering::Less => (pos2, value2),
3333
Ordering::Equal => {
34-
if rng.gen() {
34+
if rng.random() {
3535
(pos1, value1)
3636
} else {
3737
(pos2, value2)

ais/src/initial.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use oppai_field::{
44
player::Player,
55
};
66
use rand::{
7-
distributions::{Distribution, Standard},
7+
distr::{Distribution, StandardUniform},
88
Rng, SeedableRng,
99
};
1010
use std::{any::TypeId, cmp};
@@ -70,7 +70,7 @@ impl AI for Initial {
7070
) -> Self::Analysis
7171
where
7272
R: Rng + SeedableRng<Seed = S> + Send,
73-
Standard: Distribution<S>,
73+
StandardUniform: Distribution<S>,
7474
SS: Fn() -> bool + Sync,
7575
{
7676
SingleAnalysis {

ais/src/oppai.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use oppai_minimax::minimax::{Minimax as InnerMinimax, MinimaxConfig};
1616
use oppai_patterns::patterns::Patterns as InnerPatterns;
1717
use oppai_uct::uct::{UctConfig, UctRoot};
1818
use oppai_zero::{model::Model, zero::Zero as InnerZero};
19-
use rand::{distributions::Standard, prelude::Distribution, Rng, SeedableRng};
19+
use rand::{distr::StandardUniform, prelude::Distribution, Rng, SeedableRng};
2020
use std::{
2121
convert::identity,
2222
fmt::{Debug, Display},
@@ -183,7 +183,7 @@ impl<N: Float + Sum + Display + Debug + 'static, M: Model<N> + 'static> AI for O
183183
) -> Self::Analysis
184184
where
185185
R: Rng + SeedableRng<Seed = S> + Send,
186-
Standard: Distribution<S>,
186+
StandardUniform: Distribution<S>,
187187
SS: Fn() -> bool + Sync,
188188
{
189189
let ai = match self.config.solver {

ais/src/time_limited_ai.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use oppai_ai::ai::AI;
22
use oppai_field::{field::Field, player::Player};
3-
use rand::{distributions::Standard, prelude::Distribution, Rng, SeedableRng};
3+
use rand::{distr::StandardUniform, prelude::Distribution, Rng, SeedableRng};
44
use web_time::Duration;
55
#[cfg(target_arch = "wasm32")]
66
use web_time::Instant;
@@ -22,7 +22,7 @@ impl<I: AI> AI for TimeLimitedAI<I> {
2222
) -> Self::Analysis
2323
where
2424
R: Rng + SeedableRng<Seed = S> + Send,
25-
Standard: Distribution<S>,
25+
StandardUniform: Distribution<S>,
2626
SS: Fn() -> bool + Sync,
2727
{
2828
let atomic_should_stop = std::sync::atomic::AtomicBool::new(false);
@@ -58,7 +58,7 @@ impl<I: AI> AI for TimeLimitedAI<I> {
5858
) -> Self::Analysis
5959
where
6060
R: Rng + SeedableRng<Seed = S> + Send,
61-
Standard: Distribution<S>,
61+
StandardUniform: Distribution<S>,
6262
SS: Fn() -> bool + Sync,
6363
{
6464
let duration = self.0;

ais/src/uct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::any::TypeId;
33
use oppai_ai::{ai::AI, analysis::SimpleAnalysis};
44
use oppai_field::{field::Field, player::Player};
55
use oppai_uct::uct::UctRoot;
6-
use rand::{distributions::Standard, prelude::Distribution, Rng, SeedableRng};
6+
use rand::{distr::StandardUniform, prelude::Distribution, Rng, SeedableRng};
77

88
pub struct Uct(pub UctRoot);
99

@@ -21,7 +21,7 @@ impl AI for Uct {
2121
) -> Self::Analysis
2222
where
2323
R: Rng + SeedableRng<Seed = S> + Send,
24-
Standard: Distribution<S>,
24+
StandardUniform: Distribution<S>,
2525
SS: Fn() -> bool + Sync,
2626
{
2727
let (moves, confidence, estimation) =

ais/src/zero.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use num_traits::Float;
22
use oppai_ai::{ai::AI, analysis::SimpleAnalysis};
33
use oppai_field::{field::Field, player::Player};
44
use oppai_zero::{model::Model, zero::Zero as InnerZero};
5-
use rand::{distributions::Standard, prelude::Distribution, Rng, SeedableRng};
5+
use rand::{distr::StandardUniform, prelude::Distribution, Rng, SeedableRng};
66
use std::{
77
any::TypeId,
88
fmt::{Debug, Display},
@@ -25,7 +25,7 @@ impl<N: Float + Sum + Display + Debug + PartialOrd + 'static, M: Model<N> + 'sta
2525
) -> Self::Analysis
2626
where
2727
R: Rng + SeedableRng<Seed = S>,
28-
Standard: Distribution<S>,
28+
StandardUniform: Distribution<S>,
2929
SS: Fn() -> bool + Sync,
3030
{
3131
if let Ok((moves, confidence, estimation)) =

cli/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub fn cli_parse() -> Config {
1919
.author(clap::crate_authors!("\n"))
2020
.about(clap::crate_description!())
2121
.groups(groups())
22-
.args(&args())
22+
.args(args())
2323
.arg(
2424
Arg::new("patterns-file")
2525
.short('p')

0 commit comments

Comments
 (0)