struct TargetLoss
    policy::Float32
    reward::Float32
    value::Float32
end

gettotal(x::TargetLoss) = x.policy + x.reward + x.value
getpolicy(x::TargetLoss) = x.policy
getreward(x::TargetLoss) = x.reward
getvalue(x::TargetLoss) = x.value

function Base.:+(a::TargetLoss, b::TargetLoss)
    TargetLoss(
        a.policy + b.policy,
        a.reward + b.reward,
        a.value + b.value,
    )
end