Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit c24a373

Browse files
committed
totalIterations -> iterationCount
1 parent 3511a05 commit c24a373

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Gym/Blackjack/main.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import TensorFlow
1818
let gym = Python.import("gym")
1919
let environment = gym.make("Blackjack-v0")
2020

21-
let totalIterations = 10000
22-
let learningPhase = totalIterations * 5 / 100
21+
let iterationCount = 10000
22+
let learningPhase = iterationCount * 5 / 100
2323

2424
typealias Strategy = Bool
2525

@@ -152,7 +152,7 @@ let learner = Solver()
152152
for solver in SolverType.allCases {
153153
var totalReward = 0
154154

155-
for i in 1...totalIterations {
155+
for i in 1...iterationCount {
156156
var isDone = false
157157
environment.reset()
158158

@@ -178,5 +178,5 @@ for solver in SolverType.allCases {
178178
}
179179
}
180180
}
181-
print("Solver: \(solver), Total reward: \(totalReward) / \(totalIterations) trials")
181+
print("Solver: \(solver), Total reward: \(totalReward) / \(iterationCount) trials")
182182
}

0 commit comments

Comments
 (0)