Tuesday, September 29, 2015

Lag Reduction FTW, literally

Some time ago I was chatting in a CS:GO stream and made a reference to Fatal1ty. No one caught it which made me kind of sad because Fatal1ty was the first big name in PC eSports. Well I suppose there was Thresh, but e-sports as we know them weren't quite a thing when he was dominant.

Johnathan Wendel

Wendel is retired because, like crime, the competitive First Person Shooter scene is a young man's game. He is in his early thirties, like me. There is no doubt he can get better at the game through practice:


Malcolm Gladwell says as much with his findings that masters of their field have at least 10,000 hours of attentive practice. That's six hours a day for ten years. But there's also the problem of declining reflexes as we age, and reflex times are key to twitchy games like CS:GO.

So what can we old-timers do? Well, one of the advantages old people have is more disposable income - at least if you are single. This means we can buy things to give us an advantage*

Since all but the highest levels of competitive play take place online, having a better computer can translate to advantages in game. This is particularly true with regard to latency. Let's imagine a peeking situation in CS:GO.

A typical player might have a regular locked CPU, 24" 1080p monitor that came with the computer, and a normal mouse. Imagine they connect to a server with 70ms ping and are heading around a corner where an enemy player is also approaching. For simplicity sake we will assume the enemy player has the same ping and reaction time; the only difference is that the enemy player has better hardware.

The server receives the positions of both players in 35ms, their locked CPU processes that data in 10ms, the monitor input lag introduces another 20ms, the monitor displays at 60Hz which is 16.7ms. So they see the enemy player up to 81ms after the data is actually sent.

The enemy player gets the positional data in 35ms, their faster CPU processes the data in 3.33ms, their monitor has 1ms input lag and is 120Hz which translates to 8.33ms. So they see the player up to 47ms after the data is actually sent. That is, they can see the player for up to 30ms without the other player seeing them.

The player hits the button and the mouse reacts in 15ms, the actual signal is sent in 8ms, and that gameplay data is sent in 35ms. So from click to server receipt can be up to 58ms.

The enemy player hits the button and the mouse reacts in 1ms, the signal is sent in 1ms, and that gameplay data is sent in 35ms. Only 37ms from click to server receipt. That is, the enemy player can afford to react up to 20ms slower and still prevail.**

Based on the stats from the human benchmark website, I think these are decent improvements. With regard to straight up reaction time, I'd estimate one sigma.***

There are a number of in-game settings that can help but there are many guides for that. I'm focusing on hardware here which generally doesn't get the same comprehensive treatment.

The Lag Chain

This is simplified but basically when you play, your computer sends information about positioning to the server and receives information about the positions of other players. In a situation, say peeking around a corner, the player computer with the lower ping will get information about the enemy player first. Then the computer attempts to render the scene, the monitor displays it, the player reacts by moving and clicking the mouse, and that event gets sent to the server. All of these events take time so anything that can reduce that time can theoretically help you get a fraction of a second jump on the enemy.

  1. Ping
  2. Rendering setup time
  3. Draw time
  4. Human Reaction Time
  5. Click time
  6. Event sent to server (ping time)
  7. Server calculation


The best thing you can do is use the CS:GO game settings to limit the server ping to the minimum (which in the browser is 50ms). It isn't exact but it will tend to place you in games with lower ping.

There's very little else you can do on your side to lower ping. Switching from wired to wireless doesn't reduce ping times appreciably unless it's a really bad wireless card or router. It's still an advantage to use wired just for the reliability.

Switching ISPs can the overall ping situations since larger ISPs tend to have better peering arrangements which means that for a given server, their traffic might be given priority and/or a shorter route.

There are services which purport to send your network traffic through shorter lines but I haven't seen any evidence that they work.

If you are using DSL, getting your provider to switch to non-interleaved can improve ping. The downsides are that the connection might not be as reliable which can sometimes require a speed downgrade.

If you are using Fiber, my connection of choice, check to see if you are using MoCA. This can introduce a latency penalty over using a straight ethernet connection to the router. Unlike the interleaving change, this one will require a technician unless you are good with networking.

Rendering Setup Time

Technically this is broken into many steps, some of which are done by the CPU and some of which are done by the GPU. I'm considering all the work done by the computer here once the gameplay packets from the server are received. 

CS:GO is one of the few games that is largely CPU bound, i.e., the speed of the CPU is the limit to how many frames per second the engine can render. There is a cap of 300fps so trying to achieve gains higher than that isn't that helpful though as frame rate varies depending on map and gameplay complexity, it pays to bump up the CPU horsepower to compensate. 

Overclocking can definitely help in this case so buy an overclockable CPU and overclock it. A lower end processor might get, say 100fps which is enough for singleplayer and 60Hz monitors, but it isn't optimal. 100fps translates to 10ms of latency versus 3.33ms for someone playing at 300fps.

It's possible, if the GPU is weak enough, that CS:GO is unable to hit 300fps. In that case, buy a better GPU. But CS:GO isn't particularly taxing GPU wise.


For this section, I'm examining the monitor side of things. Here, a 144/120Hz monitor offers a good advantage over a 60Hz monitor. 120Hz is 8.33ms of latency compared to 16.7ms for a typical 60Hz monitor. 144Hz is even faster but the reason I single out 120Hz is because Lightboost technology is only available at 120Hz, sadly.


Lightboost (strobing) basically gives CRT levels of clarity to LCDs. The advantage is that motion is much more clear. When you scroll down a webpage, the text gets hard to read for a number of reasons. But when using lightboost (combined with V-Sync), it is literally like sliding a piece of paper around. It's that clear.

The disadvantages are that it lowers screen brightness quite a bit and increased screen brightness helps reaction time. It also looks best with V-Sync but V-Sync adds a lot of lag which is a killer in competitive games. It cannot work with G-Sync technologies, and probably won't for a long time. It adds a tiny bit of lag since each frame is displayed nearly instantaneously as a whole instead of gradually in parts.

I love the motion clarity personally so I use it but it could very well be the case that 144Hz's lag advantage is better.

On top of Hz differences in latency, there's the phenomenon of pixel response time and input lag. Monitors intended for graphics use like IPS tend to have slower response times. There are, as of September 2015, no IPS monitors with a pixel response time fast enough for strobing to work. 

Input lag is the monitor's own processing time. Gaming monitors and gaming modes generally have much less input lag but that can be checked on review sites. There's a lot of "gaming" marketing snake-oil out there but gaming monitors are the real deal.

Unfortunately measuring input lag is a bit of an art so the results you see from TFTCentral and prad.de (my favorite monitor review site) will vary. Prad.de is German and English but to find the input lag for TFTCentral, it is the "signal processing" time. Ignore the Class designation on that site since it allows a huge 16ms variance for the highest rating. 

What you don't want is for the monitor to do upscaling if you are playing at non-native resolution. It's much faster for the GPU to handle that.

Human Reaction Time

Not much to say here, be well rested, maybe a bit of caffeine, warm up. Maximum brightness is useful but there's not much hardware can do to speed that up. A larger monitor means a larger target which should help reaction time so that might help although larger monitors are dimmer so there's a tradeoff. I play using the 4:3 stretched resolutions relatively close to the monitor so that does give some of that larger target advantage. Maybe glasses with mild magnification could help there as well.

Senses typically respond faster to auditory stimuli but who isn't playing with sound? Playing with positional sound can help you react better, though it isn't directly related to the latency question.

Click Time

I'm indebted to the work done by a pair of Japanese bloggers Utmalesoldiers and systema, who have, by far, the most scientific inquiry into CSGO/FPS gaming hardware and settings that I've ever seen.

Click the image for more detail

This graph is essentially a measure of the time between a click is pressed to the time it is registered. There's a lot more to mouse quality than mouse click lag time, but it is one factor to look at if you are trying to reduce total latency.

Mice also suffer from polling latency. I think the Windows default is 125Hz or 8ms whereas gaming mice can reduce that to 1ms (with a 1000Hz polling rate) or 2ms (500Hz which can be required for some iffy mice). There are noticeable differences that Mark Rejhon of Blurbusters has written about, but I would prioritize click latency over polling rate since the former can introduce unnecessary lag an order of magnitude above the latter.

Well that's it for now and don't forget, PRACTICE! I don't use optimal settings myself since I'm a casual player but I do like to understand the factors that affect gameplay.

* Wealthy young people, or young people with wealthy parents can further extend their reflex advantage with these tips as well.

** These advantages are insignificant compared to team strategy, aiming proficiency, map knowledge, etc. but as the other abilities reach maximum, latency plays a more important role.

*** I'd like to do a formal statistical calculation but I'd need more data. What is the typical spread for the individual? A 50ms advantage can essentially become practically worthless if the spread is very high whereas it is an automatic win every time if the spread is small enough.

Wednesday, September 23, 2015

Gun Companies Hate Him!

“The media only writes about the sinners and the scandals, but that’s normal, because a tree that falls makes more noise than a forest that grows.”
- Pope Francis
Beautiful but ironic given the Pope's advocacy for socialist policy. The flourishing of society, not only here, but in the world as a whole as measured by major improvements with regard to: infant mortality, violence, starvation, access to clean water, disease prevention and treatment, and myriad other metrics, has gone largely unnoticed.

The major driver to these improvements hasn't been central directives and five year plans but rather the small improvements in efficiency over time that the market process encourages. It seems as though Pope Francis has himself succumbed to the negative media narrative.

For many reasons, but largely due to the incentive to pander to various cognitive biases, the media conditioned worldview is one of wars, violence, and strife.

If you were to describe American life in terms of the six o'clock news, it would be one of school shootings, stabbings, terrorism, bombings, political controversy, layoffs, epidemics, and the like. It's not that these things should go unreported, but it does create a bias that makes it difficult for people to make the most effective choices for improving their quality of life.

You see the fruits of this in the arms industry both at the government and civilian level. The media obsession with violence directs the human impulse to improve one's life into excessive spending on arms. For the most part, you are better off spending $1,000 on better tires, a more stable ladder, and extra fire extinguishers than you are buying a gun, sight, ammo, and range fees.* Don't listen to people like Nutnfancy whose lifestyle revolves around preparing for the wrong disaster.** From what I understand, and I don't have actuarial tables to do a proper risk reduction per dollar calculation, heart disease, cancer, and accidents are by far the biggest killers. Natural disasters and violence are much less likely to kill you. So here's how I'd reframe the prepper discussion***:

A List of Things Americans Should Have Before Buying a Gun

  • Portable automatic defibrillator
    Although guns prevent crime, an automatic defibrillator would, on net, save even more lives. Nothing wrong with having both if you have the means though.
  • An exercise bike or similar machine for cardiovascular health
    Exercise is half the battle when it comes to things you can do to prevent health problems. Unlike a normal bike, a stationary bike does not expose you to traffic risk. A gym membership might be a good option for people who hate exercising. 
  • Heart healthy foods like fatty fish and whole grains
    Diet is the other half. In the long run, it makes sense that foods with fewer pesticides and herbicides are a lower carcinogenic risk so they are worth looking into. There aren't enough data to really price the risk so it's hard to determine an acceptable premium.
  • e-cigarettes or nicotine patches if you are a smoker
    Propylene Glycol, Glycerin, Nicotine, and flavor agents aren't doing any favors for the lungs but the carcinogenic risk is far lower than from traditional tobacco products.
  • Winter tires if driving in snow is going to happen
    Next to heart disease and cancer, car accidents are high up there with regard to causes of death.
  • A large vehicle for transport
    Trains are safest followed by buses and cars. Momentum favors larger vehicles over, say, motorcycles and bicycles. 
  • Sunscreen and Vitamin D
    Avoid skin cancer but get the benefits of Vitamin D which is usually generated via sunshine.
  • An electric toothbrush
    This might be a class effect but reduced infection and reduced risk of blood poisoning seems like a reasonable mechanism to explain the benefit to longevity.
  • Fire extinguishers
    Thankfully these are fairly cheap since, although non-trivial, deaths from fire are relatively rare compared to deaths from trauma, heart disease, and cancer.
  • Trauma kits and training
    Splints, quick clot, CPR mask, intubation tube, etc. It makes more sense to take a basic life saving course instead of a tactical training course. Or maybe even both? Combat medic training, as an adjunct to prudent risk management, is about as useful as it gets in trauma situations.
  • Life Jacket
    Essential if drowning is a possibility
  • Helmet and Goggles
    Climbing ladders, dealing with cramped crawlspaces, debris, etc. Cheap insurance.
  • A college degree
    The more professional the occupation, the higher the lifespan. It may be the case that the causality direction goes the other way, i.e., "higher class" people live longer and therefore have professional jobs.
  • Friends
    One common factor among very long lived populations is a strong sense of community. For younger people, suicide risk is higher so having friends can help here as well.
  • Moderation
    Alcohol is associated with positive outcomes for some diseases but too much significantly increases risk of death. No alcohol - or any sort of drugs for that matter - is the best policy for parents to avoid birth defects.
If you do buy a gun, it makes most sense to get something that is reliable, easy to use, and cheap. Resources are finite and it's easy to spend a disproportionate amount of time and money on firearms. 

* Statistically, if you are a black male, a firearm for self defense is more important than for other demographics since black-on-black male homicide rates are particularly high. The best survival strategy though is to get out of the hood and move up the socioeconomic ladder.

** Don't get me wrong, I like multi part hour long reviews on knives and guns as much as the next guy (and specialization is inevitable and necessary for reviews), but buying into the whole "how much is your life worth to you, better carry a gun all the time as well as a backup" mentality is counterproductive. Sadly these sorts of channels are very popular which makes less hysterical firearms content producers like Hickock45 so much more valuable.

*** Doomsday preppers get a bad rap but the line of thinking is actually very rational. In typical American society, the leading causes of death are cancer, heart disease, and accidents. But this would not be the case in the aftermath of a catastrophe. Long term food, water, shelter, fuel become much more important than Vitamin D in such a society. Disasters, whether a freak natural occurrence or a man-made black swan event are difficult to evaluate. But as optimizing for disaster survival draws resources away from survival in a non-disaster scenario, it's a gamble to build Noah's Ark if you don't have inside information.

You best start believing in Grand Narratives

You're in one.

The thing with Grand Narratives is that most of them are wrong. It's not that I personally know everything and have evaluated all the universal theories out there. Rather, I know most, if not all, are wrong, because competing theories of everything are going to contradict each other in some way. If only one can be right, the rest must be wrong.*

So Brett McKay's blog, The Art of Manliness**, is doing a series on status. The first part received some reactions along the lines of "Status is dumb. You just have to stop caring about status" to which Brett replies
But here’s the thing: Even if you proclaim your indifference to status, your brain is likely telling a very different story. (Not to mention, such a declaration, as it places oneself in a superior, or at least special position to others, is actually in and of itself a play for status!)
Or maybe sometimes a cigar is just a cigar. The biggest problem with this Grand Narrative, as well as many others, is that there is no allowance of a meta-overview. For example, there is no way to examine status theory objectively because an objective viewpoint implies a "special position to others" which "is actually in and of itself a play for status!"

"Everything (at least for men) is status!" is what Brett's rejoinder tells us. The theory is unquestionable because any attempt to criticize it is merely more status gamesmanship. Ultimately, as the appeal to brain chemistry hints, the status theory of human behavior has its roots in the Grand Narrative of evolutionary psychology.

For the most part, it's hard to argue against. But what are the consequences and are there any exceptions? Status theory, as well as the related signalling theory that Robin Hanson's been popularizing, suggests that the impetus for behavior is societal. It is reactive. The principle centered person who takes action apart from the calculated response from society is a fiction. You don't do charity because it is the right thing to do but rather because you believe it will make you look good.

Maybe it's true and the only kind of non-societal signalling behaviors are those that make recourse to abstract and/or supernatural directives. Yet for even these, evolutionary psychology has its explanations so that all behavior is subsumed under its deterministic tyranny.

If these deterministic theories are true, then how hopeless and meaningless is man's existence! The life of the man who internalizes these beliefs will aspire to no higher things and the society of such men in aggregate cannot but be base. So even though my questioning of status theory will be seen by their adherents as a "play for status", I think it's necessary for the progress of civilization to question and reject any interpretation of potentially useful and explanatory theories (e.g. class analysis, evolutionary psychology) that unnecessarily elevates them to the universality of a deterministic grand narrative.

* There's little room for complementariness in theories of everything.

** The campy design and general aesthetic signal a slick superficial media site, but underneath the old-timey skeuomorphs is a lot of original and well thought out content.

Monday, September 14, 2015

A Libertarian Solution to the Refugee Crisis

Those who believe in implementing a policy should be the ones to pay for it. This applies to all aspects of "public policy". Do you want Iranian nuclear sites to be destroyed? Meetup with similar minded people and pool your resources to hire mercenaries and/or arm yourselves and fly over there to do it. Do you want Syrian refugees to be provided homes? Create a Kickstarter or similar crowdfunding initiative and use the existing marketplace to do so.

The corollary is do not force other people to pay for the things you want. Universal healthcare and education are all high-minded goals, and, I believe, a sure sign of a civilized people, but it is distinctly uncivilized to arrest and imprison people who do not wish to participate in a particular scheme, e.g., Obamacare, foreign interventions, bailouts, etc.

It's one thing if my neighbor decides to house Syrian refugees and bear the burden of that cost personally and quite another if my neighbor forces me to bear that cost using the system of government, i.e., legislation and taxation - welfare, in short. I might object to my neighbor housing refugees for a number of reasons, but ultimately, in a society where property rights are respected, what my neighbor does with his house and property is his business. If I really hated the idea of having refugee neighbors, I should have picked different neighbors.

This brings me to the next solution which is fairly controversial. The right of people to associate voluntarily by extension must include the right to discriminate. Discrimination has such heavy negative connotations but is something we all do as a benign activity every day. We discriminate in our choice of music, politicians, websites, movies, books, shops, products, and all manner of things.
We even largely discriminate among people in our personal lives; we choose who is allowed into our homes and with whom we are friends. This discrimination is ubiquitous and it's not a big deal. No one really cares if someone is only friends with millionaires or Vietnamese people or Call of Duty players or invites only Mormons into their home. However, attempt to extend this to customers or a social group and you could get thrown in jail.*

Even though I'm a convinced libertarian I can't help but recoil when I think of a society where hotels hang signs saying "No Jews Allowed" or with Whites Only restaurants. But think about it this way, if your neighbor did not want to rent their house to a black person, would you attempt to kidnap them and keep them locked up somewhere until they did? Because that is what anti-discrimination laws do. The reality is that the more diverse a society is, the greater the need for people to discriminate. Westboro Baptist Church members, abortionists, gang members, Nation of Islam members, homosexuals, the Amish, Klan members, drug users, open carry types, Serbs, Kosovars, etc. can't be expected to just get along. It's not unheard of for people within the same family to disagree to the point of ostracism let alone the groups previously mentioned. With explicit discrimination, at least groups with conflicting values can coexist by living in communities with shared values without having to worry about those communities coming under attack by well-intentioned integrationists.

It's true that there are always people who oppose even these sorts of communities, i.e., people who hate Chinatowns or other ethnic/religious enclaves because the people living there fail to integrate, but these people have no real argument because no one is forcing them to interact with these groups - at least in a society with a minimal state. The second that they are forced to interact, as they are now via state resettlement and welfare for refugees, is the second they do have an argument.

Ultimately, these migrations are going to lead to the creation of self-segregated communities anyway but with a lot of unspoken social rules and strife. What crowdfunded charity and explicit discrimination allow is migration in a way that provides the most satisfaction to the parties involved without resorting to violence. **

Going further, the removal of state violence in the form of welfare eliminates opportunistic migration to Germany, and the removal of state violence in the form of warfare largely eliminates war-related migrations in the first place. It is not to say that welfare and warfare would be eliminated with privatization, but rather that the costs of those activities are borne more privately than publicly. Of course it is as likely for Germany to eliminate welfare for migrants or allow discrimination as it is for the US to stop meddling in the Middle East so this is all theoretical.

Given that a libertarian solution is unlikely, what is the best course of action for Germany? Honestly, there is strong precedent for Muslim immigrant populations to broadly reject the general culture and values of the host country. If you agree with or are ambivalent towards Islamic principles, then it is a positive development. If you are at odds with Islamic principles, or at least the Saudi-led increasingly fundamentalist (Salafist) version of Islam that is in ascendancy today, accepting a million Muslim refugees is a bad idea.***

* Anti-discrimination laws exist, I think, as largely the result of the oppressor/oppressed paradigm posited by theorists like Paolo Freire. In this worldview, people aren't evaluated mainly by their individual merits but rather as members of a class, which, depending on the context, is an oppressor or oppressed class. Achieving greater equality, then, involves compensating the oppressed at the expense of the oppressors. If the mechanism for achieving this equality is the State, then there is a perverse incentive for everyone to identify with an oppressed group and constantly signal their status in order to receive State benefits.

** I would wager that private groups working to resettle refugees would do a much better job than the government in identifying people with real needs. Although it is very discriminatory, relatively wealthy young fit males are not what most people have in mind when it comes to providing humanitarian asylum. This isn't to say males, young people, or wealthy people are not deserving of a peaceful life and asylum, but it is the general Christian, and therefore Western practice, that women, children, the elderly, and the sick be taken care of first. There would still be opportunities for these migrants as businesses looking for cheap labor could benefit and they could support their families back in Syria much the same way Filipino laborers in the Middle East or Mexicans in the US do.

*** Not that the particular opinion of the author matters, but here it is. There have been violent extremists in every religion and ideology. The question, at least from a libertarian standpoint, is whether a particular religion or ideology fundamentally rejects violent aggression. In that regard we can see that Mohammad was essentially a religious warlord for several years and that the formative early years of Islam were dominated by military conquest. Perhaps only the old Norse religion glorifies conquest more.

It is much more difficult, then, to make the case that Islam, or the Norse religion for that matter, is a religion of peace - particularly as compared with Christianity or Buddhism. Of course atheist Dawkins/Hitchens types who believe religion in itself is dangerous might reject any religious adherent, regardless of creed. But even the most staunchest atheist should appreciate the distinction just as the religious should distinguish between an atheist hippie and a Maoist revolutionary when it comes to the non-aggression principle.