feat: add get_tensor on GameState more explicit for training than the minimal get_vec()
This commit is contained in:
parent
145ab7dcda
commit
aa7f5fe42a
4 changed files with 108 additions and 1000 deletions
|
|
@ -113,11 +113,11 @@ impl TricTrac {
|
|||
[self.get_score(1), self.get_score(2)]
|
||||
}
|
||||
|
||||
fn get_tensor(&self, player_idx: u64) -> Vec<i8> {
|
||||
fn get_tensor(&self, player_idx: u64) -> Vec<f32> {
|
||||
if player_idx == 0 {
|
||||
self.game_state.to_vec()
|
||||
self.game_state.to_tensor()
|
||||
} else {
|
||||
self.game_state.mirror().to_vec()
|
||||
self.game_state.mirror().to_tensor()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue