@@ -3,11 +3,11 @@ use super::abstractor::Abstractor;
33use crate :: cards:: isomorphism:: Isomorphism ;
44use crate :: mccfr:: bucket:: Bucket ;
55use crate :: mccfr:: bucket:: Path ;
6- use crate :: mccfr:: data:: Vertex ;
76use crate :: mccfr:: edge:: Edge ;
87use crate :: mccfr:: node:: Node ;
98use crate :: mccfr:: player:: Player ;
109use crate :: mccfr:: profile:: Profile ;
10+ use crate :: mccfr:: spot:: Spot ;
1111use crate :: play:: game:: Game ;
1212use crate :: Probability ;
1313use rand:: distributions:: Distribution ;
@@ -35,7 +35,7 @@ impl Sampler {
3535 /// compared to chance sampling, internal sampling, or full tree sampling.
3636 ///
3737 /// i think this could also be modified into a recursive CFR calcuation
38- pub fn sample ( & self , node : & Node , profile : & Profile ) -> Vec < ( Vertex , Edge ) > {
38+ pub fn sample ( & self , node : & Node , profile : & Profile ) -> Vec < ( Spot , Edge ) > {
3939 let mut children = self . children ( node) ;
4040 // terminal nodes have no children and we sample all possible actions for the traverser
4141 if node. player ( ) == profile. walker ( ) || children. is_empty ( ) {
@@ -68,7 +68,7 @@ impl Sampler {
6868
6969 /// produce the children of a Node.
7070 /// we may need some Trainer-level references to produce children
71- fn children ( & self , node : & Node ) -> Vec < ( Vertex , Edge ) > {
71+ fn children ( & self , node : & Node ) -> Vec < ( Spot , Edge ) > {
7272 let ref game = node. datum ( ) . game ( ) ;
7373 let ref past = node. history ( ) . into_iter ( ) . collect :: < Vec < & Edge > > ( ) ;
7474 game. children ( )
@@ -79,16 +79,16 @@ impl Sampler {
7979 }
8080 /// extend a path with an Edge
8181 /// wrap the (Game, Bucket) in a Data
82- fn explore ( & self , game : Game , edge : Edge , history : & Vec < & Edge > ) -> ( Vertex , Edge ) {
82+ fn explore ( & self , game : Game , edge : Edge , history : & Vec < & Edge > ) -> ( Spot , Edge ) {
8383 let mut history = history. clone ( ) ;
8484 history. push ( & edge) ;
8585 ( self . data ( game, history) , edge)
8686 }
8787 /// generate a Bucket from Game
8888 /// wrap the (Game, Bucket) in a Data
89- fn data ( & self , game : Game , path : Vec < & Edge > ) -> Vertex {
89+ fn data ( & self , game : Game , path : Vec < & Edge > ) -> Spot {
9090 let bucket = self . bucket ( & game, & path) ;
91- Vertex :: from ( ( game, bucket) )
91+ Spot :: from ( ( game, bucket) )
9292 }
9393 /// inddd
9494 fn bucket ( & self , game : & Game , path : & Vec < & Edge > ) -> Bucket {
0 commit comments