\section{Introduction}
The evolution of cooperative behavior among seemingly competing organisms presents a challenge to the theory of natural selection \cite{axelrod:1984}.
An action that benefits others and comes at a cost to oneself should eventually disappear. On the contrary, there are numerous 
biological and social settings in animal and human societies where cooperation is ubiquitous \cite{dugatkin:1997,sigmund:2006,nowakbook:2006}. 
Evolutionary game theory (EGT) \cite{maynardsmith:1973,maynardsmith:1982} provides a simple framework to study this puzzle. In each generation 
agents play a finite number of games and receive reward according to a 
specified payoff matrix, usually the \emph{prisoner's dilemma} game \cite{rc65}. At the end of each 
generation, players are reproduced proportional to their relative fitness, subject to mutation. Thus EGT mimics natural selection by increasing the relative 
abundance of better performing (in terms of accumulated reward) individuals.

The prisoner's dilemma (PD)   is one of the most widely used games to study the  evolution of cooperation \cite{doebeli_2005,Fogel:1995, boyd:1989, Farrell_Ware:1989}. 
PD is a simultaneous two player game where each player decides whether to  cooperate (C) or defect (D).
Mutual cooperation gives higher payoff than mutual defection. But if one player cooperates the other player is better off 
defecting. Thus each player has an incentive to ``free ride" at a cost to the cooperative player.
In the absence of any special mechanism defecting players would outperform cooperative players and (by natural selection) become dominant \cite{nowak_fiverules}.
The game serves as a metaphor for various real-world settings where there is a conflict between individual and group interest \cite{Hardin_1968_Commons}.

Although many solutions have been put forth to resolve this puzzle, most of these models rely on some notion of direct or indirect reciprocity.
In direct reciprocity \cite{trivers:1971, NowakSigmund1993} agents interact repeatedly, and after each interaction they update their response based 
on how cooperative (kind) or non cooperative (unkind)  the other agent was.
Indirect reciprocity \cite{nowak_id:1998, leimar:2001,nowak_nature:2005} relies on the notion that individuals are kind to those 
who are kind to others. Both models assume agents recognize their partner and know their previous interactions.
In large dynamic settings such an assumption would require advanced cognitive abilities.

Approaches that do not require reciprocity include kin selection and group selection models. In kin selection \cite{hamilton:1964,taylor:1992} agents 
are favorably biased towards their genetic relatives. It requires agents to differentiate between kin and non-kin agents and does not  
explain cooperative outcomes observed in unrelated individuals.
Group selection \cite{traulsen_nowak:2006a,wilson:1975} addresses these issues by proposing that selection works not only 
on individuals but also on groups.
Agents form groups and cooperate with other agents in the same group.

An interesting addition to the above reciprocity-free models of cooperation is the \emph{tag-mediated} partner 
selection \cite{riolo_axelrod:2001,riolo:1997}. Tags are simple observable traits or cultural artifacts which agents  use 
to favorably bias their interactions
with agents having similar tags. Experimental results \cite{riolo:1997} show that a tag based model can produce
stable cooperation even in single round prisoner's dilemma game.

In this paper, we are interested in developing a model of cooperation that does not require an agent's type or its past interaction to be known explicitly.
Our model is based on the notion that individuals are averse to income inequalities. This 
concept has been formalized and widely studied within behavioral economics as \emph{inequity aversion} \cite{diffavers}.
It was introduced  to account for outcome anomalies between experimental results and theoretical models. 
In the inequity aversion model, as proposed by Fehr and Schmidt \cite{diffavers}, individuals enforce income equality
by forgoing monetary payoff. If the material payoffs of players $i,\ j$ are $x_i,\ x_j$, respectively, the \emph{experienced utility} (which players maximize)
of player $i$ is given by
\[ U_i(x_i,x_j) = x_i - k_1 \cdot max(x_j-x_i,0) - k_2 \cdot max(x_i-x_j,0) \]
where $k_1<k_2$ and $0 \leq k_2 \leq 1$ are inequity aversion sensitivity parameters.  It follows from the above equation that the experienced utility 
is maximized when inequity is zero. 
The condition $k_1 < k_2$ implies that the decrease in a player's utility is higher when it is behind (in terms of payoff) than when it is ahead.
Fehr and Schmidt \cite{diffavers} show that the above model can account for cooperation observed in various human interactions.

Here we study the effect of using the social paradigm of inequity aversion as a criterion for partner selection. Instead of
defining experienced utility we simply allow agents to use accumulated payoff to select their game partner.
Thus inequity aversion in our context implies that agents avoid interacting with other agents whose accumulated payoff
is higher or lower than their own payoff.
Our experimental results  show that cooperation can emerge even if individuals receive only rudimentary environmental signals about others' well-being 
(and not their type or specific behavior). It supports the hypotheses that inequity aversion promotes cooperation among non kin \cite{evolve_ia}. 
We also observe a strong correlation between cooperation and inequity aversion that indicates a possible coevolution of these two behaviors \cite{evolve_ia}.

The rest of the paper is organized as follows. We  first present the model and define the partner selection bias as a function 
of income inequality. We then evaluate the model by considering both the well-mixed and the spatially structured population and highlight the 
evolutionary dynamics of cooperation and inequity aversion. We also study the effects of various parameters on the fraction of cooperative players in the environment 
and then conclude. 

\section{Model}
In this section we first introduce the general model where agents interact in a well-mixed population. 
We later present the model with spatial constraints.






\emph{Agents.}
The model consists of a fixed number of agents $N$.  Each agent is either the cooperative or defecting type.
The cooperative type always plays cooperate, and the defecting type always plays defect. 
Agents have an associated parameter $\lambda$ which gives a measure of how sensitive or tolerant  they are to payoff inequality.
A player's type and sensitivity parameter are subjected to evolutionary changes (see evolutionary step below).
Players also have an accumulated reward which is initialized to zero at the start of each generation and updated according to the payoff received 
in each game.

\emph{Payoff matrix.}
The payoff received by each player is specified by the standard prisoner's dilemma game:
\[
\begin{pmatrix}
b-c & -c\\
b& 0
\end{pmatrix}.\]


Cooperative players provide benefit $b$ to their opponent and incur a cost $c$ ($b>c>0$). Defecting players neither provide benefit nor incur any cost.
Given the payoff structure, the dominant strategy for each player, irrespective of what the other player does, is to defect.
Thus players end up with a payoff of zero instead of the mutually beneficial payoff $b\ -\ c$. This characterizes the dilemma between 
individual interest and group well-being. Without loss of generality, we use the following normalized payoff matrix:

\[
\begin{pmatrix}
1 & 0\\
1+c/b & c/b
\end{pmatrix}.\]

This allows us to study the game as a function of a single cost-to-benefit parameter, $0<c/b < 1$ \cite{fu_nowak2010,langer:2008}. 

\begin{figure}[t]
\begin{center}
    \includegraphics[width=0.35\textwidth,height=1.6in]{prob_interact2}
  \caption{$ {\cal P}(i,j)$ for different values of $r_j$ and $\lambda_i=\{ 5,1,0.5\}$ when $r_i=0$ and $\lambda_j=0$.}
\label{fig:probinter}
\end{center}
\end{figure}

\begin{figure*}[t]
\begin{minipage}[b]{0.74\linewidth}
\begin{minipage}[b]{1.0\linewidth}
\centering
\subfloat[]{\label{fig:coop_across_gen}\includegraphics[width=1.0\textwidth,height=0.75in]{coop_across_gen}}
\end{minipage}
\begin{minipage}[b]{1.0\linewidth}
\centering
\subfloat[]{\label{fig:lambda_across_gen}\includegraphics[width=1.0\textwidth,height=0.75in]{lambda_across_gen}}
\end{minipage}
\end{minipage}
\hspace{0.01cm}
\begin{minipage}[b]{0.24\linewidth}
\centering
\subfloat[]{\label{fig:coop_lambda}\includegraphics[width=1.0\textwidth,height=1.75in]{coop_lambda}}
\end{minipage}
\caption{(a) The fraction of cooperative players $f_c$ across generations for a typical run for $N=250,\ N_s=8$, and $c/b=0.45$. (b) The corresponding 
average $\lambda$ value of cooperative players. (c) The corresponding number of games with C-C, C-D, and D-D interactions vs $\lambda$.}
\end{figure*}

\emph{Partner selection and interaction.}
In each generation, agents are selected sequentially (random order) and play a single round of the prisoner's dilemma game.
Players use their accumulated payoff and sensitivity parameter to determine their game partner. 
The search space variable $N_s \in N$ gives the subset of agents from which players choose their partner.
Denote  $r_i,\ r_j$ as the accumulated payoff and  $\lambda_i,\lambda_j$ as the sensitivity parameters of players $i,\ j$, respectively.
The probability that player $i$ would accept player $j$ is given by

\[ \phi(i,j) = e^{-\lambda_i |r_i-r_j|} .\]

Given the search space $N_s$, player $i$ selects player $j$ such that the above probability is maximized, $j= \argmax_{j \in N_s} \phi(i,j)$.
We similarly define $\phi(j,i)$ as the probability that player $j$ would accept player $i$ as its partner. 
The probability of interaction between players $i$ and $j$ is given by
\begin{eqnarray}
{\cal P}(i,j) &  = &\phi(i,j)  \phi(j,i) \nonumber \\
	& = & e^{-(\lambda_i+\lambda_j)|r_i-r_j|}.
\label{eqn:probi}
\end{eqnarray}

The interaction is bilateral or with mutual consent since the probability of interaction depends on both players' sensitivity parameters.
We set the range of the sensitivity parameter $\lambda \in [0,5]$. If $\lambda_i=\lambda_j=0$, players are indifferent to inequity, and 
as $\lambda$ increases, they become increasingly inequity averse. 
The upper limit of $5$ ensures that the probability ${\cal P}(i,j)$ is close to zero, even for small payoff differences.
To illustrate, Figure.~\ref{fig:probinter} gives the probability of interaction between players $i$ and $j$  for different values of $\lambda_i$ when 
$i$'s accumulated reward $r_i=0$ and $\lambda_j=0$. For $r_j=1$ and $\lambda_i=0.5$, the probability of interaction ${\cal P}(i,j)=0.6$
which decreases to ${\cal P}(i,j)=0.006$ for $\lambda_i=5$.

Once the partner is selected, the PD game is played with the probability given in Equation.~(\ref{eqn:probi}). If both players
are cooperative, their accumulated payoff increases by $1$. If only one of the players is cooperative, 
the defecting player's accumulated payoff increases by $1+c/b$, and the cooperative player's accumulated payoff remains unchanged. 

We note that, unlike tag-mediated models of cooperation \cite{riolo:1997} where an agent's tags remain fixed in a given generation, in our model 
the accumulated payoff serves as a dynamic tag which changes after each interaction.

\emph{Evolutionary step.}
At the end of each generation agents are reproduced using the \emph{binary tournament } procedure \cite{suzuki:2005,goldberg:1991}: 
\begin{list}{}{\labelsep=0.3em \labelwidth=1em \leftmargin=1.5em \parsep -0em \partopsep -0.0em \itemsep 0.2em}
\item [(1)] Two distinct agents are randomly selected for a tournament, and the agent with the higher fitness value is declared the winner  
(we use the accumulated reward as the fitness value).  
\item[(2)] A copy of the winner, called the \emph{offspring}, is added to the new generation and the above procedure is 
repeated  $N$ times.
\end{list}



Additionally, a mutation is applied to each offspring. The mutation value gives the probability with which the offspring's type is randomly reset to either 
the cooperative or defecting type.
Since the sensitivity parameter is a continuous variable, we apply mutation
by adding, with probability $\mu$, Gaussian noise with mean $0$ and deviation $1$ to the inherited $\lambda$ value \cite{riolo_axelrod:2001}. 
The accumulated reward of the offspring is set to zero. The algorithm in Table~\ref{algo:a_interact} provides the pseudo code of the model. 

\begin{algorithm}[H]
\caption{Algorithm for agent interaction}
\begin{algorithmic}
\REQUIRE $\mu,N,N_s$.
\WHILE {generation $g \leq g^{max}$ }
\FORALL{agents $i$ $\in$ $N$  }
\STATE {select $N_s \in N$ agents randomly}
\STATE $j= \argmax_{j \in N_s} \phi(i,j)$
\STATE{With Probability ${\cal P}(i,j)$, \textsc{Play}$(i,j)$}
\STATE {Update accumulated payoff $r_i,r_j$}
\ENDFOR
\STATE {New Set Of Players $N$ = EvolutionaryStep($N$, $\mu$)}
\ENDWHILE
\end{algorithmic}
\label{algo:a_interact}
\end{algorithm}


\section{Results and Discussion}
We recall that $N$ is the number of agents, $N_s$ is the search space, and 
$c/b$ is the cost-to-benefit ratio. We denote the fraction of cooperative players with $f_c$. C-C denotes the cooperative-cooperative player interaction. 
We similarly define C-D and D-D interactions.
For all experiments, we set $\mu=0.1$ and initialize $\lambda$ to a uniform value between $[0,5]$. The initial fraction of cooperative players is set to $10\%$.
We report the results by averaging across $20$ runs, with each run consisting of $15000$ generations. Our results
cover the following aspects: (1) the evolutionary dynamics of $f_c$, $\lambda$, and the  correlation between them, 
(2) the change in the fraction of games with C-C, C-D, and D-D interactions as $\lambda$  value changes, 
(3) the effect of number of agents  and search space  on  $f_c$ as the cost-to-benefit ratio $c/b$ increases, and
(4) the effect of spatial constraints on $f_c$.

\begin{figure*}[t]
  \centering
  \subfloat[]{\label{fig:coopN}\includegraphics[width=0.32\textwidth,height=1.78in]{diffn}}\hspace{0.5em}
  \subfloat[]{\label{fig:coopNs}\includegraphics[width=0.32\textwidth,height=1.78in]{diffns}}\hspace{0.5em}
  \subfloat[]{\label{fig:htmap}\includegraphics[width=0.32\textwidth,height=1.81in]{htmap}}
  \caption{(a) \emph{f$_c$} vs $c/b$ for $N_s=8$ and $N=\left\{100,200,300 \right\}$. (b)  $f_c$ vs $c/b$ for $N=150$ and $N_s=\left\{6,8,10,12\right\}$. 
	(c) Color map depicting $f_c$ on the $N_s-N$ plane for $c/b=0.4$. 
  \label{fig:params}
\end{figure*}




\subsection{Mixed population}
Figure~\ref{fig:coop_across_gen} shows the fraction of cooperative players $f_c$ across generations for a typical run (with $N=250,\ N_s=8$ 
and $c/b=0.45$). Figure~\ref{fig:lambda_across_gen} gives the corresponding average $\lambda$ value of cooperative players. 
We observe high levels of cooperation $f_c \geq 0.75$ interrupted by brief periods of defection. 
The generations when the fraction of cooperative players falls significantly are highlighted to show the close correlation between $f_c$ and $\lambda$. 
Across all simulations we observe that
an increase or decrease in the fraction of cooperative players  is preceded by an increase or decrease in the average $\lambda$ 
value. For example, as shown in Figures~\ref{fig:coop_across_gen} and ~\ref{fig:lambda_across_gen}, from generation $7100$ to $7500$, the average $\lambda$ value 
decreases gradually from $4.2$ to $0.3$. We see a corresponding decrease in the $f_c$ value from $0.84$ to  $0.08$. 

At the start of each generation, as the accumulated payoff of all players is $0$, the probability of interaction between any two players is $1$, 
irrespective of $\lambda$. So in the initial stages, defecting players have a slight advantage (since the cooperative players would not reject them as a game partner),
and their accumulated payoff increases.
But after the first few games, the cooperative agents involved in C-D interactions 
start forming  temporary clusters sharing a common payoff. If these cooperative players are sufficiently inequity averse, in the subsequent iterations, they 
are more likely to interact within these clusters, and their payoff increases. The defecting players who initially exploit the cooperative players
face a form of ``social exclusion" from these groups. Thus inequity aversion allows cooperative players to seek new partners and form groups
with whom they can share more equitable payoffs. 
As the interactions proceed, cooperative players that are more tolerant (small $\lambda$ value) to income inequality continue to interact 
with defecting agents. They are outperformed by cooperative players with relatively high $\lambda$ value and die out.
Over generations the average $\lambda$ of cooperative players increases, which further reduces the likelihood of C-D interactions
until cooperation becomes dominant.

However, this cooperation due to the temporary clustering effect is not permanent. When cooperation is established, agents have a high $\lambda$ value.
At this stage, the cooperative agents with a relatively smaller $\lambda$  value
have a slight advantage as they are more likely to tolerate inequality and play the game.
And since cooperative agents are dominant, with high probability these agents interact with other 
cooperative agents, and their accumulated payoff increases. The  environment faces a  slight selection pressure towards higher
tolerance levels (lower $\lambda$ value). As this happens gradually over generations, at some threshold $\lambda$, agents become vulnerable to invasion by defectors,
and the cooperation levels fall sharply. The system remains in this state until by chance, due to mutation, a few cooperative players
with a relatively high $\lambda$ value emerge and reestablish cooperation.

To further validate the correlation between $f_c$ and $\lambda$, Figure~\ref{fig:coop_lambda} shows the number of 
games with C-C, C-D, and D-D interactions as a function of $\lambda$. For a low $\lambda$ value C-D and  D-D 
interactions dominate. As the $\lambda$  value increases, cooperative clusters emerge, and C-C becomes dominant.

The cycles of cooperation and defection are not regular or periodic, and how often the system goes into the defection state and how quickly it recovers
depends on the parameters $N,\ N_s$, and $c/b$. In general we observe that as the cost-to-benefit ratio $c/b$ increases or $N_s$ decreases, it takes longer for 
the system to recover from the defection state.

\begin{figure*}[t]
\begin{minipage}[b]{0.48\linewidth}
\begin{minipage}[b]{1.0\linewidth}
\centering
\subfloat[]{\label{fig:2dcoop_across_gen}\includegraphics[width=1.0\textwidth,height=0.6in]{2dcoop_across_gen}}
\end{minipage}
\begin{minipage}[b]{1.0\linewidth}
\centering
\subfloat[]{\label{fig:2dlambda_across_gen}\includegraphics[width=1.0\textwidth,height=0.6in]{2dlambda_across_gen}}
\end{minipage}
\end{minipage}
\hspace{0.01cm}
\begin{minipage}[b]{0.24\linewidth}
\centering
\subfloat[]{\label{fig:2dwithin_across}\includegraphics[width=1.0\textwidth,height=1.45in]{2dwithin_across}}
\end{minipage}
\hspace{0.01cm}
\begin{minipage}[b]{0.24\linewidth}
\centering
\subfloat[]{\label{fig:2ddiffn}\includegraphics[width=1.0\textwidth,height=1.45in]{2ddiffn}}
\end{minipage}
\caption{(a) The fraction of cooperative players $f_c$ across generations for a typical run with $N=12\times12$ and $c/b=0.45$. (b) The corresponding
average $\lambda$ value of cooperative players. (c) The corresponding fraction of games ($f_g$) within and outside the clusters for the first few generations. 
(d) $f_c$ vs $c/b$ for different grid sizes.}
\end{figure*}

Figures~\ref{fig:coopN} and ~\ref{fig:coopNs} show the fraction of cooperative players vs the cost-to-benefit ratio
for different values of $N$ and $N_s$, respectively.  Across both simulations, as $c/b$ increases, $f_c$ decreases, and for $c/b \geq 0.5$, cooperation disappears. 
With respect to $N$, we observe the 	$f_c$ value decreases marginally for $0.3 \leq c/b \leq 0.5$ as $N$ decreases. 
The change in $f_c$  is considerably higher with respect to change in $N_s$ values. As the search space increases, $f_c$  increases.
The search space affects the probability of selecting an agent from within the temporary clusters that emerge. A higher search space value
translates to a higher probability of interaction within the cluster. We also observe a ``thresholding'' effect; that is, for a fixed change 
in $N_s$ the increase in the $f_c$ 
value is higher for smaller values of $N_s$.
Figure~\ref{fig:htmap} shows a  color map of $f_c$ for different values of $N_s$ (along the 	$X$ axis) and $N$ (along the $Y$ axis) with $c/b=0.45$. 
For a high ($N_s \geq 12$) or low search space ($N_s \leq 4$), $f_c$ does not change with $N$.
\subsection{Two-dimensional  lattice} We now consider the spatial prisoner's dilemma game \cite{szabo_tiffmode:1998,nowak_robert:1992} where each player occupies 
a cell in a  square lattice. Similar to the well-mixed population model, agents are either the cooperative or defecting type and use 
their accumulated payoff  to select their game partner and interact.
But due to spatial constraints an agent's search space is restricted to its four neighboring cells. 
We also change the \emph{binary tournament} procedure to reflect an agent's fixed position. 
For each offspring cell to be added to the new generation, two distinct agents are randomly selected from the neighborhood of the cell.
The agent with the higher fitness values is declared the winner and the offspring inherits the winner's type and $\lambda$ value.
Mutation is applied as discussed in the previous model.

Figures~\ref{fig:2dcoop_across_gen} and ~\ref{fig:2dlambda_across_gen} show the evolutionary dynamics of $f_c$ and $\lambda$ 
for a typical run with $N=12\times12$ and $c/b=0.45$ for the first $2000$ generations (similar behavior is seen in  
subsequent generations). Across all simulations, we observe that the cooperation in the spatial prisoner's dilemma
is more ``robust" (i.e., unlike the previous model where cooperation almost disappears before recovering, here we see stable cooperation). 
The increase and decrease in the $f_c$ value are marginal but are  still closely correlated 
with the increase and decrease in the $\lambda$ value.

While a single cooperative agent surrounded by defectors is always outperformed, cooperative players that are sufficiently 
inequity averse and adjacent to each other have two advantages: (1) the temporary clustering that arises due to sharing 
a common payoff and (2) the clustering provided by spatial constraints.
Like the previous model, in the initial games of a generation, if cooperative and defecting agents interact, the inequity in
accumulated payoff ensures that in the subsequent iterations the probability of C-D interactions decreases.
And as is traditionally the case, the spatial constraint
further improves the performance of cooperative players since players in the interior of the cluster enjoy the benefit of mutual cooperation.
Figure~\ref{fig:2dwithin_across} shows the fraction of interactions (for the  above sample run) within and outside the clusters 
for the first few generations. The corresponding snapshots for the first $40$ generations along with the size of the largest cooperative 
cluster (given below each plot) are shown in Figure.~\ref{fig:snap}. Defecting players are in black. We observe the cooperative players 
become dominant by generation $32$.

Figure~\ref{fig:2ddiffn} shows the fraction of cooperators vs $c/b$ for different grid sizes.
We observe $f_c$ does not change with $N$, and similar to the well-mixed model, cooperation disappears for $c/b \geq 0.5$.

\begin{figure*}[t]
  \centering
  \subfloat{\label{fig:snap0}\includegraphics[width=0.11\textwidth,height=0.8in]{sc0}}\hspace{0.4em}
  \subfloat{\label{fig:snap1}\includegraphics[width=0.11\textwidth,height=0.8in]{sc1}}\hspace{0.4em}
  \subfloat{\label{fig:snap2}\includegraphics[width=0.11\textwidth,height=0.8in]{sc2}}\hspace{0.4em}
  \subfloat{\label{fig:snap3}\includegraphics[width=0.11\textwidth,height=0.8in]{sc3}}\hspace{0.4em}
  \subfloat{\label{fig:snap4}\includegraphics[width=0.11\textwidth,height=0.8in]{sc4}}\hspace{0.4em}
  \subfloat{\label{fig:snap5}\includegraphics[width=0.11\textwidth,height=0.8in]{sc5}}\hspace{0.4em}
  \subfloat{\label{fig:snap6}\includegraphics[width=0.11\textwidth,height=0.8in]{sc6}}\hspace{0.4em}
  \subfloat{\label{fig:snap7}\includegraphics[width=0.11\textwidth,height=0.8in]{sc7}}\hspace{0.4em}\\

  \subfloat{\label{fig:snap8}\includegraphics[width=0.11\textwidth,height=0.8in]{sc8}}\hspace{0.4em}
  \subfloat{\label{fig:snap9}\includegraphics[width=0.11\textwidth,height=0.8in]{sc9}}\hspace{0.4em}
  \subfloat{\label{fig:snap10}\includegraphics[width=0.11\textwidth,height=0.8in]{sc10}}\hspace{0.4em}
  \subfloat{\label{fig:snap11}\includegraphics[width=0.11\textwidth,height=0.8in]{sc11}}\hspace{0.4em}
  \subfloat{\label{fig:snap12}\includegraphics[width=0.11\textwidth,height=0.8in]{sc12}}\hspace{0.4em}
  \subfloat{\label{fig:snap13}\includegraphics[width=0.11\textwidth,height=0.8in]{sc13}}\hspace{0.4em}
  \subfloat{\label{fig:snap14}\includegraphics[width=0.11\textwidth,height=0.8in]{sc14}}\hspace{0.4em}
  \subfloat{\label{fig:snap15}\includegraphics[width=0.11\textwidth,height=0.8in]{sc15}}\hspace{0.4em}\\

  \subfloat{\label{fig:snap16}\includegraphics[width=0.11\textwidth,height=0.8in]{sc16}}\hspace{0.4em}
  \subfloat{\label{fig:snap17}\includegraphics[width=0.11\textwidth,height=0.8in]{sc17}}\hspace{0.4em}
  \subfloat{\label{fig:snap18}\includegraphics[width=0.11\textwidth,height=0.8in]{sc18}}\hspace{0.4em}
  \subfloat{\label{fig:snap19}\includegraphics[width=0.11\textwidth,height=0.8in]{sc19}}\hspace{0.4em}
  \subfloat{\label{fig:snap20}\includegraphics[width=0.11\textwidth,height=0.8in]{sc20}}\hspace{0.4em}
  \subfloat{\label{fig:snap21}\includegraphics[width=0.11\textwidth,height=0.8in]{sc21}}\hspace{0.4em}
  \subfloat{\label{fig:snap22}\includegraphics[width=0.11\textwidth,height=0.8in]{sc22}}\hspace{0.4em}
  \subfloat{\label{fig:snap23}\includegraphics[width=0.11\textwidth,height=0.8in]{sc23}}\hspace{0.4em}\\

  \subfloat{\label{fig:snap24}\includegraphics[width=0.11\textwidth,height=0.8in]{sc24}}\hspace{0.4em}
  \subfloat{\label{fig:snap25}\includegraphics[width=0.11\textwidth,height=0.8in]{sc25}}\hspace{0.4em}
  \subfloat{\label{fig:snap26}\includegraphics[width=0.11\textwidth,height=0.8in]{sc26}}\hspace{0.4em}
  \subfloat{\label{fig:snap27}\includegraphics[width=0.11\textwidth,height=0.8in]{sc27}}\hspace{0.4em}
  \subfloat{\label{fig:snap28}\includegraphics[width=0.11\textwidth,height=0.8in]{sc28}}\hspace{0.4em}
  \subfloat{\label{fig:snap29}\includegraphics[width=0.11\textwidth,height=0.8in]{sc29}}\hspace{0.4em}
  \subfloat{\label{fig:snap30}\includegraphics[width=0.11\textwidth,height=0.8in]{sc30}}\hspace{0.4em}
  \subfloat{\label{fig:snap31}\includegraphics[width=0.11\textwidth,height=0.8in]{sc31}}\hspace{0.4em}\\


  \subfloat{\label{fig:snap32}\includegraphics[width=0.11\textwidth,height=0.8in]{sc32}}\hspace{0.4em}
  \subfloat{\label{fig:snap33}\includegraphics[width=0.11\textwidth,height=0.8in]{sc33}}\hspace{0.4em}
  \subfloat{\label{fig:snap34}\includegraphics[width=0.11\textwidth,height=0.8in]{sc34}}\hspace{0.4em}
  \subfloat{\label{fig:snap35}\includegraphics[width=0.11\textwidth,height=0.8in]{sc35}}\hspace{0.4em}
  \subfloat{\label{fig:snap36}\includegraphics[width=0.11\textwidth,height=0.8in]{sc36}}\hspace{0.4em}
  \subfloat{\label{fig:snap37}\includegraphics[width=0.11\textwidth,height=0.8in]{sc37}}\hspace{0.4em}
  \subfloat{\label{fig:snap38}\includegraphics[width=0.11\textwidth,height=0.8in]{sc38}}\hspace{0.4em}
  \subfloat{\label{fig:snap39}\includegraphics[width=0.11\textwidth,height=0.8in]{sc39}}\hspace{0.4em}\\

  \caption{Snapshots for first $40$ generations on $12\times 12$ grid and $c/b=0.45$. Defecting players are in dark. The labels give the size of the largest cooperative cluster.}
  \label{fig:snap}
\end{figure*}



\section{Conclusion}
We developed a model of agent interaction that is motivated by the social paradigm that individuals are inequity-averse and prefer to interact with others
within the same social strata.
We presented  the results by considering both the well-mixed and the spatially structured populations across different parameter values. 
In general, cooperation becomes dominant when the cost of cooperation is low and is more robust for a structured population. 

Our results support the hypotheses that inequity aversion promotes cooperation among non kin \cite{evolve_ia}. 
It allows individuals to seek new partners with whom they can share more equitable payoffs. And if the equitable payoff increases the relative 
fitness of such  individuals (as is the case with the prisoner's dilemma), natural selection would guarantee that inequity averse cooperative agents emerge.
We also observe a strong correlation between inequity aversion and cooperation that points to the coevolution of these behaviors.
Brosnan \cite{evolve_ia} provides an extensive discussion of inequity aversion observed in other species \cite{range:2008,heidary:2008},
including capuchin monkeys \cite{brosnan:2003}, which ``elucidate evolutionary precursors to inequity aversion" \cite{brosnan:2004}.

We believe the model presented in this paper is an important step towards better understanding coevolution of cooperation 
and inequity aversion. In the future, we intend to evaluate the model by considering generic random networks and to incorporate other 
social factors like group membership, dominance rank, context of interaction, etc.,
which have been shown to effect the overall response to inequity \cite{evolve_ia}. 

\bibliographystyle{plain}
