Suppose we have a, b, c, and d. We have the following known probabilities:
a > b: 0.73
a > c: 0.01
a > d: 0.65
b > a: 0.27
b > c: 0.01
b > d: 0.41
c > a: 0.99
c > b: 0.99
c > d: 0.99
d > a: 0.35
d > b: 0.59
d > c: 0.01
This should be enough information to simulate such that I can rank all four of them. From the data it's evident that the single most likely ranking order would be c > a > d > b. But I want to be able to simulate it. I'm using Excel VBA to do this, but the code is less of an issue at this time than the logic.
My initial thinking was to start them in the order:
1: a
2: b
3: c
4: d
Then starting with 2, I'd check if what's in 2 is greater than what's in 1. "b > a" is 0.27, so I'd generate a random number 0.0 - 1.0, and if it's less than 0.27, then I'd swap what's in 2 and 1:
1: b
2: a
3: c
4: d
Then go to 3, check if it beats 2 the same way, swap if so. If the swap happens, then have to check if 2 beats 1, but if 3 does not beat 2, then there is no need to check if 3 beats 1. Let's say just 1 swap happens when tested:
1: b
2: c
3: a
4: d
Finally I test with 4 vs 3, as I did before with the others, moving up the chain until 4 doesn't beat the opponent.
The thing that makes me doubt this strategy is that if 4 fails to defeat 3, then what's in there never moves and only is ever tested against one of the other three. I don't know if that is a problem or not. It feels like it might be.
Let me know if you see a better way of doing this.
a > b: 0.73
a > c: 0.01
a > d: 0.65
b > a: 0.27
b > c: 0.01
b > d: 0.41
c > a: 0.99
c > b: 0.99
c > d: 0.99
d > a: 0.35
d > b: 0.59
d > c: 0.01
This should be enough information to simulate such that I can rank all four of them. From the data it's evident that the single most likely ranking order would be c > a > d > b. But I want to be able to simulate it. I'm using Excel VBA to do this, but the code is less of an issue at this time than the logic.
My initial thinking was to start them in the order:
1: a
2: b
3: c
4: d
Then starting with 2, I'd check if what's in 2 is greater than what's in 1. "b > a" is 0.27, so I'd generate a random number 0.0 - 1.0, and if it's less than 0.27, then I'd swap what's in 2 and 1:
1: b
2: a
3: c
4: d
Then go to 3, check if it beats 2 the same way, swap if so. If the swap happens, then have to check if 2 beats 1, but if 3 does not beat 2, then there is no need to check if 3 beats 1. Let's say just 1 swap happens when tested:
1: b
2: c
3: a
4: d
Finally I test with 4 vs 3, as I did before with the others, moving up the chain until 4 doesn't beat the opponent.
The thing that makes me doubt this strategy is that if 4 fails to defeat 3, then what's in there never moves and only is ever tested against one of the other three. I don't know if that is a problem or not. It feels like it might be.
Let me know if you see a better way of doing this.