• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 16:19
CET 22:19
KST 06:19
  • 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
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3RSL Season 3: RO16 results & RO8 bracket13Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge2[TLMC] Fall/Winter 2025 Ladder Map Rotation14
StarCraft 2
General
When will we find out if there are more tournament Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win SC: Evo Complete - Ranked Ladder OPEN ALPHA Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge RSL Season 3: RO16 results & RO8 bracket
Tourneys
Tenacious Turtle Tussle [Alpha Pro Series] Nice vs Cure RSL Revival: Season 3 $5,000+ WardiTV 2025 Championship StarCraft Evolution League (SC Evo Biweekly)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death
Brood War
General
Which season is the best in ASL? Data analysis on 70 million replays sas.vorti stream [BSL21] Ro.16 Group Stage (C->B->A->D) FlaSh on: Biggest Problem With SnOw's Playstyle
Tourneys
Small VOD Thread 2.0 [Megathread] Daily Proleagues [BSL21] RO16 Tie Breaker - Group B - Sun 21:00 CET [BSL21] GosuLeague T1 Ro16 - Tue & Thu 22:00 CET
Strategy
Game Theory for Starcraft How to stay on top of macro? Current Meta PvZ map balance
Other Games
General Games
Stormgate/Frost Giant Megathread The Perfect Game Nintendo Switch Thread Beyond All Reason Should offensive tower rushing be viable in RTS games?
Dota 2
Official 'what is Dota anymore' discussion
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 Mafia Game Mode Feedback/Ideas
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Artificial Intelligence Thread YouTube Thread Things Aren’t Peaceful in Palestine
Fan Clubs
White-Ra Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Where to ask questions and add stream? The Automated Ban List
Blogs
Esports Earnings: Bigger Pri…
TrAiDoS
Thanks for the RSL
Hildegard
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1730 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 Kingdom6639 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
Poland1479 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
Next event in 2h 41m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 622
White-Ra 289
UpATreeSC 129
StarCraft: Brood War
Calm 2891
Shuttle 402
Larva 304
Dewaltoss 113
ZZZero.O 12
Counter-Strike
fl0m4002
apEX1954
pashabiceps1729
Heroes of the Storm
Liquid`Hasu867
Other Games
singsing2081
FrodaN1953
B2W.Neo1621
tarik_tv1241
Mew2King147
ArmadaUGS131
Maynarde31
Organizations
Dota 2
PGL Dota 2 - Main Stream152
StarCraft: Brood War
lovetv 7
Other Games
Algost 3
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• Dystopia_ 4
• Kozan
• sooper7s
• Migwel
• AfreecaTV YouTube
• LaughNgamezSOOP
• intothetv
• IndyKCrew
StarCraft: Brood War
• 80smullet 22
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• Ler1494
• WagamamaTV737
League of Legends
• Doublelift2288
• TFBlade1697
• HappyZerGling148
Other Games
• imaqtpie1752
• Shiphtur281
Upcoming Events
Replay Cast
2h 41m
OSC
19h 41m
LAN Event
20h 41m
Replay Cast
1d 1h
Replay Cast
1d 11h
WardiTV Korean Royale
1d 14h
Sparkling Tuna Cup
2 days
WardiTV Korean Royale
2 days
Replay Cast
3 days
Wardi Open
3 days
[ Show More ]
Monday Night Weeklies
3 days
StarCraft2.fi
3 days
Replay Cast
4 days
Wardi Open
4 days
StarCraft2.fi
4 days
Wardi Open
5 days
StarCraft2.fi
5 days
Replay Cast
6 days
The PondCast
6 days
Liquipedia Results

Completed

SOOP Univ League 2025
RSL Revival: Season 3
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
Slon Tour Season 2
META Madness #9
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
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.