Skip to content

Commit c25a85d

Browse files
committed
Fix unit tests
1 parent 0d1f248 commit c25a85d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/test/scala/neuralNetTests.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ abstract class UnitSpec extends FlatSpec with Matchers with
99
class 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

Comments
 (0)