16 November 2014

Diablo's randomness: competition vs variety

In Diablo 3, randomness is everywhere: in item rolls, maps, monster types, critical hit chance, and more. This randomness bothers competitive players. Greater Rifts (GR) are the platform where competition takes place. GR are random in several ways: their maps are generated randomly, their monsters picked randomly, and the monster density also happens to be random. Therefore, ranking high on the leaderboards is mostly a matter of luck, not skill.

Blizzard probably launched the first season as a sort of test drive. They figured players would still find some exploits during season 1. I think Blizzard learned many lessons from season 1. I thought one of them was that they should level out, or even remove, the sources of randomness in GR. For example, I really expected that they would remove pylons from GR. Others expected the same. But Blizzard has decided to keep pylons inside GR for season 2. I was bewildered: why keep a luck-based mechanic in a competitive setting? I can now see at least two reasons.

One reason is that Diablo 3 is not about player skill, but about grinding. I think looting a full set of decently-rolled gear takes around 50 hours. Then the game is all about looting better-rolled gear and acquiring decently-rolled ultra-rare gear such as Tasker and Theo or Wand of Woh (both below 0.2% chance from Kadala). Crafting a good Hellfire Amulet, another end-game yet crucial piece of equipment, can take months. The hardcore players who compete on the leaderboards have acquired all this gear. While they may object to the contrary, they love grinding, or they would never have obtained such great gear. Thus re-rolling GR for slow and benign Risen Deads instead of fast and dangerous Winged Assassins may be less boring to them than it is to me.

Another reason for keeping randomness in a competitive setting is variety. The developers admit that they use randomness in Diablo III to increase the replayability, Greater Rifts included. Pylons can be a hell of a lot of fun to encounter in game, and that’s one of the big reasons we added them to Greater Rifts. The great majority of players do not compete seriously for the leaderboards, so they actually really enjoy the occasional Conduit Pylon in GR. Moreover, even competitive players may become bored if the GR were completely standardized: they would always know where to go, which monsters to avoid, and so on.

In short, Blizzard is probably right to keep pylons inside GR, but they should definitely look at 1) leveling out monster density across GR, and 2) leaderboards that measure player skill by their ability to deal with randomness.

15 October 2014

Network Algorithmics by Varghese

I skimmed Network Algorithmics by George Varghese (2005). This book presents common tricks used at the OS, hardware, and architecture levels to prevent network bottlenecks. Here are 15 principles listed on the first page.

Number Principle Example
1 Avoid obvious waste Zero-copy interfaces
2 Shift computation in time
2a Precompute Application device channels
2b Evaluate lazily Copy-on-write
2c Share expenses, batch Integrated layer processing
3 Relax system requirements
3a Trade certainty for time Stochastic fair queuing
3b Trade accuracy for time Switch load balancing
3c Shift computation in space IPv6 fragmentation
4 Leverage off system components
4a Exploit locality Locality-driven receiver
4b Trade memory for speed Processing, Lulea IP lookups
4c Exploit existing hardware Fast TCP checksum
5 Add hardware
5a Use memory interleaving and pipelining Pipelined IP lookups
5b Use wide word parallelism Shared memory switches
5c Combine DRAM and SRAM effectively Maintaining counters
6 Create efficient specialized routines UDP checksums
7 Avoid unnecessary generality Fbufs
8 Do not be tied to reference implementation Upcalls
9 Pass hints in layer interfaces Packet filters
10 Pass hints in protocol headers Tag switching
11 Optimize the expected case Header prediction
11a Use caches Fbufs
12 Add state for speed Active virtual circuit list
12a Compute incrementally Recomputing CRCs
13 Optimize degrees of freedom IP trie lookups
14 Use bucket sorting, bitmaps Timing wheels
15 Create efficient data structures Level-4 switching