Skip to content

Commit 97de871

Browse files
committed
refactored reward values for proper scaling
1 parent 7362795 commit 97de871

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sources/Fuzzilli/Fuzzer.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,27 +1108,27 @@ public class Fuzzer {
11081108

11091109
public func adjustMutatorWeightsForCrash() {
11101110
guard let runtimeMutators = mutators as? RuntimeWeightedList<Mutator> else { return }
1111-
runtimeMutators.updateBatch(runtimeMutators.getLastElements(), reward: 50000.0)
1111+
runtimeMutators.updateBatch(runtimeMutators.getLastElements(), reward: 500.0)
11121112
}
11131113

11141114
public func adjustMutatorWeightsForInteresting() {
11151115
guard let runtimeMutators = mutators as? RuntimeWeightedList<Mutator> else { return }
1116-
runtimeMutators.updateBatch(runtimeMutators.getLastElements(), reward: 50.0)
1116+
runtimeMutators.updateBatch(runtimeMutators.getLastElements(), reward: 1.5)
11171117
}
11181118

11191119
public func adjustMutatorWeightsForValid() {
11201120
guard let runtimeMutators = mutators as? RuntimeWeightedList<Mutator> else { return }
1121-
runtimeMutators.updateBatch(runtimeMutators.getLastElements(), reward: 0.0125)
1121+
runtimeMutators.updateBatch(runtimeMutators.getLastElements(), reward: 1.0)
11221122
}
11231123

11241124
public func adjustMutatorWeightsForInvalid() {
11251125
guard let runtimeMutators = mutators as? RuntimeWeightedList<Mutator> else { return }
1126-
runtimeMutators.updateBatch(runtimeMutators.getLastElements(), reward: 0.045)
1126+
runtimeMutators.updateBatch(runtimeMutators.getLastElements(), reward: 1.0)
11271127
}
11281128

11291129
public func adjustMutatorWeightsForTimeout() {
11301130
guard let runtimeMutators = mutators as? RuntimeWeightedList<Mutator> else { return }
1131-
runtimeMutators.updateBatch(runtimeMutators.getLastElements(), reward: 0.045)
1131+
runtimeMutators.updateBatch(runtimeMutators.getLastElements(), reward: 1.0)
11321132
}
11331133

11341134
/// A pending corpus import job together with some statistics.

0 commit comments

Comments
 (0)