• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 01:04
CEST 07:04
KST 14:04
  • 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] Ro16 Preview Pt1: Ascent8Maestros of the Game: Week 1/Play-in Preview12[ASL20] Ro24 Preview Pt2: Take-Off7[ASL20] Ro24 Preview Pt1: Runway132v2 & SC: Evo Complete: Weekend Double Feature4
Community News
LiuLi Cup - September 2025 Tournaments2Weekly Cups (August 25-31): Clem's Last Straw?39Weekly Cups (Aug 18-24): herO dethrones MaxPax6Maestros of The Game—$20k event w/ live finals in Paris64Weekly Cups (Aug 11-17): MaxPax triples again!15
StarCraft 2
General
Production Quality - Maestros of the Game Vs RSL 2 #1: Maru - Greatest Players of All Time Team Liquid Map Contest #21 - Presented by Monster Energy Geoff 'iNcontroL' Robinson has passed away Heaven's Balance Suggestions (roast me)
Tourneys
Maestros of The Game—$20k event w/ live finals in Paris Sparkling Tuna Cup - Weekly Open Tournament RSL: Revival, a new crowdfunded tournament series Chzzk MurlocKing SC1 vs SC2 Cup Sea Duckling Open (Global, Bronze-Diamond)
Strategy
Custom Maps
External Content
Mutation # 490 Masters of Midnight Mutation # 489 Bannable Offense Mutation # 488 What Goes Around Mutation # 487 Think Fast
Brood War
General
ASL20 General Discussion BSL Polish World Championship 2025 20-21 September [ASL20] Ro16 Preview Pt1: Ascent BGH Auto Balance -> http://bghmmr.eu/ The Korean Terminology Thread
Tourneys
[ASL20] Ro16 Group A [IPSL] ISPL Season 1 Winter Qualis and Info! [Megathread] Daily Proleagues Is there English video for group selection for ASL
Strategy
Simple Questions, Simple Answers Muta micro map competition Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
Stormgate/Frost Giant Megathread General RTS Discussion Thread Nintendo Switch Thread Path of Exile Warcraft III: The Frozen Throne
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
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread The Games Industry And ATVI Things Aren’t Peaceful in Palestine UK Politics Mega-thread Russo-Ukrainian War Thread
Fan Clubs
The Happy Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! [\m/] Heavy Metal Thread
Sports
Formula 1 Discussion MLB/Baseball 2023 2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s)
TL Community
The Automated Ban List TeamLiquid Team Shirt On Sale
Blogs
Collective Intelligence: Tea…
TrAiDoS
A very expensive lesson on ma…
Garnet
hello world
radishsoup
Lemme tell you a thing o…
JoinTheRain
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
INDEPENDIENTE LA CTM
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1288 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 Kingdom6637 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 States3701 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 4h 56m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
WinterStarcraft624
Nina 130
NeuroSwarm 114
ProTech73
StarCraft: Brood War
sSak 268
Bale 79
Icarus 12
Movie 11
yabsab 7
Dota 2
LuMiX1
League of Legends
JimRising 740
Counter-Strike
Stewie2K838
semphis_59
Super Smash Bros
Mew2King81
Other Games
summit1g8455
shahzam902
C9.Mang0393
Maynarde146
Organizations
Other Games
gamesdonequick1322
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• davetesta45
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Diggity5
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Rush1808
Upcoming Events
Sparkling Tuna Cup
4h 56m
Afreeca Starleague
4h 56m
Soulkey vs Barracks
EffOrt vs Rush
Monday Night Weeklies
10h 56m
Afreeca Starleague
1d 4h
BeSt vs Alone
Queen vs Bisu
The PondCast
3 days
RSL Revival
3 days
Cure vs SHIN
Reynor vs Zoun
RSL Revival
4 days
Classic vs TriGGeR
ByuN vs Maru
Online Event
4 days
BSL Team Wars
4 days
Team Bonyth vs Team Dewalt
BSL Team Wars
4 days
[ Show More ]
RSL Revival
5 days
Maestros of the Game
5 days
Cosmonarchy
5 days
Bonyth vs Dewalt
[BSL 2025] Weekly
5 days
RSL Revival
6 days
Maestros of the Game
6 days
BSL Team Wars
6 days
Liquipedia Results

Completed

Copa Latinoamericana 4
SEL Season 2 Championship
HCC Europe

Ongoing

BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21: BSL Points
ASL Season 20
CSL 2025 AUTUMN (S18)
LASL Season 20
RSL Revival: Season 2
Maestros of the Game
Chzzk MurlocKing SC1 vs SC2 Cup #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1

Upcoming

2025 Chongqing Offline CUP
BSL Polish World Championship 2025
BSL Season 21
BSL 21 Team A
EC S1
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
MESA Nomadic Masters Fall
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
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.