Social Media Analysis – the Freedom and Justice Party

The “About Us” page of the English-language Freedom and Justice Party web site (the political arm of the Muslim Brotherhood in Egypt) is 4000 words long. It begins with a “Foundation Statement,” moves on to “Vision and Methodology” and then to three numbered lists of “Principles,” “Policies” and “Objectives.”

The home page is a dense grid of news headlines, menus, cheerful banners which lead to deeper sections of the FJP site, media clips, and at the bottom right, a ‘poll’ (‘Do you think the government crackdown on several NGOs is 1.) Politically Motivated, 2.) Legitimate, 3.) Can’t tell’). I count 55 individual headlines, including two scrolling news feeds. The word ‘Sharia’ does not appear, nor does ‘Quran,’ ‘Prophet,’ ‘Jihad,’ or ‘military.’ There is a section with several articles that trumpet the place of women in the party, and two that specifically highlight good relations with Christians. The tone of the headlines is technocratic – committee meetings, visits from foreign officials, strategy discussions. The site also links to a Twitter feed and Facebook page.

The Muslim Brotherhood was founded in Egypt in 1928 and has been banned there twice following militant activities. It was not instrumental to the Arab Spring uprising that overthrew the Mubarak regime, but as the largest opposition party during the final years of Mubarak’s reign, it was naturally poised to step in to a significant governing role. Fjponline.org, as an English-language site, tells the story of a busy, secular political party dealing with all the daily chores of political life. It makes an announcement to the outside world: “We are serious, sober and trustworthy. We ready to govern.”

What it is really doing is trying to divert foreign attention from the aspects of the Muslim Brotherhood’s mission that are objectionable to the West. The Brotherhood’s motto (not to be found on jfponline.org) is “God is our objective; the Quran is our constitution, the Prophet is our leader; Jihad is our way; and death for the sake of God is the highest of our aspirations.” Their first principal is the introduction of Sharia law, and their second is to “unify Islamic countries and states.”

Oddly enough, of the other groups presented in class, the Freedom and Justice Party reminds me most of Educators for Excellence, in the sense that both organizations have built sites framed around a core misrepresentation of themselves. E4E professes to be apolitical when its true mission is to influence legislators. Both FJP and E4E use social media as part of their outreach efforts, but are only interested in the outgoing channel of these tools. They do not give outsiders any easy way to engage in conversation with them – or to contradict their message. In essence, both groups are using social media as one facet of a cynical PR strategy: they wish to appear open and friendly without having to endure the inconvenience of actual public engagement.

Posted in ITP Spring 2012, Political Uses of Social Media | Leave a comment

Weeks Four and Five Update

I really wanted to take this course AFTER Nature of Code (Dan Shiffman’s signature course which covers the simulation of physical systems and moves from there to intentional agents and neural networks) as an overview and primer. Unfortunately fate and the class-selection algorithm conspired against me – ironic, since my main reason for studying at ITP is to study algorithmic decision-making.

So now I am embarked on the process of trying to sweep up as much general knowledge about algorithms as I can, while also building a specialized agent-based model that is far beyond my current programming capabilities.

Algorithms in General

The gateway to algorithmic wizardry was recommended to me by Heather — M. Tim Jones’ Artificial Intelligence: A Systems Approach. This week I skimmed the book to get the lay of the land before diving in for an in-depth review. I also worked through the first chapter on Uniformed Search. As I learn more about these, I’ll come back and fill in some details about them.

Here are the algorithms it covers:

  • Uninformed Search
    • Depth-First Search: Begin at the starting node of a decision tree and follow one branch as deep as it goes. Then back up and follow the next branch, continuing until a solution node is found. Not optimal (does not necessarily find the shortest path to the goal node) and only complete if there are no loops in the decision tree; otherwise it can get cycle in a loop and never find a solution. Potentially very slow if the graph is very deep.
    • Depth-Limited Search: As above, but the algorithm determines an arbitrary maximum depth to search. Not complete – the goal node may be deeper than the maximum depth, and not optimal – returns the first successful path it finds even if there is a shorter path.
    • Iterative Deepening Search: Performs a depth-limited search of depth 1, then depth 2, etc. until it reaches a solution. Complete and optimal in unweighted graphs. It is the preferred algorithm when the depth of the solution is not known. Same time complexity as DFS and DLS – it can potentially search every node in the graph before finding the solution.
    • Breadth-First Search: Search the graph from root node in order of distance from the root. Different from IDS in that each node that is searched must be stored – so it has a higher spacial complexity (higher memory requirements). They also differ in how they handle the queue of discovered but unsearched nodes – IDS uses a LIFO (Last-In-First-Out) implementation and BFS uses a FIFO (First-In-First-Out) implementation. I’m not sure what the significance is in terms of efficiency. BFS is complete and optimal. Preferred if the solution is known to be close to the starting node.
    • Bidirectional Search: Performs two breadth-first searches simultaneously, one from the starting node and one from the goal node. When both searches find a common node, the path from start to goal can be reconstructed. Complete and optimal, but only possible if the goal node is known in advance. Advantage is that the time and space complexity are half an ordinary BFS, since it only needs to search half the depth of the graph.
    • Uniform-Cost Search: A method for finding the path with the lowest cost on a weighted graph. From the starting node, evaluate the path costs of each connected edge. Put them in a priority queue from least cost to highest. Follow the path at the front of the queue and again evaluate the costs from that node, adding to the accumulated cost of the current path. Then reorder the priority queue (least to highest cost), pick the lowest cost path, and repeat. The solution is found when the path at the top of the priority queue contains a solution. Optimal and complete if the path costs are non-negative. Time and space complexity are the same as BFS.
  • Informed Search
    • Best-First Search
    • A* Search
    • Hill-Climbing Search
    • Simulated Annealing
    • Tabu Search
  • Constraint-Satisfaction Algorithms
    • Generate and Test
    • Backtracking
    • Forward Checking and Look Ahead
    • Min-Conflicts Search
  • AI and Games
    • Minimax Algorithm
      • Minimax with Alpha-Beta Pruning
  • Knowledge Representation
  • Machine Learning
    • Decision Trees
    • Nearest Neighbor Learning
  • Evolutionary Computation
    • Genetic Algorithms
    • Genetic Programming
    • Evolutionary Strategies
    • Differential Evolution
    • Particle Swarm Optimization
  • Neural Networks
    • Supervised Neural Networks
      • Least-Mean-Squares
      • Back Propagation
      • Probabilistic Neural Networks
    • Unsupervised Neural Networks
      • Hebbian learning
      • Simple Competitive Learning
      • k-Means Clustering
      • Adaptive Resonance Theory
      • Hopfield auto-associative model
  • Intelligent Agents
  • Biologically Inspired and Hybrid Models
    • Artificial Immune Systems
    • Simulated Evolution
    • Lindenmayer Systems
    • Fuzzy Logic
    • Genetically Evolved Neural Networks
    • Ant Colony Optimization

Some of these are familiar to me in a vague way from various readings I’ve done over the years, but I’m excited to review them in direct relation to one another, with many gaps filled in.

Algorithms in a Social Science Context

Peter Darch recommended The Stag Hunt and the Evolution of Social Structure by Brian Skyrms. This book proposes a variant on the Prisoner’s Dilemma which has the effect of encouraging cooperative behavior in certain circumstances. (The metaphor is in which  circumstances individual hunters will choose to hunt alone (to catch a rabbit which they get to keep for themselves) or hunt in a group (to catch a stag which they must share with other hunters). Increasing the number of hunters increases the chances of catching a stag, but also increases the number whom it must be shared among)). Adjusting the parameters (chance of catching each animal, caloric value of each animal (or portion)) results in certain circumstances in which it is rational for individual hunters to team up. Skyrms then demonstrates some agent-based models that reflect this dynamic. I am still thinking about hat parts of this approach I can use in my work.

Programming Challenges

I am well behind on the programming. My first task is to expand my previous ABM so that I can use it as a statistical benchmark. I struggled for quite a while to figure out how to make Processing emulate a web form (I even considered importing the parameters into Processing from an actual web form). Dan Shiffman turned me on to a Processing library called controlP5 that provides this functionality.

My goal is to complete the statistical version by next week and to have built a basic spacial version that looks more like a classic ABM, with agents interacting in space on a grid.

Conceptual Challenges

I am still caught up in the question of how to define the fitness function. The version I have now (minimizing the Bayesian Regret of the population as a whole measured across abstact “issues”) is interest as a way of directly comparing different models. But there is no functionality to this measure. The law is partly about constraining the range of citizen action – so I am still looking for an elegant way to use a single character string to represent the scope of agent behaviors, and allowing the ‘law’ to represent contraints in those behaviors.

This is converging somewhere in the neighborhood of modeling the Tragedy of the Commons…possibly. There could be a renewable resource (or a few), agents which harvest that resource, trade, possibly steal or kill, and have a happiness measure based on some combination of wealth and whether they have been abused by other agents. Hmm.

One problem I keep bumping up against is that ABMs are designed to model emergent behaviors by agents acting locally. But I’m trying to explore some dynamics associated with political activity, which (for some people at least) means thinking about the larger society in which one operates – exactly what agents aren’t supposed to do. But could they? Does it just deepen the model to provide some capacity to for the agents to think globally (and is it technically possible….). I’m still working out the limits of this approach, no to mention exactly what I’m trying to do.

Posted in ITP Spring 2012, Research Studio: Algorithms | Leave a comment

Week Three Update

Research Plan

The overarching goal is to explore the dynamics of a hypothetical decentralized decision-making process through the lens of agent-based modeling. By the end of the semester I would like to have a model which includes a spontaneously-generating social graph and a dynamic, scalar decision-making process.

Fundamental Challenge:

  • How to measure the results?
    • Baysian Regret measured against abstract ‘Law String’ – the current version
    • Something else – it would be nice if the model could posit a series of problems which the ‘society’ must solve – similar to a Genetic Algorithm with the complication that the agents have selfish motives as well as altruistic ones

A Proposal:

The “generic interactive unit” (agent) consists of three functions – INPUT (sensing), PROCESSING (cognition), OUTPUT (action), in a dynamic (often parallel, often self-referential) loop. Emergence is the phenomenon whereby a collection of individual units operating in parallel produce predictable ‘meta-behaviors’. This model is endlessly extensible. c.f. Conversations paper.

Week 3

  • PROGRAMMING : Build a statistical version of the current model
    • Intro page which allows user to set parameters:
      • number of agents
      • number of voters per proposal
      • normalized or linear law preference strings
      • granularity of preference strings
      • Checkboxes to turn on and off:
        • whether the proposer is included as a voter
        • passion function – how deeply each voter cares about each preference – affects BR calculations and participation likelihood
        • noise (reflecting agents’ misunderstanding of the law or its effects on them)
        • random law (for comparison)
    • Let the program runs each combination 1000 times and summarize the sata to  average BR, StDev of BR, volatility (frequency of law changes per 1000 iterations)
    • Observe if there are patterns apparent in the various configurations
  • STUDY:
    • Growing Artificial Societies
    • The Stag Hunt and the Evolution of Social Structure

Week 4

  • PROGRAMMING : Create a spacial version in which agents can move, interact and propose local ‘laws’.
    • Allow user to set parameter:
      • Size of ‘field’
  • STUDY:

Week 5

  • PROGRAMMING :  Create a spontaneously self-generating social graph that evolves a power-law distribution
    • Introduce agent variability:
      • Trustworthiness
      • Gregariousness
  • STUDY: TBD

Week 6

  • PROGRAMMING : Create a system for innovation and creativity – a ‘genetic’ legal system that accounts for novelty
  • STUDY: TBD

Week 7

  • PROGRAMMING : Copy the system of trade from Growing Artificial Societies; then add to that a system for setting the rules of exchange which is itself evolutionary
  • STUDY: TBD

Week 8

  • PROGRAMMING: Explore the possibility of a self-referential model – one that alters its own rules as it progresses
  • STUDY: TBD
Posted in ITP Spring 2012, Research Studio: Algorithms | 1 Comment

Agent-based Models in the Social Sciences: Literature Review

            The literature is older than I imagined. The first agent-based examination of a social phenomenon, Thomas Schelling’s “Models of Segregation,” was published in 1969. Though the limitations of computing power in that era inhibited the growth of the field, a steady stream of work continued to emerge. The field rose to greater prominence with Robert Axtell’s famous programming contests of the early 80s, which pitted software agents against one another in the classic iterated Prisoner’s Dilemma. This rise in stature was assisted by a publicity-friendly winner: the simple Tit-for-Tat agent, whose complete algorithm consisted of “Cooperate the first round, then choose whichever move the competitor chose the previous round,”  defeated competitors of much greater complexity, and was interpreted by some journalists as a guideline to basic morality.

            Joshua M. Epstein and Robert Axtell’s 1996 milestone “Growing Artificial Societies” was the first work to attempt a generalized model of society through agent-based modeling. Proceeding from their argument that the social sciences were mired in isolated intellectual silos, each giving lip-service to the notion that no one field could capture the full complexity of human society, and yet unable to find any means to combine theories, Epstein and Axtell argued that Agent-Based Modeling was uniquely positioned to examine these fields in an integrated model. So their “Artificial Society” placed software agents on a field of variable resources; it gave the agents metabolism, vision and mobility, and layered on rules for trade, reproduction with genetic variation, combat, culture, credit and disease transmission. With these tools they were able to examine social phenomena from ‘the ground up’ – identifying where the massively parallel interactions of limited agents matched, or did not match, the relevant social theory. For example, it was observed that commodities traded in the artificial society never reached an equilibrium, ‘market-clearing’ price, though it came closest when agents had fixed preferences, were immortal, and traded for a long time – in other words, when they most resembled the homo economicusof classical economic theory.

In fact, “Agent-Based Models in the Social Sciences” is not a field; there are no strict boundaries to delineate which models or techniques are useful to the social sciences and which are not. Epstein and Axtell themselves acknowledge the influence on their work of numerous related fields – cybernetics, distributed artificial intelligence, cellular automata, genetic algorithms, genetic programming, artificial life, and individual-based modeling in biology. All of these studies can really be subsumed into the overarching category of complex systems analysis. This makes it difficult to identify the ‘key literature’ for the social sciences in particular.

OVERVIEWS

MODELS IN FINANCE AND ECONOMICS

  • Economics as an agent-based complex system: toward agent-based social systems sciences, Hiroshi Deguchi (2004)

MODELS OF SOCIAL NETWORKS

MODELS IN LAW

  • Web-based collaboration and the organization of democracy, Elazar Lev-on (2005)
  • Colloquium simulating, Eric Bonabeau (2012)

CELLULAR AUTOMATA

Posted in ITP Spring 2012, Research Studio: Algorithms | 2 Comments

My Thoughts in a Nutshell

I directed my dad to this article which quotes heavily from my earlier blog post. He asked a reasonable question:

…is it your thesis that governments will “go away” as the internet spreads?

I am not sure I understand, or understand how the typical government stuff….with or without corruption….will get done, like building roads, regulating drug and car companies, managing the Army, etc.

A very reasonable question, which I admit that I only partially answered here. (I blame the time limitations of a new semester). But here’s a sketch – a pretty good distillation of my current thinking on this topic.


To answer your questions – I don’t think governments will go away. I think ‘nations,’ as they are currently constituted (large, contiguous geographical units with a centralized bureaucratic government that holds a monopoly on deadly force) will hollow out to the point where they are mostly symbolic. What will replace them? I don’t know. But my guess at the moment is a much larger group of small, independent polities overlain by a lot of very fluid, independent interest groups, which pressure the polities to adhere to various alliances and international agreements. Kind of like the old city-states of Europe, but with a lot more transparency and a hyperconnected trans-national citizenry.

This is basically an evolutionary argument. I think that, just like organisms, institutions compete with one another over time for resources and energy. Those that can’t compete, lose. But governments also have to maintain the compliance of their citizens to operate efficiently. All governments have to choose a point on the spectrum between forcing compliance through autocratic bullying and earning voluntary compliance through guarantees of civil rights, effective services such as roads and infrastructure, and generally making people happy to live there and invested in the well-being of the polity as a whole. Not surprisingly, the most powerful countries in the world are those that choose the latter end of this equation (moderated of course buy other factors such as population and natural resources), because they have to invest less energy in controlling an angry population and their repressive measures inhibit the growth of the economy, which in modern times requires a skilled and educated populace who are less likely to accept the repression.

The “representative democracy – plus – corporate/capitalist economy” model emerged as the winner in the 20th century because it was best suited, within the boundaries of available information technology, to effectively marshall the energy of the population. But just like the printing press, the Internet is a disruptive technology in that it unleashes new efficiencies in human interaction and coordination. The Catholic Church, which was the dominant political entity in Europe before the printing press, found itself out-competed by institutions the embraced the new technology, and by the Treaty of Westphalia 200 years later the political order had been overturned and nations became the new dominant form of organization. The Internet’s going to make everything change again.

I’m not expecting any nation to just give up and go away; it’s more that as people find that Internet-driven institutions meet their needs more effectively they will naturally shift their loyalty to these organizations, and nations will be faced with the uncomfortable choice of either embracing the new practices or retaining the old bureaucratic system and forcing compliance through repression. This is already beginning – bills like PIPA/SOPA are deliberate efforts to countervail the power of networked citizens who happen to enjoy creating, remixing, and sharing their own cultural products, rather than consuming the product that is offered to them by the corporate media. 90% of all US TV, radio, and newspapers are owned by 6 corporations, and they’re very unhappy that they don’t have the same market dominance over the Internet. So they’re trying to force that control through legislation. There are other examples too. Unfortunately I think the US is going 180 degrees in the wrong direction right now, but that’s not very surprising; organizations, like organisms, are concerned first of all with their own survival.

Posted in Open Source Democracy, Other Stuff | Leave a comment

Web Design Final – The Dismal Pirate Game

Well, here was an example of an ITP project that didn’t get as far in execution as my colorful hopes for it.

The Dismal Pirate Game

My plan was to make an amusing, very capricious, and very simple pirate game. You make a handful of choices at the beginning on how to equip yourself, and then a bunch of random rolls plus look-up tables would send you on a different journey each time. I was hoping to tap into that old-school Dungeons & Dragons vibe, where characters were prone to suffer horrible, grisly deaths from sheer bad luck, and consequently merely surviving an adventure was an occasion to gloat to ones friends and bask in the brief favor of the polynomial gods. So I had planned entries like having boulders from nearby volcanoes crashing through the deckboards, having the crew cannibalize the captain after falling under the sway of a creepy jungle cult, and finding the body of Blackbeard in a coffin in the belly of a shark.

Alas it was not to be. Not enough time. Instead, we have a game which does two things – chides you if you’ve overspent your outfitting funds, and if you have not, sends you on a journey which simply reduces the food supply on the ship until the crew starves and mutinies. Fun!

This is built on Sinatra, which was brand new to me. I hope to learn more about this framework next semester.

Posted in Comm Lab: Web, ITP Fall 2011 | Leave a comment

Comm Lab: Animation – “Love is Non-Euclidean”

The second animation assignment and my second collaboration with Crys Moore. Since we’d already planned out an M. C. Escher adventure for our first animation, it made sense to use all that material here. The story changed quite a bit though, due to our newfound knowledge of how much work animation requires. It was pared down substantially, from a boy chasing his cat all over the Escher world to a domestic spat between two slightly co-dependent lovers.

Posted in Comm Lab: Animation, ITP Fall 2011 | Leave a comment

P Comp Midterm – Media Controller

The inspiration for this project was described by Phil; and the endgame was described by Alex. I’m finally getting around to describing the middle…

In short, we wanted to build a display that would mimic the parallax effect of looking out a window into a physical landscape, and enhance that effect by creating exaggerated motion when the user moves back and forth in front of the display.

Visually, we took our inspiration from the classic side-scrolling video games of the eighties, which achieved a 3D effect by drawing several different flat layers which moved across the screen at different speeds.

First we looked for a photograph with a sharply-defined foreground, middleground, and background, and found this iconic image of pre-9/11 New York.

A little Photoshop magic, and we had three layers. (Because the foreground had to move farther than the other pieces, we extended it beyond its ordinary length).

Then we built a test sketch in Processing, controlled by the keyboard. Try it! (Due to the vagaries of putting Processing sketches online, it seems that you have to click on the applet window before you can do anything. After that, press j and l to move the scene back and forth).

Here’s the code:

PImage fground;
PImage mground;
PImage bground;

float locX, targetLocX;

void setup() {
  size(900, 708);

  fground = loadImage("Foreground2.png");
  mground = loadImage("Middleground2.png");
  bground = loadImage("Background.png");

  locX = 0;
  targetLocX = 0;
}

void draw() {
  background(125);
  imageMode(CENTER);
  if (targetLocX != locX) {
    locX = lerp(locX, targetLocX, 0.1);
  }
  image(bground, width/2 + 15 * locX, height/2 - 50);
  image(mground, width/2 + 39 * locX, height/2 + 55);
  image(fground, width/2 + 200 * locX, height/2 + 230);
}

void keyPressed() {
  if (key == 'l') {
    if (targetLocX >= 3) {
      targetLocX = 3;
    }
    else {
      targetLocX = targetLocX + 1;
    }
  }
  else if (key == 'j') {
    if (targetLocX <= -3) {
      targetLocX = -3;
    }
    else {
      targetLocX = targetLocX - 1;
    }
  }
  else {
  }
}

Basically, the sketch allows for 7 virtual locations, numbered -3 to 3. It starts at zero. Each time a key is pressed, the sketch sets a new ‘target location’ which represents the position the images should move to, and then uses a LERP (Linear Interpolation) function to move the images smoothly to the target location. The foreground moves 200 pixels between each position, the middleground moves 39, and the background moves 15.

Posted in Intro to Physical Computing, ITP Fall 2011, Other Stuff, Projects | Leave a comment

Comm Lab: Animation – “Egg Radio”

Before I say anything else, I need to acknowledge my advisor Dan O’Sullivan for convincing me to take this class. I had built a schedule that was centered entirely around my plans for a possible thesis, and Dan gently suggested that taking something unexpected would be good for me. He was right. I am hugely enjoying this class.

Animation is a seven week class, so we jump right in. There are two projects – the first is stop-motion and the second digital, using AfterEffects. Crys Moore and I seemed to have an immediate repor (based on our admiration of each others‘ Thaumatropes – who can deny the power of an exploding head and a man fencing a shark?) so we agreed to work together.

Our first idea was to build a story in which someone traversed a bunch of M. C. Escher landscapes, looking for his cat. When our teacher, Marianne Petite, pointed out that the project was better suited to AfterEffects, we dreamed up a claymation about a lonely guy who gets an unexpected package in the mail.

I really enjoyed this process. The physicality of the set and props (I was fresh off my discovery of the laser cutter, and was psyched to use it again for furniture) was really satisfying to work with, and though it takes forever, the slow pace also gives you lots to time to think about camera angles and alternatives to your storyboarded plans. It also forces you to distill your story down to its essence, because everything is so labor-intensive.

Crys has some still photos as well.

Posted in Comm Lab: Animation, ITP Fall 2011 | Leave a comment

ICM Midterm (Part 2) – Dora Maar vs. the Flying Toast

An antidote to my other midterm – something fun. Dora Maar finally meets her nemesis, and battle ensues!

Dora Maar vs. the Flying Toast.

Posted in Intro to Computational Media, ITP Fall 2011 | Tagged | Leave a comment