• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 22:24
CEST 04:24
KST 11:24
  • 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
TL.net Map Contest #21: Voting10[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9Maestros of the Game: Live Finals Preview (RO4)5
Community News
Chinese SC2 server to reopen; live all-star event in Hangzhou19Weekly Cups (Oct 13-19): Clem Goes for Four3BSL Team A vs Koreans - Sat-Sun 16:00 CET7Weekly Cups (Oct 6-12): Four star herO85.0.15 Patch Balance Hotfix (2025-10-8)81
StarCraft 2
General
The New Patch Killed Mech! Chinese SC2 server to reopen; live all-star event in Hangzhou RotterdaM "Serral is the GOAT, and it's not close" Weekly Cups (Oct 13-19): Clem Goes for Four 5.0.15 Patch Balance Hotfix (2025-10-8)
Tourneys
Merivale 8 Open - LAN - Stellar Fest Lost Recovery Master -Bitcoin Recovery Experts Tenacious Turtle Tussle RSL Season 3 Qualifier Links and Dates $1,200 WardiTV October (Oct 21st-31st)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 496 Endless Infection Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ Is there anyway to get a private coach? SnOw's Awful Building Placements vs barracks BW General Discussion BSL Team A vs Koreans - Sat-Sun 16:00 CET
Tourneys
[Megathread] Daily Proleagues [ASL20] Semifinal B 300$ 3D!Community Brood War Super Cup #4 Azhi's Colosseum - Anonymous Tournament
Strategy
[I] TvP Marine Usage Current Meta Roaring Currents ASL final BW - ajfirecracker Strategy & Training
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread Dawn of War IV ZeroSpace Megathread
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
Russo-Ukrainian War Thread US Politics Mega-thread Things Aren’t Peaceful in Palestine YouTube Thread The Chess Thread
Fan Clubs
The herO Fan Club!
Media & Entertainment
Korean Music Discussion Anime Discussion Thread Series you have seen recently... [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023 MLB/Baseball 2023 Formula 1 Discussion 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
The Benefits Of Limited Comm…
TrAiDoS
Sabrina was soooo lame on S…
Peanutsc
Our Last Hope in th…
KrillinFromwales
Certified Crazy
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1909 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
Next event in 8h 36m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nathanias 193
StarCraft: Brood War
Artosis 695
NaDa 55
Noble 20
Purpose 2
Icarus 1
Dota 2
NeuroSwarm62
Counter-Strike
Stewie2K489
Other Games
summit1g6486
JimRising 614
C9.Mang0257
Skadoodle171
ViBE96
Trikslyr48
fpsfer 1
Organizations
Other Games
gamesdonequick886
Counter-Strike
PGL158
Other Games
BasetradeTV52
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• HeavenSC 42
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• RayReign 7
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• masondota2850
League of Legends
• Doublelift4053
• Stunt175
Other Games
• Scarra658
Upcoming Events
WardiTV Invitational
8h 36m
Online Event
13h 36m
RSL Revival
23h 36m
RSL Revival
1d 7h
WardiTV Invitational
1d 8h
OSC
1d 12h
SKillous vs goblin
Spirit vs GgMaChine
ByuN vs MaxPax
Afreeca Starleague
2 days
Snow vs Soma
Sparkling Tuna Cup
2 days
WardiTV Invitational
2 days
CrankTV Team League
2 days
[ Show More ]
RSL Revival
2 days
Wardi Open
3 days
CrankTV Team League
3 days
Replay Cast
4 days
WardiTV Invitational
4 days
CrankTV Team League
4 days
Replay Cast
5 days
CrankTV Team League
5 days
Replay Cast
5 days
The PondCast
6 days
CrankTV Team League
6 days
Liquipedia Results

Completed

Acropolis #4 - TS2
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
C-Race Season 1
IPSL Winter 2025-26
EC S1
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
BSL Season 21
BSL 21 Team A
BSL 21 Non-Korean Championship
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
CranK Gathers Season 2: SC II Pro Teams
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 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.