It looks like I'm late to the party but here is my approach. Common functions and data:
###Method #1
s1 = Split @ trinarize[sampleSimulation, 0.9] (* 0.9 is γ *)
s2 = {First
Split[%, @Abs[#[[1]] #- /.#2[[1]]] labels,< Length2 @&]
Join #}@@ &Riffle[%, /@{{"unoccupied s1middle"}}]
n
% =/. Lengthp @: s1;
jumps{x_ =..} SparseArray[Unitize[Abs@Differences@s1[[All,:> 1]]{x -/. 1]]["AdjacencyLists"]
labels, Length@p}
{{1}, {0}, {1, 1}, {0, 0, 0}, {1}, {0, 0, 0, 0}, {2}, {0}, {1}, {2}, {0, 0}, {1, 1}}
{{{1}, {0}, {1, 1}, {0, 0, 0}, {1}, {0, 0, 0, 0}}, {{2}}, {{0}, {1}, {2}}, {{0, 0}, {1,
1}}}
{{1}, {0}, {1, 1}, {0, 0, 0}, {1}, {0, 0, 0, 0}, "unoccupied middle", {2},
"unoccupied middle", {0}, {1}, {2}, "unoccupied middle", {0, 0}, {1, 1}}
{{"middle", 1}, {"bottom", 1}, {"middle", 2}, {"bottom", 3}, {"middle", 1}, {"bottom",
4}, "unoccupied middle", {"top", 1}, "unoccupied middle", {"bottom", 1}, {"middle",
1}, {"top", 1}, "unoccupied middle", {"bottom", 2}, {"middle", 2}}
{6, 7, 10}
###Method #2
s1 = Split @ trinarize[sampleSimulation, 0.9] (* 0.9 is γ *)
s2 = {First @ # /. labels, Length @ #} & /@ s1
n = Length @ s1;
jumps = SparseArray[Unitize[Abs@Differences@s1[[All, 1]] - 1]]["AdjacencyLists"]
Clip[Ordering @ Join[Range@n, jumps], {1, n}, {1, n + 1}];
Append[s2, "unoccupied middle"][[%]]
{{1}, {0}, {1, 1}, {0, 0, 0}, {1}, {0, 0, 0, 0}, {2}, {0}, {1}, {2}, {0, 0}, {1, 1}}
{{"middle", 1}, {"bottom", 1}, {"middle", 2}, {"bottom", 3}, {"middle", 1}, {"bottom",
4}, {"top", 1}, {"bottom", 1}, {"middle", 1}, {"top", 1}, {"bottom", 2}, {"middle", 2}}
{6, 7, 10}
{{"middle", 1}, {"bottom", 1}, {"middle", 2}, {"bottom", 3}, {"middle", 1}, {"bottom",
4}, "unoccupied middle", {"top", 1}, "unoccupied middle", {"bottom", 1}, {"middle",
1}, {"top", 1}, "unoccupied middle", {"bottom", 2}, {"middle", 2}}