Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 33c1196

Browse files
committedJul 10, 2018
got a basic reward function working
1 parent e77589a commit 33c1196

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎cc2/reward.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
def reward(R, gamma):
2-
return -1.0 # TODO
2+
# return -1.0
3+
k = 0
4+
total = 0
5+
coef = gamma**k
6+
while coef > 0.000001:
7+
total += coef * R
8+
k += 1
9+
coef = gamma**k
10+
return total

0 commit comments

Comments
 (0)
Please sign in to comment.