I propose a model of affective polarization (``that both Republicans and Democrats increasingly dislike, even loathe, their opponents,'' Iyengar et al, 2012). In the model, two agents repeatedly choose actions based on private interests, the social good, their own ``character'' (willingness to trade private for social gains) and beliefs about the other agent's character. I focus on the political application, with each agent representing a party, but the model could apply to other settings, such as spouses or business partners. Each agent Bayesian updates beliefs about the other's character, and dislikes the other more when its character is perceived as more self-serving. I characterize the dynamic and long-run effects of three biases: a prior bias against the other agent's character, the false consensus bias, and limited strategic thinking. Prior bias against the opponent remains constant or dissipates over time, and actions do not diverge. By contrast, the other two biases, which are not directly related to character, cause actions to become more extreme over time and repeatedly be ``worse'' than expected, causing affective polarization---even when both players are arbitrarily ``good'' (unselfish). For some parameter values, long-run affective polarization is unbounded, despite Bayesian updating. The results imply that affective polarization can be caused by cognitive bias, and that subtlety and unawareness of bias are key forces driving greater severity of this type of polarization.