-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66b74f8
commit 3d43977
Showing
1 changed file
with
19 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
use std::f64::consts::SQRT_2; | ||
|
||
pub struct Params { | ||
cpuct: Param, | ||
cpuct: Param, | ||
} | ||
|
||
impl Params { | ||
pub fn new() -> Params { | ||
Params { | ||
cpuct: Param::new(SQRT_2, 1.0, 10.0), | ||
} | ||
} | ||
pub fn cpuct(&self) -> f64 { | ||
self.cpuct.val | ||
} | ||
pub fn new() -> Params { | ||
Params { | ||
cpuct: Param::new(SQRT_2, 1.0, 10.0), | ||
} | ||
} | ||
pub fn cpuct(&self) -> f64 { | ||
self.cpuct.val | ||
} | ||
} | ||
|
||
pub struct Param { | ||
val: f64, | ||
min: f64, | ||
max: f64, | ||
val: f64, | ||
min: f64, | ||
max: f64, | ||
} | ||
|
||
impl Param { | ||
pub fn new(val: f64, min: f64, max: f64) -> Param { | ||
Param{val, min, max} | ||
} | ||
pub fn new(val: f64, min: f64, max: f64) -> Param { | ||
Param { val, min, max } | ||
} | ||
|
||
pub fn set(&mut self, val: f64) { | ||
self.val = val; | ||
} | ||
} | ||
pub fn set(&mut self, val: f64) { | ||
self.val = val; | ||
} | ||
} |