H. Chase Stevens Logo
blog · schedule · résumé · public key · contact


Most Common Tags

  1. programming
  2. python
  3. code
  4. philosophy
  5. evolution
  6. game design
  7. probability
  8. video games
  9. genetic algorithms
  10. government

Archives

Loading

Posts with tag "internet":

Democracy, Anonymity and the Prisoner's Dilemma

posted on: Friday, November 25, 2011 (1:56 pm) by Chase Stevens

Human beings are social animals. We live and interact in societies, adopt social norms, and incorporate our society into our identity. I would even say that our sense of justice, morality, and fairness stem from the fact that we are constantly interacting with each other within (in the ancestral environment) a mostly closed community. Doing so means that we are in a constant, mutiplayer iterated prisoner's dilemma, wherein we can earn reputations which will influence our interactions with others. For those not familiar with this concept, allow me to explain: the prisoner's dilemma can be explained as a two-player game. Each of the two players has but a single option: to either cooperate or to defect (in the original scenario, there were two prisoners who could either choose to "rat out" their criminal accomplice or to remain silent). Both players cooperating produces a moderately good outcome for both, whereas both defecting produces a mutually bad outcome for both. Should one player choose to cooperate while the other chooses to defect, the cooperating player gets the worst possible outcome and the defecting player gets the best. This can be represented in the below table:

Player 1 CooperatesPlayer 1 Defects
Player 2 CooperatesPlayer 1: 3
Player 2: 3
Player 1: 5
Player 2: 0
Player 2 DefectsPlayer 1: 0
Player 2: 5
Player 1: 1
Player 2: 1
If two players choose to play only one round of this game, the optimal strategy is to defect, as defection will net an average of 3 points, whereas cooperation will net only 1.5. Moreover, if this game is viewed under the lens of the maximin principle (which states that you should opt for the decision that will have the best worst-case scenario), the worst case for cooperating gets you 0 points, whereas defecting ensures you are rewarded with at least one point.

However, if two players choose to play this game for a number of rounds, the general best strategy is to behave in an altruistic but reciprocal manner (although for larger groups and more complex but similar games, other more refined strategies come into play). This is to say, initially assume in good faith that your partner is going to cooperate and do so yourself, but if they defect, defect yourself in turn. When this is applied to a larger group, this translates into looking into the reputation of the person you have been partnered with, seeing what their record is in terms of defection and cooperation, and responding accordingly.

As has been a fairly recent focus of attention, this poses a problem on the internet. Online, being anonymous (or at least having the ability to operate under a discardable pseudonym) is the rule, not the exception, the result of which being that you either are incapable of gaining a reputation or can shed one easily if necessary. This breaks the connection between iterations that allows for cooperative strategies in the prisoner's dilemma, essentially turning the game into a series of one-off rounds, as neither party can ever truly know whom they're interacting with. This is only compounded by the fact that human empathy grossly decreases when we're not face-to-face with one another; inability to observe the facial expressions, verbal tone, and body language of a person you're interacting with impairs your ability to create a model of that person and thereby your ability to empathize with them. This leads to people on the internet often making incredibly callous, distasteful and offensive statements, the likes of which they would never normally make "in real life," the obvious example of this being the infamous 4chan. If given the opportunity, such as in the massively mutiplayer EVE Online, people will lie, cheat, steal, betray, backstab, defraud and destroy each other with nary a second thought. However, when these people are encountered offline they are typically soft-spoken, courteous and otherwise normal.

Of course, the internet isn't the only environment in which this can happen. Driving also grants us an unusually high level of anonymity while cars themselves abstract our fellow humans into mere "drivers". This results in a casual level of rudeness that seems to avoid descending into complete sociopathic chaos only by the virtue of everyone having some degree of self-preservation.

Where else are these environmental conditions manifested? The voting booth. Although obviously a tad more complex than a prisoner's dilemma, it stands that voters quite often are put in a position where they could vote in a manner directly in accordance with their own self-interest, and not that of the community/country/what have you. Given what things people do in other circumstances when granted anonymity, it does not seem overly bold to assume that at least a certain percentage of people vote selfishly. The natural question that therefore arises (and which I'd like to address) is that of the benefits of voting records becoming public.

Before delving into that, however, we should investigate whether or not votes being made public would really change anything. It could perhaps be the case that people would continue to vote the same way regardless. However, the Bradley effect would seem to claim otherwise. To be concise, the Bradley effect refers to a phenomenon wherein non-white candidates score higher in polls than they do once votes have actually been tallied, the presumption being that people being polled claim that they'll vote for the non-white candidate when asked by a pollster to avoid a potential accusation of racism. Historically the effect seems to have been responsible for polling discrepancies of up to 12 points. A reverse-Bradley effect has also been observed, such as in the case with former Louisiana State Representative David Duke, a Nazi sympathizer and former KKK Grand Wizard, who won his position despite few people being willing to admit to pollsters that they supported him. So indeed, it seems that, at least in some cases, people will change their votes (or at least admitted voting intentions) if the way they voted will be made public. Although perhaps the difference wouldn't be as great as observed in the above cases (more being at stake when actually voting, as opposed to telling someone how you'll vote), it would be reasonable to expect to see some change.

What is the advantage of having peoples votes be influenced by societal pressure? Well, for one, it would seem as though we might be able to avoid having KKK members as state representatives, which most people would agree is a definite boon. We could also expect to see more effects such as this, where people wouldn't vote in ways that others might find objectionable. One example might be gay marriage: those who privately oppose it could be far less willing to have their objections exposed publicly (this, of course, assumes that the legalization of gay marriage would be a "good thing"). Public voting outcomes could be as different from the anonymous voting outcomes we have now as behavior in public is from anonymous online behavior.

Of course, there are numerous objections to this course of action. What if society's standards are unconscionable? One might easily imagine an area of the country in which the pressure would be to vote for the KKK member, as opposed to against him. Could those who would otherwise oppose racism then be peer pressured into voting against their morals? Moreover, in a less extreme case, could the Bradley effect cause people to vote for non-white candidates not because of political ideology, but instead to not appear racist? Such a system would also enable a great deal of coercion to come into play, enabling unscrupulous groups or individuals to influence votes through bribery or threat. Buying votes would be a simple matter if only one could verify how someone voted. Lastly, does one not have a right to vote selfishly? It could easily be argued that the voting booth is one of the few places in which one can express their opinions and influence the world around them in an honest way, free from repercussions or persecution.

While the suggestion of having one's votes be made public might not be a likelihood, it's probably not as fanciful as we might be inclined to imagine. Although currently no one has access to how you voted, in the United States any interested party can find out whether or not you voted. In fact, in 2009 a group in Virginia called "The Know Campaign" sent out a letter to voters informing them not only of their past voting history, but also that of their neighbors, all in an effort to use societal pressure in order to get people to vote more (the implication being that the neighbors have also received your voting record). The campaign was directly stated by executive director Debra Girvin as being not a "shame tactic", but instead a "peer pressure tactic." Although the efficacy of the campaign hasn't (to my knowledge) been disclosed, it did generate at least 1,000 letters of complaint.

Tags: anonymity, democracy, ethics, evolution, game theory, gaming, government, internet, morality, philosophy, probability, society, united states, voting

Exporting Color Scheme Designer Palettes to Paint.Net

posted on: Saturday, November 19, 2011 (10:59 am) by Chase Stevens

If you're like me and use the excellent tool over at Color Scheme Designer in conjunction with Paint.Net, you may have grown frustrated with creating palettes one color at a time by copy-pasting hex values. No longer! Below, please find a short python application I wrote (which even uses a fancy and unnecessary GUI) to create Paint.Net palettes from Color Scheme Designer palettes. Just export your Color Scheme Designer palette to text, copy what the site gives you, paste it into the application, and click "convert and save". The resulting file is ready to import into Paint.Net at your leisure.

from Tkinter import *
from tkFileDialog import asksaveasfilename as save
from tkMessageBox import showinfo as disp

def convert():
    intext = str(text.dump(1.0, END))
    intext = intext.split(' = ')
    colorlist = list()
    for ss in intext:
        if ss[0] == '#':
            colorlist.append(ss[1:])
    filename = save(defaultextension='txt',initialdir='\%HOMEPATH\%\\My Documents\\Paint.NET User Files\\Palettes')
    palette = open(filename, 'w')
    for color in colorlist:
        palette.write('FF%s\n' %color)
    palette.close()
    disp('File Saved', 'File successfully saved as %s.' %filename)
    
root = Tk()
menubar = Menu(root)
menubar.add_command(label="Convert and Save", command=convert)
menubar.add_command(label="Quit", command=quit)
root.config(menu=menubar)
scroll = Scrollbar(root)
scroll.pack(side=RIGHT, fill=Y)
text = Text(root, wrap=WORD, yscrollcommand=scroll.set)
text.pack()
scroll.config(command=text.yview)
root.mainloop()

Tags: code, color, design, internet, programming, python, tkinter, web, web design

The Doomsday Prediction

posted on: Wednesday, November 16, 2011 (1:47 pm) by Chase Stevens

Although not as popular as it was during the Cold War, the notion that society is degenerating, international relations are getting worse, and humanity is on the brink of World War III still seems to be a fairly common belief. Moreover, many would have you believe that the apocalypse is due around 2012, a meteor is headed directly for earth, Yellowstone's about to blow, the next ice age is neigh, the magnetic fields of the planet are suddenly about to switch, and a long-overdue solar flare is about to wipe out all of our necessary technological systems. Still others warn that the singularity is near, robot uprising is inevitable, and grey goo will rapidly devour the world. I won't go into detail on other such scenarios. Within the group of people you know, I'd wager at least some of them think that civilization is not long for this world. This is reflected over and over again in our media, producing a plethora of post-apocalyptic films (many of which are quite good). Even if you don't subscribe to this school of thought, clearly there is still some manner of nagging concern which can be preyed upon. However, regardless of present circumstances, the idea that civilization as we know it will terminate within the next century is significantly discredited by employing the simple assumption that we are not special. More specifically, what I mean is that almost certainly we are not at the end of civilization's lifespan, and not at the very beginning (relative to what will come in the future), but instead somewhere in the middle. One can with 95% certainty say that we are currently somewhere in the middle 95% of civilization's lifetime (this is to say, supposing we were to choose 100 random points during the time that civilization will or has existed and claim that it was in the middle 95% of civilization's existence, we would be right 95% of the time (which, arguably, may not be a high enough degree of confidence)). We do have to employ a second assumption, specifically regarding how long "civilization" has been around. A nice, fairly conservative estimate would say that civilization has been around for 7500 years, which places us back at roughly the time the Egyptians were establishing themselves more formally and transitioning into a society which would later become pharaonic. Using these two assumptions, we can then evaluate the following formula in order to get the minimum amount of time civilization should last for:

A / (C + .5 * (1 C)) A
In the above, A is the current age of civilization (7500 years), and C is our confidence interval (95%). A quick calculation using these values yields roughly 192 years. Ergo, we can assert with 95% confidence that civilization will last for at least the better part of two centuries. For comparison, the maximum amount of time we could (with 95% confidence) predict civilization lasting for is 292,500 years, as given by the formula
A / (.5 * (1 - C)) - A
In short, civilization isn't going anywhere, at least within our lifetimes. In fact, even raising the confidence interval to 97.5% gives us 95 more years. The interval must be raised to a whopping 98.68 percent until civilization ending in as little as 50 years becomes a possibility, at which point we'd also be stating that civilization could last as long as 1.13 million years (as our interval approaches 1, the lower bound of our predicted remaining civilization lifetime nears 0 and the upper bound approaches infinity, which is to say, "Sometime between as you're reading this and never"). Another way of putting this is that there is a 99.34 % chance that civilization will not end within the next 50 years, putting the likelihood somewhere between the chance you have of dying from poisoning and the chance you have of dying from a fall (statisticians, please feel free to correct me if this last figure is wrong). It should now be apparent to the reader that if I were smarter, I would have titled this post "Models Show Civilization Could End in as Little as Fifty Years". With that settled, you can get some pretty fun results with these formulas; for example, while the world wide web will probably last between half a year and 819 years, the internet will probably last between one year and 1,638 years. Apply them yourself for fun and profit!

Tags: civilization, futurism, internet, math, probability, society