• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 20:35
CET 01:35
KST 09:35
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting10[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9
Community News
Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win42025 RSL Offline Finals Dates + Ticket Sales!9BSL21 Open Qualifiers Week & CONFIRM PARTICIPATION1Crank Gathers Season 2: SC II Pro Teams10Merivale 8 Open - LAN - Stellar Fest3
StarCraft 2
General
Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win Could we add "Avoid Matchup" Feature for rankgame RotterdaM "Serral is the GOAT, and it's not close" The New Patch Killed Mech! Chinese SC2 server to reopen; live all-star event in Hangzhou
Tourneys
Crank Gathers Season 2: SC II Pro Teams 2025 RSL Offline Finals Dates + Ticket Sales! Merivale 8 Open - LAN - Stellar Fest $5,000+ WardiTV 2025 Championship $3,500 WardiTV Korean Royale S4
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 497 Battle Haredened Mutation # 496 Endless Infection Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment
Brood War
General
Ladder Map Matchup Stats BW General Discussion BSL Team A vs Koreans - Sat-Sun 16:00 CET [ASL20] Ask the mapmakers — Drop your questions BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[ASL20] Grand Finals The Casual Games of the Week Thread BSL21 Open Qualifiers Week & CONFIRM PARTICIPATION ASL final tickets help
Strategy
How to stay on top of macro? PvZ map balance Soma's 9 hatch build from ASL Game 2 Current Meta
Other Games
General Games
Stormgate/Frost Giant Megathread General RTS Discussion Thread Path of Exile Nintendo Switch Thread Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread Russo-Ukrainian War Thread YouTube Thread The Chess Thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece Korean Music Discussion Series you have seen recently...
Sports
MLB/Baseball 2023 2024 - 2026 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023 NBA General Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Analysis of the Trump-Lee S…
Peanutsc
Reality "theory" prov…
perfectspheres
The Benefits Of Limited Comm…
TrAiDoS
Our Last Hope in th…
KrillinFromwales
Certified Crazy
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1262 users

Few Mirrors when Both Players Random

Forum Index > BW General
Post a Reply
1 2 Next All
Xentronium
Profile Joined August 2011
United States12 Posts
May 17 2013 16:23 GMT
#1
My brother and I play a lot of 1v1s on iccup, always choose random, and tell each other our race at the start of the match.
What we've noticed is that we very rarely get mirror matchups--instead of a 1/3 chance, it's more like a 1/20 chance. We've played a ton of games, and it's extremely improbable for it to be a statistical anomaly. Wonder if anyone knows something about this?
Cokefreak
Profile Joined June 2011
Finland8095 Posts
May 17 2013 16:30 GMT
#2
Just a coincidence.
N.geNuity
Profile Blog Joined July 2009
United States5112 Posts
May 17 2013 16:34 GMT
#3
its not a coincidence, mirrors are much less likely in random vs random by the design. I just dunno the exact details.
iu, seungah, yura, taeyeon, hyosung, lizzy, suji, sojin, jia, ji eun, eunji, soya, younha, jiyeon, fiestar, sinb, jung myung hoon godtier. BW FOREVERR
N.geNuity
Profile Blog Joined July 2009
United States5112 Posts
May 17 2013 16:48 GMT
#4
I know there is a thread on it somewhere, but all I can find at the moment is reference to it:
http://www.teamliquid.net/forum/viewmessage.php?topic_id=367755
On September 12 2012 05:04 Wgtourmaps wrote:
Show nested quote +
On September 12 2012 00:57 killerdog wrote:
On September 11 2012 06:59 Wgtourmaps wrote:
In a 1v1, where both players Random, there is a 95% chance both players random different races.


Are you sure about this?

+ Show Spoiler +
i would have though it was 67% chance, because whatever race you roll, they roll one of 3 options one of which is the same as you




And a nice guide, i never really put that much thought into how different random vs x is compared to a known matchup. Funny really, since i'm well aware of how it affects sc2... I guess i just never run into random players while playing broodwar.

If you search "Random" on this site, there is a page where a programmer talks about SC's engine being programmed that way. It is nice when everyone is playing Random in a 1v1 or 2v2, you will have a somewhat better idea of what their races might be.

Thank you for the nice comments guys.


he also talked about all random in 2v2 ending up as 2 of race x, 1 of race y, 1 of race z. But just searching "random" is not being helpful at the moment in bw or bw strategy for me.
iu, seungah, yura, taeyeon, hyosung, lizzy, suji, sojin, jia, ji eun, eunji, soya, younha, jiyeon, fiestar, sinb, jung myung hoon godtier. BW FOREVERR
BiYon
Profile Joined October 2011
Sweden10 Posts
Last Edited: 2013-05-17 17:29:55
May 17 2013 17:11 GMT
#5
The chance of both of you getting the same race in the same game is (1/3)*(1/3)=(1/9). You flip the 3-sided coin twice, hoping to get the same value in both flips. This is for one specifik mirror so I guess the 1/3 to hit any mirror is correct.

If the game actually has a perfect race distribution when you roll random (every race has exactly the same chance) then the law of big numbers should give you a mirror match-up every 3 games, on average.

What does "a ton of games" mean. Does it mean 10k/20k or somewhere around 100 games? Generating a bigger sample set often "shows" the chance distribution.

edit: yeah, edited the chances, 1/9 was for 1 mirror, 1/3 for any mirror! thanks~

jello_biafra
Profile Blog Joined September 2004
United Kingdom6638 Posts
May 17 2013 17:12 GMT
#6
Well if you have 8 players in a game who all go random then you will always end up with 3X 3Y and 2Z so it's definitely not completely random.
The road to hell is paved with good intentions | aka Probert[PaiN] @ iccup / godlikeparagon @ twitch | my BW stream: http://www.teamliquid.net/video/streams/jello_biafra
Torenhire
Profile Blog Joined April 2009
United States11681 Posts
May 17 2013 17:18 GMT
#7
On May 18 2013 02:12 jello_biafra wrote:
Well if you have 8 players in a game who all go random then you will always end up with 3X 3Y and 2Z so it's definitely not completely random.


As proven by Race Wars haha.

Though tbh I would really be interested in seeing "real" proof of this being the case.
SirJolt: Well maybe if you weren't so big and stupid, it wouldn't have hit you.
EchOne
Profile Blog Joined January 2008
United States2906 Posts
May 17 2013 17:28 GMT
#8
On May 18 2013 02:11 BiYon wrote:
The chance of both of you getting the same race in the same game is (1/3)*(1/3)=(1/9). You flip the 3-sided coin twice, hoping to get the same value in both flips.

If the game actually has a perfect race distribution when you roll random (every race has exactly the same chance) then the law of big numbers should give you a mirror match-up every 9 games, on average.

What does "a ton of games" mean. Does it mean 10k/20k or somewhere around 100 games? Generating a bigger sample set often "shows" the chance distribution.




Actually it's 1/3 because the alleged first 1/3 doesn't matter. P1 can be P, Z, or T... the only requirement is that P2 matches that. So it's like (3/3)*(1/3). If you look at it case-by-case, it's something like:
+ Show Spoiler +
zp
zt
zz
tz
tp
tt
pz
pt
pp

where mirror matches are 3/9.

But yea Starcraft's RNG is not actually random.
面白くない世の中, 面白くすればいいさ
BiYon
Profile Joined October 2011
Sweden10 Posts
May 17 2013 17:31 GMT
#9
On May 18 2013 02:28 EchOne wrote:
Show nested quote +
On May 18 2013 02:11 BiYon wrote:
The chance of both of you getting the same race in the same game is (1/3)*(1/3)=(1/9). You flip the 3-sided coin twice, hoping to get the same value in both flips.

If the game actually has a perfect race distribution when you roll random (every race has exactly the same chance) then the law of big numbers should give you a mirror match-up every 9 games, on average.

What does "a ton of games" mean. Does it mean 10k/20k or somewhere around 100 games? Generating a bigger sample set often "shows" the chance distribution.




Actually it's 1/3 because the alleged first 1/3 doesn't matter. P1 can be P, Z, or T... the only requirement is that P2 matches that. So it's like (3/3)*(1/3). If you look at it case-by-case, it's something like:
+ Show Spoiler +
zp
zt
zz
tz
tp
tt
pz
pt
pp

where mirror matches are 3/9.

But yea Starcraft's RNG is not actually random.


Yeah, I sat and thought about that and came back here to correct myself, 1/9 is for 1 specific mirror, 1/3 for any mirror, thanks.
amazingxkcd
Profile Blog Joined September 2010
GRAND OLD AMERICA16375 Posts
May 17 2013 17:31 GMT
#10
On May 18 2013 01:23 Xentronium wrote:
My brother and I play a lot of 1v1s on iccup, always choose random, and tell each other our race at the start of the match.
What we've noticed is that we very rarely get mirror matchups--instead of a 1/3 chance, it's more like a 1/20 chance. We've played a ton of games, and it's extremely improbable for it to be a statistical anomaly. Wonder if anyone knows something about this?


It's not a statistical anomaly AFAIK. I'm pretty sure that R1CH knows the most about it since he was talking about it in the last thread on this issue. From what I recalled, the programmers didn't want both players to random the same races 1/9 of the time, so there are some algorithms in place for that.
The world is burning and you rather be on this terrible website discussing video games and your shallow feelings
LRM)TechnicS
Profile Joined May 2008
Bulgaria1565 Posts
May 17 2013 17:34 GMT
#11
[image loading]
Enjoy the game
LRM)TechnicS
Profile Joined May 2008
Bulgaria1565 Posts
May 17 2013 17:38 GMT
#12
i wonder if it's the same case with picked race vs random. -_- that would make Nemu that much more imbalanced
Enjoy the game
iloveav
Profile Joined November 2008
Poland1478 Posts
May 17 2013 17:51 GMT
#13
I think it has to do something with the random selection timing.
Its impossible for the game to choose both players at the same time, so tehre has to be 1 selected first and then the other.

As an example, when i play vs a friend, he gets Toss 90%+ of the time (so far 100%), but if he does it vs another guy, he gets terran most times.
It might have something to do with the ping :D.
aka LRM)Cats_Paw.
Xentronium
Profile Joined August 2011
United States12 Posts
May 17 2013 19:12 GMT
#14
Thanks for the responses! Interesting that blizzard didn't want rvr mirrors...
eviltomahawk
Profile Blog Joined August 2010
United States11135 Posts
May 17 2013 19:27 GMT
#15
It would be cool if someone could get some statistics about this from a large sample size. It shouldn't be difficult.
ㅇㅅㅌㅅ
Xentronium
Profile Joined August 2011
United States12 Posts
May 17 2013 19:53 GMT
#16
Found some relevant pages, after some searching.

http://www.teamliquid.net/forum/viewmessage.php?topic_id=37059&currentpage=2

http://www.teamliquid.net/forum/viewmessage.php?topic_id=89551

endy
Profile Blog Joined May 2009
Switzerland8970 Posts
Last Edited: 2013-05-18 02:18:19
May 18 2013 01:36 GMT
#17
I played thousands of 1v1 RvR and 2v2 RRvsRR and that's true. Random makes mirrors rare.

Other very interesting things I noticed :

If there are 4 players going random and no obs, there will always be at least one player of each race, so if your team is PT, you know the opponent is PZ, TZ or ZZ as soon as the game starts.

Obs picking a race (usually Terran and lift CC in non-ums games) affect the behavior of the "random" algorithm. A 1v1 RvR game with an obs picking terran has more chances to get mirrors.

Chances to get a mirror when picking race vs random are higher than when it's RvR, but less than 1/3rd that a real random algorithm would yield.

edit : meh the links in the post above were covering that already. I guess there's no secret in a game released 15 years ago.



On May 18 2013 04:27 eviltomahawk wrote:
It would be cool if someone could get some statistics about this from a large sample size. It shouldn't be difficult.


Hmmm it's actually not that easy because doing a study like this would consist of collecting replays from people and as far as I know there is no way to know from the replay file if a player went random or picked a race. Also picked race vs random and random vs random yield different results.

ॐ
tec27
Profile Blog Joined June 2004
United States3702 Posts
May 18 2013 10:10 GMT
#18
I spent a good bit of time tonight reversing how this is done, and I now have the final details of this algorithm. There should be no debate in this, it comes directly from the game's code!

+ Show Spoiler [Technical Details for Future Reversers] +

In 1.16.1:
- RandomizeRaces() function is at 0x004A9A30
- GetRandomRace(int total_random_players) [ebx = generation_counter (number of random races generated thus far)] is at 0x004A94C0


Races are generated in groups of 3. That is, there is behavior defined for the first race, second race, and third race generated in a group. Players > 3 behave like what they are a multiple of (e.g. the fourth race generated follows the rules of the first race generated). Monitoring of what races have already been rolled for de-duping purposes also resets every 3 generations.

States for each 3 person group
First random: normal 33% chance for each race
Second random: 50% chance of Zerg or Terran, followed by deduping logic:
  • If rolled Terran, you are either Terran or Protoss (whichever was not rolled in #1)
  • If rolled Zerg, you are either Zerg or Terran (whichever was not rolled in #1)
Third random: Whichever race wasn't randomed in the first two rounds

Special Cases
Exactly 2 total random players in a game
  • First player operates exactly as above
  • Second player begins operating exactly as above and then:
    • Roll in the range {0..7}. If this comes up anything but 4, return the de-duped race
    • If this comes up 4, roll for a race with a normal race (1/3 chance of a mirror from this, 1/24 actual mirror chance)

Exactly 3 total random players in a game
  • First two players operate according to round 1 and 2 above, then:
    • Third player is normal random (2/3 chance of rolling a duplicated race)

Exactly 6 total random players in a game
  • First five players operate according to the standard above (2 sets worth), then:
    • Sixth player is normal random (2/3 chance of rolling a third instance of a race)


Notes
  • After the random races have been rolled, the game will shuffle the order of the races by doing the following:
    for (i = 0; i < 16; i++) {
    a = RandRange(0, num_random_players)
    b = RandRange(0, num_random_players)
    swap(race[a], race[b])
    }

  • Non-player, non-computer entities that are marked as random do not contribute to the above random counters, and are generated using a pure random (1/3 chance for each race) without de-duping. Interestingly, this applies to "open" slots on occupied teams in Team {Melee, FFA, CTF} games. This means that if you do a Team Melee with 2 teams and 8 possible races, with only 2 players, then only the first race in each team is de-duped. The 3 races after that (per team) are generated using normal random.

  • Non-random players do not contribute to the outcome of the randoming (which in itself means that contribute to the outcome of the randoming, I suppose )


Notable Discoveries or tl;dr
Probability of a mirror matchup in a 1v1, both players randoming: 1/24
Probability of a mirror matchup in a 1v1, only one player randoming: 1/3
Probability of a duplicated random race when exactly 3 players are randoming: 2/3
Probability of having 3 players with the same random race when exactly 6 players are randoming: 2/3

When 4, 5, 7, or 8 players are randoming, the distribution will always be even (i.e. {2,1,1} {2,2,1} {3,2,2} and {3,3,2} respectively).


I also have the slot position randomization function, which looks to have its own set of interesting behavior, but I will save that for another day.
Can you jam with the console cowboys in cyberspace?
Reason
Profile Blog Joined June 2006
United Kingdom2770 Posts
Last Edited: 2013-05-18 10:17:35
May 18 2013 10:16 GMT
#19
^Wow, well done.

That's like the ultimate answer to this question!
Speak properly, and in as few words as you can, but always plainly; for the end of speech is not ostentation, but to be understood.
Sayle
Profile Joined October 2010
United Kingdom3685 Posts
Last Edited: 2013-05-18 10:36:26
May 18 2013 10:35 GMT
#20
Why the hell did they make it so complicated when they could have just made it actually random. I mean, instead of spending all that time dicking around with that, they could have, I dunno, made scourge work properly or something?
1 2 Next All
Please log in or register to reply.
Live Events Refresh
Replay Cast
23:00
Crank Gathers S2: Playoffs D2
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
ProTech96
CosmosSc2 42
StarCraft: Brood War
Artosis 759
yabsab 36
NaDa 23
Dota 2
monkeys_forever640
NeuroSwarm48
LuMiX0
Counter-Strike
fl0m541
Foxcn196
Super Smash Bros
hungrybox1564
Other Games
summit1g11148
Grubby2799
Day[9].tv514
C9.Mang0172
Maynarde141
ViBE118
Organizations
Other Games
gamesdonequick851
BasetradeTV55
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• Hupsaiya 49
• musti20045 32
• davetesta22
• Kozan
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota21736
League of Legends
• Doublelift3694
• Stunt236
Other Games
• Scarra795
• Day9tv514
Upcoming Events
The PondCast
8h 26m
OSC
11h 26m
Harstem vs SKillous
Gerald vs Spirit
Krystianer vs TriGGeR
Cham vs Ryung
CrankTV Team League
12h 26m
Team Liquid vs Team Falcon
Replay Cast
1d 9h
WardiTV Invitational
1d 11h
ByuN vs Spirit
herO vs Solar
MaNa vs Gerald
Rogue vs GuMiho
Epic.LAN
1d 11h
CrankTV Team League
1d 12h
BASILISK vs TBD
Replay Cast
2 days
Epic.LAN
2 days
BSL Team A[vengers]
2 days
Dewalt vs Shine
UltrA vs ZeLoT
[ Show More ]
BSL 21
2 days
Sparkling Tuna Cup
3 days
BSL Team A[vengers]
3 days
Cross vs Motive
Sziky vs HiyA
BSL 21
3 days
Wardi Open
4 days
Monday Night Weeklies
4 days
Liquipedia Results

Completed

CSL 2025 AUTUMN (S18)
WardiTV TLMC #15
Eternal Conflict S1

Ongoing

BSL 21 Points
BSL 21 Team A
C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
CranK Gathers Season 2: SC II Pro Teams
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025

Upcoming

SC4ALL: Brood War
YSL S2
BSL Season 21
SLON Tour Season 2
BSL 21 Non-Korean Championship
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
META Madness #9
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.