@@ -9,10 +9,10 @@ abstract class UnitSpec extends FlatSpec with Matchers with
99class ExampleSpec extends FlatSpec with Matchers {
1010
1111 " A NeuralNet" should " correctly convert a state and action into a featureVector" in {
12- var featureVetor = neuralNetFeatureVectorForStateAction(List (" X" , " " , " " , " " , " " , " " , " " , " " , " " ), 2 )
13- featureVetor should equal (Array (1.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 2 .0 ))
14- featureVetor = neuralNetFeatureVectorForStateAction(List (" X" , " " , " " , " O" , " " , " O" , " " , " " , " " ), 9 )
15- featureVetor should equal (Array (1.0 , 0.0 , 0.0 , - 1 .0 , 0.0 , - 1.0 , 0.0 , 0 .0 , 0.0 , 9 .0 ))
12+ var featureVetor = neuralNetFeatureVectorForStateAction(List (" X" , " " , " " , " " , " " , " " , " " , " " , " " ))
13+ featureVetor should equal (Array (1.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0 .0 ))
14+ featureVetor = neuralNetFeatureVectorForStateAction(List (" X" , " " , " " , " O" , " " , " O" , " " , " " , " " ))
15+ featureVetor should equal (Array (1.0 , 0.0 , 0.0 , 0 .0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 1.0 , 0.0 , 1.0 , 0 .0 , 0.0 , 0 .0 ))
1616 }
1717
1818 it should " be able to learn sin(x)" in {
0 commit comments