Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit e2f5a01

Browse files
committed
pass tests
1 parent a9c92b9 commit e2f5a01

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test/components/approximators.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
@testset "Approximators" begin
22

33
@testset "TabularApproximator" begin
4-
A = TabularApproximator(ones(3))
4+
A = TabularVApproximator(;n_state=2,opt=InvDecay(1.0))
55

6-
@test A(1) == 1.0
7-
@test A(2) == 1.0
6+
@test A(1) == 0.
7+
@test A(2) == 0.
88

9-
update!(A, 2 => 3.0)
10-
@test A(2) == 4.0
9+
update!(A, 2 => A(2)-3.0)
10+
@test A(2) == 1.5
11+
update!(A, 2 => A(2)-6.0)
12+
@test A(2) == 3.
1113
end
1214

1315
@testset "NeuralNetworkApproximator" begin

0 commit comments

Comments
 (0)