• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 09:05
CET 15:05
KST 23:05
  • 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 Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
ComeBackTV's documentary on Byun's Career !8Weekly Cups (Dec 8-14): MaxPax, Clem, Cure win4Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump1Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15
StarCraft 2
General
When will we find out if there are more tournament ComeBackTV's documentary on Byun's Career ! Weekly Cups (Dec 8-14): MaxPax, Clem, Cure win RSL Revival - 2025 Season Finals Preview Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump
Tourneys
$5,000+ WardiTV 2025 Championship RSL Offline Finals Info - Dec 13 and 14! Master Swan Open (Global Bronze-Master 2) Winter Warp Gate Amateur Showdown #1: Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 504 Retribution Mutation # 503 Fowl Play Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress
Brood War
General
FlaSh on: Biggest Problem With SnOw's Playstyle screp: Command line app to parse SC rep files How Rain Became ProGamer in Just 3 Months BGH Auto Balance -> http://bghmmr.eu/ [BSL21] RO8 Bracket & Prediction Contest
Tourneys
Small VOD Thread 2.0 [Megathread] Daily Proleagues [BSL21] WB SEMIFINALS - Saturday 21:00 CET [BSL21] RO8 - Day 2 - Sunday 21:00 CET
Strategy
Game Theory for Starcraft Current Meta Simple Questions, Simple Answers Fighting Spirit mining rates
Other Games
General Games
Stormgate/Frost Giant Megathread Path of Exile Nintendo Switch Thread General RTS Discussion Thread Dawn of War IV
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
Mafia Game Mode Feedback/Ideas Survivor II: The Amazon Sengoku Mafia TL Mafia Community Thread
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine The Games Industry And ATVI YouTube Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
TL+ Announced Where to ask questions and add stream?
Blogs
The (Hidden) Drug Problem in…
TrAiDoS
I decided to write a webnov…
DjKniteX
James Bond movies ranking - pa…
Topin
Thanks for the RSL
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1032 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
OSC
14:00
King of the Hill #234
Liquipedia
WardiTV 2025
11:00
Playoffs
Clem vs CreatorLIVE!
Scarlett vs Spirit
ShoWTimE vs Cure
WardiTV1395
ComeBackTV 1250
TaKeTV 382
IndyStarCraft 192
Rex150
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko405
Harstem 194
IndyStarCraft 192
Rex 150
BRAT_OK 82
ProTech9
StarCraft: Brood War
Britney 31530
Calm 4791
GuemChi 2594
Rain 2186
Bisu 2132
Stork 946
Horang2 780
Larva 564
actioN 488
Shuttle 382
[ Show more ]
firebathero 265
ggaemo 258
Mini 233
Mind 153
Aegong 109
hero 107
JYJ 77
Zeus 74
Killer 72
Snow 70
Hyun 67
Bale 59
ToSsGirL 48
Shinee 48
Barracks 47
soO 36
Mong 22
Terrorterran 22
ajuk12(nOOB) 20
Yoon 18
Sacsri 18
sorry 17
910 17
zelot 15
JulyZerg 14
GoRush 12
Shine 8
SilentControl 7
scan(afreeca) 5
Dota 2
Gorgc4204
singsing3214
qojqva1282
XcaliburYe139
LuMiX1
League of Legends
C9.Mang0355
Counter-Strike
allub264
Other Games
B2W.Neo1464
crisheroes414
hiko347
Fuzer 262
XaKoH 134
oskar119
djWHEAT23
Trikslyr19
Organizations
StarCraft: Brood War
lovetv 9
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 11 non-featured ]
StarCraft 2
• iHatsuTV 4
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Upcoming Events
Big Brain Bouts
2h 55m
YoungYakov vs Jumy
TriGGeR vs Spirit
The PiG Daily
6h 55m
SHIN vs ByuN
Reynor vs Classic
TBD vs herO
Maru vs SHIN
TBD vs Classic
CranKy Ducklings
19h 55m
WardiTV 2025
20h 55m
Reynor vs MaxPax
SHIN vs TBD
Solar vs herO
Classic vs TBD
SC Evo League
22h 25m
Ladder Legends
1d 4h
BSL 21
1d 5h
Sziky vs Dewalt
eOnzErG vs Cross
Sparkling Tuna Cup
1d 19h
Ladder Legends
2 days
BSL 21
2 days
StRyKeR vs TBD
Bonyth vs TBD
[ Show More ]
Replay Cast
2 days
Wardi Open
2 days
Monday Night Weeklies
3 days
WardiTV Invitational
4 days
Replay Cast
5 days
WardiTV Invitational
5 days
ByuN vs Solar
Clem vs Classic
Cure vs herO
Reynor vs MaxPax
Liquipedia Results

Completed

Acropolis #4 - TS3
RSL Offline Finals
Kuram Kup

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
Slon Tour Season 2
CSL Season 19: Qualifier 1
WardiTV 2025
META Madness #9
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22

Upcoming

CSL Season 19: Qualifier 2
CSL 2025 WINTER (S19)
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Big Gabe Cup #3
OSC Championship Season 13
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
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.