I'm basically doing this
Compile[{},
Module[{pos = 1, weights = {1, 1, 1}, choiceWeights, newPos,
edgeNumber},
Do[choiceWeights = weights; choiceWeights[[pos]] = 0;
newPos = RandomChoice[choiceWeights -> {1, 2, 3}];
edgeNumber = {1, 3, 0, 0, 2}[[-2 +
newPos + (-1 + newPos) (-1 + pos) + pos]];
weights[[edgeNumber]] = weights[[edgeNumber]] + 1;
pos = newPos, {1000}]; weights]]