Score on criteria count, not sample count
This commit is contained in:
@@ -13,12 +13,14 @@ func (s *Sample) SetInputs(state *vm.State) {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Sample) OutputsMatch(state *vm.State) bool {
|
||||
func (s *Sample) matchingOuts(state *vm.State) uint64 {
|
||||
ret := uint64(0)
|
||||
|
||||
for i, val := range s.Out {
|
||||
if state.GlobalMemory().MustReadUnsigned(uint64(i)) != val {
|
||||
return false
|
||||
if state.GlobalMemory().MustReadUnsigned(uint64(i)) == val {
|
||||
ret++
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
return ret
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user