/Rationality

Code for working on the objective-subjective rationality project. Some of the structure is borrowed from an earlier development with Kyler Brown for the parental investment project.

Primary LanguageMATLAB

Rationality

Abstract

Evolving cooperation by useful delusions: subjective rationality and quasi-magical thinking
by Artem Kaznatcheev1,2, Marcel Montrey2, and Thomas R. Shultz2,1
1School of Computer Science and 2Department of Psychology, McGill University

The role of subjective experience in human decision-making has been often ignored, or assumed to be too difficult to study. We combine ideas from biology, cognitive science, computational modeling, dynamic systems, and economics to introduce an evolutionary game theoretic framework for studying quasi-magical thinking and the distinction between objective and subjective rationality. The evolutionary fitness payoffs of interactions are given by an objective game which the agents are not aware of. Instead, each agent has a heritable subjective representation of what they think the game is on which they base their decision-making. The agents' minds consist of two probabilities: “will an agent cooperate with me if I cooperate/defect?” Since no agent can condition their behavior on the decision of another, any disagreement in these two probabilities is a misrepresentation of the world. We consider three different Bayesian updating techniques: purely rational, quasi-magical, and superrational. Given the genetic conception of the game and learned probabilities of cooperation, the agents act rationally on their beliefs (selecting the action that they believe to have the highest expected utility) .

We apply our framework to study the evolution of cooperation on k-regular random graphs. In this task, agents populate the nodes of a graph and engage in a pair-wise prisoners' dilemma interaction with their neighbors: an agent can maximize personal utility by defecting, but this decision minimizes social welfare and the whole population would be better off if everyone cooperates. We show that in highly specialized environments where cooperation incurs mild cost to the individual, the agents evolve misrepresentations of objective reality that lead them to cooperate and maintain higher social welfare. The agents act rationally on their delusions of the world but appear to behave irrationally when viewed by an external observer. In environments where the cost of cooperating is high, the standard prediction of universal defection is still achieved.

We consider two interpretations of the results. If the 'experimenter knows best' then evolution does not necessarily lead to accurate internal representations of the world, and the resulting misrepresentations are not always detrimental to individual or group performance. If 'evolution knows best' then pair-wise payoffs are not necessarily accurate depictions of the real game being played, and an overly reductionist account of the world can miss the social externalities inherent in decision-making. We discuss the connection between the evolved internal representations and inclusive fitness. Our simulations point out the importance of reasoning about internal representations and not just observed behavior when looking at economics or biology. Finally, we argue that our framework is a good foundation for combining evolution and learning since it captures the impossibility of defining an objective utility/fitness of memes if imitation dynamics are considered at the level of behavior.

Notes

  • Some code structure is borrowed from an earlier code by Kyler Brown and Artem for the parental investment project.
  • We use a death-birth updating scheme, which is implemented in deathBirth
  • Code for regular Random Graph generation (createRandRegGraph.m) is by Golan Pundak and available here.
  • The current convention for storing data in '../RationalityData/' is 'U' + X + 'V' + Y + 'b' + s + f + v + 'e' + b where:
    • [X,Y] is the game,
    • s = no, 2, or all corresponding to if we allow no-alpha, or no-alpha and quasi-magical thinking, or all alpha from 0 to 1 respectively,
    • f = i or v depending on if the simulation is inviscid or viscous,
    • v is an integer corresponding the run number, and
    • b is a flag if evolution of internal representations is turned off (0) or on (1)

Functions

  • batchRunConference is the entry code for the CogSci 2013 conference paper we wrote. It loads a graph and then runs 'recStepRun' on it.
  • batchRunAlphaConf is the code we used to generate data for the SwarmFest conference. It takes (1) a PD depth, (2) whether to allow U and V values to evolve, (3) a graph to load, (4) the number of runs, (5) whether to output data, and then runs 'recStepRun'.
  • recStepRun is the main wrapper for running the simulation. The state of agents' minds and genotypes are not recorded at every time step, because this takes too much space. Rather, an array is passed (step_array) which indicates how many steps should pass before this data is recorded.
  • subRat is the main file for running the simulation. At each step, it calls 'playGame', potentially randomizes the world, applies an input update rule, and then collects data with 'collectData'.
  • playGame goes through all of the edges of the graph and simulates the interaction given that the agents use an inputted decisionRule.
  • ratShaky is a (decisionRule) that behaves rationally with a shaky hand. This means that on the top right and bottom left corners of the game space, it uses a probabilistic strategy.
  • ratBayShaky is a (decisionRule) that behaves rationally given its p and q values, which it infers from its mind using alpha-self-absorbed learning
  • mind2pq' converts an agent's pseudocount to p and q, given its self-absorption alpha, as given in this blog post.
  • repLocalMutate is a (reproduce) that mutates U,V with probability mutation_rate within [U +- mutation_size] and [V +- mutation_size].
  • repSetMutate is a (reproduce) that mutates U,V with probability mutation_rate within a finte set of choices.
  • saveRegRandGraph is used to generate a regular random graph and save the adjacency matrix
  • genoRandInit created a random initial distribution of genotypes.
  • plotCoop is used to make the nice proportion of cooperation plots.
  • alphaPDdepthPlot generates plots of the average alpha value (or the average number of agents using alpha, if this is binary) across PD depths.
  • coopPDdepthPlot generates plots of the average proportion of cooperation across PD depths.
  • densityPDdepthPlot generates density plots of agent UV values across PD depths.

Relevant blog posts

  • March 8, 2012: Objective and subjective rationality. Most work on the interaction of learning and evolution assumes that the representations learning acts on accurately reflect the same reality that generates fitness. I question this assumption and introduce the general outline for a model that seperates subjective representations of the inter-agent interaction from their objective fitness effects.
  • March 14, 2012: Space of cooperate-defect games. By removing additive constants and renormalizing, it is possible to represent the payoffs of any two strategy two player cooperate-defect game with just two parameters U and V. We can plot these parameters to visualize the U-V space of possible qualitatively distinct games.
  • March 21, 2012: Spatial structure. Agents in evolution games seldom inhabit a purely mixed environment where they are equally likely to interact with any other agent. In a more general settings, you have to consider settings where agents only interact with a specific subset of other agents. This interaction structure can be represented as a network or graph, and the choice of graph which agents inhabit is very important for the resulting evolutionary dynamics.
  • March 29, 2012: Generating random k-regular graphs. One of the simplest structured environments are the random k-regular graphs. Being simple to describe, however, does not mean that they are easy to generate, so Marcel discusses some methods for creating these graphs.
  • October 25, 2012: Ohtsuki-Nowak transform for replicator dynamics on random graphs. One of the biggest advantages of studying dynamics on random regular graphs, is that there exists a tool for solving their dynamics analytically. The Ohtsuki-Nowak transform allows you to perturb the game's payoff matrix to incorporate the spatial structure and then study the modified game as if it was governed by inviscid replicator dynamics.
  • January 23, 2013: Habitual selfish agents and rationality. Marcel reviews Davies et al. (2011), where the authors consider a coordination/anti-coordination game. To maximize global rather than local utility, the authors change their agents' utility function from an objective to a subjective one, so that it includes habituation: i.e. referring to be paired with those you were paired with previously.
  • January 28, 2013: Rationality for Bayesian agents. I derive the maximum likelihood estimator for a rational Bayesian agent faced with a coin toss environment. This allows the agent to make decisions when the rational choice is not the unique pure strategy of cooperation nor defection.
  • January 31, 2013: Extra, Special Need for Social Connections. Tom provides a review of the various subjective factors that have been identified and studied in experimental work on human decision making in games based on Lee (2008).
  • May 12, 2013: Quasi-magical thinking and the public good. Marcel reviews Masel's (2007) work on quasi-magical thinking in the public goods game. To encourage cooperation, agents use a quasi-magical thinking update scheme (consider their own potential action as a data point) when estimating how much others will contribute.
  • May 13, 2013: Quasi-magical thinking and superrationality for Bayesian agents. Quasi-magical thinking can be implemented in the subjective-objective rationality model by biasing the learning of others reactions so that an agent's own action is treated as a data point when estimating how others will act. The strength of this bias can be varied by changing the weight an agent gives to their own action. In the extreme case of assigning full weight to your own action and none to the partner, the result is Hofstadter’s superrationality.
  • May 23, 2013: Quasi-delusions and inequality aversion. Inequality aversion is a common bias believed to facilitate cooperation. Subjective rationality can be represented in terms of this bias and its interaction with objective reality can be understood in the broader framework of quasi-delusions.
  • July 9, 2013: Evolving useful delusions to promote cooperation. Transcript of my presentation from March 27th, also covering part of SWARMFEST presentation from July 9th. I outline the subjective-objective rationality model and present results on the distribution of agent's subjective utilities. In highly competitive environments, agents evolve faithful representations of reality that lead them to defection. In less competitive but still Prisoner's dilemma environments, cooperation emerges from agents misrepresenting the objection payoff of the game.
  • October 16, 2013: Cooperation through useful delusions: quasi-magical thinking and subjective utility. A discussion and some results on how quasi-magical thinking and subjective rationality interact. Evolutionary control over subjective representations results in higher levels of cooperation than control over quasi-magical thinking. Althought allowing for both misrepresentations and quasi-magical thinking to exist together allows for more genotypic flexibility, the resulting dynamics lead to lower levels of cooperation.
  • October 20, 2013: Enriching evolutionary games with trust and trustworthiness. Tom discusses McNamara's (2013) suggestion for incorporating richer decision making procedures and phenotypic effects into evolutionary game theoretic models. He draws special attention to models that incorporate truth and trusthworthiness, contrasting them with more common studied reputation effects.
  • January 28, 2014: Interface theory of perception can overcome the rationality fetish. Hoffman's interface theory of perception questions the assumption that our perception fautfully reflects reality. Evolution does not select for the most accurate perception but for the most useful, so perception instead tunes itself to fitness. Mark, Marion, & Hoffman (2010) demonstrate this with a simple evolutionary model of resource spot selection, and I discuss how the subjective-objective rationality model can provide even further insights.
  • May 4, 2014: Useful delusions, interface theory of perception, and religion. An explanation of how our model is a social extentsion of Hoffman's interface theory of perception, and a discussion of religion as a potential domain of application.
  • November 1, 2014: From realism to interfaces and rationality in evolutionary games. A non-technical overview of the distinction between naive realism, critical realism, and interface theories of perception. I discuss Mark et al.'s (2010) evolutionary justification for interface theories, and how our work extends this to social interfaces.
  • November 30, 2014: Realism and interfaces in philosophy of mind and metaphysics. The distinction between naive realism, critical realism, and interfaces is of interest to more than just students of perception, it has a rich philosophical history. Various kinds of materialist realisms can be associated with Epicurus and Bertrand Russell, and a non-material critical realism with Plato. Interface theories can be traced back to Parmenides, and are well developed by medieval Muslim thinkers like Averroes, Ibn Arabi, and Rumi. The best modern treatment of interfaces was given by Kant, and we can apply it to better understand Bohr's interpretation of quantum mechanics.
  • February 4, 2016: Hadza hunter-gatherers, social networks, and models of cooperation. I review the Apicella et al. (2012) study of Hadza social networks, and how to convert them for use as graphs in simulations like this one.