Skip to content

Commit e78aa46

Browse files
author
Dharanish
committed
Fix bugs with SARTSATraces
Bug 1 - When pushing more traces into CircularArraySARTSATraces than its capacity, the state and action traces are not in line anymore Bug 2 - sampleable_inds were not correct for CircularArraySARTSATraces Bug 3 - CircularArraySARTSATraces were not sampleable by a EpisodesSampler
1 parent 5b68fe6 commit e78aa46

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/traces.jl

+1
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ function Base.:(+)(t1::Traces{k1,T1,N1,E1}, t2::Traces{k2,T2,N2,E2}) where {k1,T
247247
end
248248

249249
Base.size(t::Traces) = (mapreduce(length, min, t.traces),)
250+
max_length(t::Traces) = mapreduce(length, max, t.traces)
250251

251252
function capacity(t::Traces{names,Trs,N,E}) where {names,Trs,N,E}
252253
minimum(map(idx->capacity(t[idx]), names))

0 commit comments

Comments
 (0)