Cognitive biases codex

# Install and load required packages
install.packages("ape")
library(ape)

# Define the cognitive biases
biases <- c("Fundamental_attribution_error",
            "Implicit_bias",
            "Priming_bias",
            "Confirmation_bias",
            "Affinity_bias",
            "Self-serving_bias",
            "Belief_bias",
            "Framing",
            "Hindsight_bias",
            "Embodied_cognition",
            "Anchoring_bias",
            "Status_quo_bias",
            "Overconfidence_effect",
            "Physical_attractiveness_stereotype",
            "Availability_heuristic",
            "Authority_bias",
            "Bystander_effect",
            "Choice_supportive_bias",
            "Clustering_illusion",
            "Conservatism_bias",
            "Curse_of_knowledge",
            "Decoy_effect",
            "Denomination_effect",
            "Duration_neglect",
            "Endowment_effect",
            "Exaggeration_effect",
            "False_consensus_effect",
            "False_memory",
            "Forer_effect",
            "Frequency_illusion",
            "Functional_fixedness",
            "Gambler's_fallacy",
            "Groupthink",
            "Illusory_truth_effect",
            "Illusion_of_control",
            "Impact_bias",
            "Information_bias",
            "Irrational_escalation",
            "Law_of_triviality",
            "Less-is-better_effect",
            "Moral_luck",
            "Neglect_of_probability",
            "Normalcy_bias",
            "Observer-expectancy_effect",
            "Omission_bias",
            "Outcome_bias",
            "Overestimation",
            "Pessimism_bias",
            "Placebo_effect",
            "Post-purchase_rationalization",
            "Pro-innovation_bias",
            "Projection_bias",
            "Recency_effect",
            "Recency_illusion",
            "Regression_bias",
            "Restraint_bias",
            "Selective_perception",
            "Selective_recall",
            "Selective_attention",
            "Social_desirability_bias",
            "Stereotyping",
            "Subadditivity_effect",
            "Survivorship_bias",
            "Time-saving_bias",
            "Unit_bias",
            "Zero-risk_bias")

# Create a random tree structure
set.seed(42)
tree <- rcoal(length(biases))

# Assign bias names to tree tips
tree$tip.label <- biases

# Export the tree in Newick format
write.tree(tree, file = "all_biases_tree.nwk")

# Print a message confirming the export
cat("The tree of all known biases has been exported to 'all_biases_tree.nwk'.")
(((Framing:0.04930929668,((Belief_bias:0.000570378874,Self-serving_bias:0.000570378874):0.02719616571,(Fundamental_attribution_error:0.02460143809,((Priming_bias:0.006998795103,Implicit_bias:0.006998795103):0.01554727871,(Affinity_bias:0.002758364649,Confirmation_bias:0.002758364649):0.01978770917):0.002055364278):0.003165106493):0.0215427521):0.7474093853,(Hindsight_bias:0.1882060463,((Authority_bias:0.001797793154,Availability_heuristic:0.001797793154):0.1780499694,(Physical_attractiveness_stereotype:0.1761136118,(Embodied_cognition:0.05849425613,(Overconfidence_effect:0.009362539217,(Status_quo_bias:0.005810130385,Anchoring_bias:0.005810130385):0.003552408832):0.04913171691):0.1176193557):0.003734150728):0.008358283716):0.6085126357):0.4059893542,(((Zero-risk_bias:0.004079465415,Unit_bias:0.004079465415):0.7976603265,((Regression_bias:0.1905204769,(Selective_perception:9.246471412e-05,Restraint_bias:9.246471412e-05):0.1904280122):0.5036546937,((Time-saving_bias:0.00320627347,(Survivorship_bias:0.001620400735,Subadditivity_effect:0.001620400735):0.001585872734):0.2567879501,(Selective_recall:0.05149701992,(Stereotyping:0.01473345927,(Social_desirability_bias:0.0005508233706,Selective_attention:0.0005508233706):0.0141826359):0.03676356065):0.2084972036):0.434180947):0.1075646214):0.1626497642,(((Normalcy_bias:0.04691454702,(Outcome_bias:0.0343982229,(Omission_bias:0.01406090153,Observer-expectancy_effect:0.01406090153):0.02033732137):0.01251632412):0.04937723395,((Projection_bias:0.03283974868,(Recency_illusion:0.007915711658,Recency_effect:0.007915711658):0.02492403703):0.05627476619,(Overestimation:0.04149549903,(Pro-innovation_bias:0.03959165589,(Pessimism_bias:0.03952538952,(Post-purchase_rationalization:0.03372671976,Placebo_effect:0.03372671976):0.005798669763):6.626636625e-05):0.001903843148):0.04761901584):0.007177266109):0.5666708161,((Conservatism_bias:0.05289705485,(Clustering_illusion:0.02422362765,(Choice_supportive_bias:0.006755802368,Bystander_effect:0.006755802368):0.01746782528):0.0286734272):0.1951381319,((Impact_bias:0.04045671635,((Neglect_of_probability:0.026862758,Moral_luck:0.026862758):0.01107661209,(Information_bias:0.02166913187,(Less-is-better_effect:0.00203749483,(Law_of_triviality:0.0004102028161,Irrational_escalation:0.0004102028161):0.001627292014):0.01963163704):0.01627023822):0.002517346264):0.1821890077,((Illusion_of_control:0.1466342232,((Illusory_truth_effect:0.007386706316,Groupthink:0.007386706316):0.01287547533,(Gambler's_fallacy:0.0200146099,Functional_fixedness:0.0200146099):0.0002475717463):0.1263720416):0.01706993363,((Frequency_illusion:0.06717699044,Forer_effect:0.06717699044):0.08081729948,(False_memory:0.09610344492,(False_consensus_effect:0.06508788723,(Exaggeration_effect:0.02493019219,((Endowment_effect:0.005701475132,Duration_neglect:0.005701475132):0.003318474391,(Curse_of_knowledge:0.005768663505,(Denomination_effect:0.0008206044844,Decoy_effect:0.0008206044844):0.004948059021):0.003251286018):0.01591024267):0.04015769503):0.0310155577):0.051890845):0.01570986692):0.0589415672):0.02538946273):0.4149274103):0.301426959):0.2383184801);
Fundamental_attribution_error: Overemphasize personality-based explanations for behaviors observed in others
Implicit_bias: Attribute positive or negative qualities to a group of individuals
Priming_bias: Influenced by the first presentation of an issue to create preconceived idea
Confirmation_bias: Search for or interpret information in a way that confirms preconceptions
Affinity_bias: Favorably biased toward people most like ourselves
Self-serving_bias: Claim more responsibility for successes than for failures
Belief_bias: Evaluate logical strength of an argument based on current belief
Framing: Narrow the description of a situation to guide to a selected conclusion
Hindsight_bias: View past events as being predictable
Embodied_cognition: Selectivity in perception, attention, decision making, and motivation based on the biological state of the body
Anchoring_bias: Inability to make appropriate adjustments from a starting point
Status_quo_bias: Tendency to hold to the current situation rather than an alternative
Overconfidence_effect: Overly trust one's own capability to make correct decisions
Physical_attractiveness_stereotype: Attributing positive traits to physically attractive people
Availability_heuristic: The tendency to make a decision based on the readily available information
Authority_bias: The tendency to follow the opinion of a perceived authority figure
Bystander_effect: The tendency for individuals to be less likely to offer help to a victim when other people are present
Choice_supportive_bias: The tendency to remember one's choices as better than they actually were
Clustering_illusion: The tendency to remember events as being more predictable than they actually were
Conservatism_bias: The tendency for people to maintain existing cultural norms
Curse_of_knowledge: The tendency to overestimate the depth of our own knowledge
Decoy_effect: The tendency to prefer options with a decoy, as compared to similar options without
Denomination_effect: The tendency to spend more money when it is denominated in small amounts
Duration_neglect: The tendency to neglect to consider how long something will last when making decisions
Endowment_effect: The tendency to overvalue something you own, regardless of its objective value
Exaggeration_effect: The tendency for information to grow in significance with repetition
False_consensus_effect: The tendency to believe vague statements are true if they are judged to be desirable
False_memory: The tendency to believe that one's thoughts and feelings are somehow directly influenced by the way one perceives one's surroundings
Forer_effect: The tendency to overestimate the effect of one's own actions on an outcome
Frequency_illusion: The tendency to seek information even when it cannot affect action
Functional_fixedness: The tendency to escalate commitment to a previously chosen course of action beyond what an objective assessment of the situation would warrant
Gambler's_fallacy: The tendency to think that something which is easily imagined happening is actually more likely to happen
Groupthink: The tendency to undervalue an item one owns, simply because one owns it
Illusory_truth_effect: The tendency to see oneself as less biased than other people
Illusion_of_control: The tendency to think that something which is frequent is more likely to happen
Impact_bias: The inability to see a use for an object other than the use for which it was designed
Information_bias: The belief that the probability of a chance event is influenced by previous events
Irrational_escalation: The tendency to rationalize group decisions that lead to disastrous outcomes
Law_of_triviality: The tendency to believe information that is easier to process
Less-is-better_effect: The tendency to justify increased investment in a decision, based on the cumulative prior investment, despite new evidence suggesting that the decision was probably wrong
Moral_luck: The tendency to project one's thoughts and feelings onto someone else
Neglect_of_probability: The tendency to recall recent events as being more prominent than they are
Normalcy_bias: The tendency to believe that something one has recently learned or noticed is actually new
Observer-expectancy_effect: The tendency for people to view themselves as less at risk of harm than others
Omission_bias: The tendency to view the past as being better than the present or the future
Outcome_bias: The tendency for experimenters to believe, certify, and publish data that agree with their expectations for the outcome of an experiment, and to disbelieve, discard, or downgrade the corresponding weightings for data that appear to conflict with those expectations
Overestimation: The tendency to evaluate ambiguous information in a way beneficial to their interests
Pessimism_bias: The tendency to remember one's past transgressions as less severe than they actually were
Placebo_effect: The tendency to ascribe success to personal skills and attributes, and failure to external factors
Post-purchase_rationalization: The tendency to see oneself as less biased than other people
Pro-innovation_bias: The tendency to believe that what one desires or values is more common or probable than it actually is
Projection_bias: The tendency to value something more when one owns it
Recency_effect: The tendency to think that an event is more likely to occur when it is recent
Recency_illusion: The tendency to remember one's choices as better than they actually were
Regression_bias: The tendency for people to give high accuracy ratings to descriptions of their personality that supposedly are tailored specifically for them, but are in fact vague and general enough to apply to a wide range of people
Restraint_bias: The tendency to think that the consequences of an event were predictable, even when there is little or no evidence to suggest that they were
Selective_perception: The tendency for people to base their judgments on information that is easily accessible to them
Selective_recall: The tendency to underweight the present cost of a future event and to overvalue the present benefit of an immediate one
Selective_attention: The tendency to underemphasize the probability of extreme events and overemphasize the probability of normal events
Social_desirability_bias: The tendency to give preference to the first piece of information received
Stereotyping: The tendency to believe that the world is fair and that people get what they deserve
Subadditivity_effect: The tendency for people to overestimate the likelihood of positive events and underestimate the likelihood of negative events
Survivorship_bias: The tendency to overestimate the effect of one's own actions on an outcome
Time-saving_bias: The tendency to view the world in a way that confirms one's existing beliefs
Unit_bias: The tendency to ascribe more value to goods and services when they are less available
Zero-risk_bias: The tendency to prefer a smaller immediate reward to a larger but delayed reward
Fundamental_attribution_error: The tendency to think that one is at less risk of being a victim of a crime than others
Implicit_bias: The tendency to prefer options that are presented separately rather than together
Priming_bias: The tendency to overestimate one's own ability to control events
Confirmation_bias: The tendency to judge that a familiar object is superior to an identical but unfamiliar object
Affinity_bias: The tendency to favor individuals who are physically attractive
Self-serving_bias: The tendency to make decisions based on the first piece of information that comes to mind
Belief_bias: The tendency to seek information that confirms one's existing beliefs
Framing: The tendency to judge that an event is more likely to occur if it is recent or if one has recently thought of it
Hindsight_bias: The tendency to believe that the consequences of an event were predictable, even when there is little or no evidence to suggest that they were
Embodied_cognition: The tendency to attribute one's success to internal factors while attributing failures to external factors
Anchoring_bias: The tendency to view oneself as better than average in some way
Status_quo_bias: The tendency to perceive oneself as less biased than others
Overconfidence_effect: The tendency to ascribe more value to items that are priced higher
Physical_attractiveness_stereotype: The tendency to avoid action altogether when faced with numerous choices
Availability_heuristic: The tendency to perceive oneself as less at risk of being a victim of a negative event than others
Authority_bias: The tendency to evaluate probabilities as greater than 0 and less than 1, in accordance with one's beliefs
Bystander_effect: The tendency to avoid extremes in favor of a more moderate option
Choice_supportive_bias: The tendency to judge the frequency or likelihood of an event by the ease with which instances or occurrences can be brought to mind
Clustering_illusion: The tendency to judge the probability of an event by considering instances that are easily recalled from memory
Conservatism_bias: The tendency to focus on one piece of information or trait when making decisions, while ignoring other important factors
Curse_of_knowledge: The tendency to recall only those instances that support or confirm our beliefs
Decoy_effect: The tendency to attend to and remember information that confirms one's existing beliefs or attitudes
Denomination_effect: The tendency to remember events in a way that reinforces one's beliefs or preferences
Duration_neglect: The tendency to remember events in a way that reinforces one's beliefs or preferences
Endowment_effect: The tendency to distort one's recollection of past events to fit one's current beliefs or preferences