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:
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.
Player 1 Cooperates Player 1 Defects Player 2 Cooperates Player 1: 3
Player 2: 3
Player 1: 5
Player 2: 0
Player 2 Defects Player 1: 0
Player 2: 5
Player 1: 1
Player 2: 1
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 == '#': 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
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)) – AIn 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)) - AIn 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