Tuesday, July 31, 2018

Universal Moral Grammar (UMG) Ontology

PLEASE NOTE: This website is no longer my official blog. I keep it here because in some older papers I pointed people to it. Please see the same post at https://www.michaeldebellis.com/post/umg_ontology and for other newer posts see my current blog at: https://www.michaeldebellis.com/blog 

In his book Moral Minds, Marc Hauser hypothesized the existence of what he termed a Universal Moral Grammar (UMG):

I argue that our moral faculty is equipped with a universal moral grammar, a toolkit for building specific moral systems. Once we have acquired our culture’s specific moral norms… we judge whether actions are permissible, obligatory, or forbidden, without conscious reasoning and without explicit access to the underlying principles. 

I have developed an ontology that is a formal model of a UMG. In September of 2018 I presented this paper on the ontology at the Semantics 2018 conference in Vienna: A Universal Moral Grammar (UMG) Ontology

This page consists of additional materials to support that paper such as a link to the actual ontology as well as a much extended version of the Semantics 2018 paper. I’m also pleased to say that the UMG ontology below won the award for Best Vocabulary at the Semantics 2018 Vocabulary Carnival.

Here is a PDF of the presentation that I gave at the Semantics 2018 Conference: Semantics 2018 Presentation

Here is the OWL version of the ontology: UMG-Ontology-8-30-18.OWL

This is a significantly longer version of the Semantics 2018 paper:  UMG Extended Paper

Here is a link to the ontology in Web Protege:  UMG Ontology in Web Protege

The UMG ontology is released under the Creative Commons Attribution 4.0 License

Note that to view the link above you need to first set up an account on the Stanford WebProtege server. Setting up an account is easy, all you need to do is to provide a user name, email, and password. To set up an account go here: https://webprotege.stanford.edu/#accounts/new

You need to setup the account and login before you click on the link to the ontology. Also, note that if you wish to download the ontology from WebProtege you can do that. Click on the History icon (the far right one in the group starting with Classes, Properties, etc.) This will show a list of revisions. Select the latest revision (there should be a little grey icon in the right corner of the history like "R1") and then select the option "Download revision 1" from the pop-up menu.

For questions and comments please feel free to add a comment here, I check comments regularly and usually respond within a day.  Also, feel free to contact me directly. My email is included at the top of the Semantics 2018 Paper and the  UMG Extended Paper.

Thursday, July 5, 2018

Using Excel's Matrix Operations for Evolutionary Game Theory

I've been reading John Maynard-Smith's classic book Evolution and the Theory of Games. It reminds me of Syntactic Structures by Chomsky in that it's a very short little book but it takes more effort to really understand it than books that are orders of magnitude larger. One thing I've found that helps me to understand complex topics is to develop some model as I'm reading. I've developed several OWL ontologies as I was reading up on a topic just to help me get clear on various concepts. In this case I started with a wonderful Gnu tool called Octave which is a scaled down (but still very powerful) free version of MatLab and does matrix and linear algebra computations. But as I was working it occurred to me it would be much more re-usable and amenable to "what if" games if I had the info in spreadsheet format rather than in the format that Octave uses. So just for grins I googled "matrix operations in Excel" and was amazed at how well Excel supports matrix operations now (I haven't used Excel in quite a while).

I've developed the following spread sheet: Evolutionary Game Theory in Excel  (Note: you can download the spreadsheet by right clicking and selecting "Save Link As")

So far I've implemented Appendices A, B, and D in Maynard Smith's book. Appendix C is a proof which I don't think can be implemented in a spreadsheet. Appendix A shows how to calculate the payoff between two players when each player has a different payoff matrix. The payoff for player 1 is "P Payoff" and for player 2 is "Q Payoff".  The strategy for player one is the column vector p and for player two the column vector q. So if p = [.3; .6; .1] it means that player 1 plays Hawk 30% of the time, Dove 60% and Retreat 10%. Note I'm using the same notation here as Octave where a ";" means a new column and a "," means another element in the same row. So the Transpose of p (denoted p') would be  [.3, .6, .1].

Appendix B shows how to compute the ESS (which is also a Nash Equilibrium) for a two person game that meets the requirements in the book.  That computation uses the same P Payoff matrix as for Appendix A so the computation is only valid when there are two strategies, i.e., when one strategy is dominated by another and hence can be eliminated. In the case as I've set it up in the spreadsheet Dove dominates Retreat so the formula holds. Note: as I read further in the book I realized that R stands for Retaliate which is quite different from Retreat, however I'm leaving the spreadsheet as is because with R dominated by D the ESS formula is valid. If you change the value of R so that it is no longer dominated (e.g., to make it consistent with Retaliate) the spreadsheet will still give values for the ESS but they won't be valid since that formula only works with two strategy games.

Appendix D (sheet 2, A and B are in sheet 1) shows the fitness W for a player playing a pure strategy. It also shows the mean fitness for the population based on which percent are playing which strategy (again the P Payoff matrix is used). It also computes the fitness for the next iteration of the game for each group playing the particular strategy. Note that when R is dominated by D and you compute the ESS you can play "what if" by setting the values for H and D to be different than the ESS and you will see that in the next round they are converging toward the ESS. E.g., if percentage of H is greater than the ESS and percentage of D is less than the ESS in the next iteration the percentage of H will decrease and the percentage of D will increase. This will of course continue until they reach the ESS at which point it will be stable.

I thought this spreadsheet might be useful for others trying to learn the topic as well as for people who want to start doing actual modeling. The current example has 3 strategies but it would be trivial to expand it to more. I have some ideas on altruism that I want to try out with game theory modeling and I think this spreadsheet is a good first step toward what I will need and I hope it may help others as well. Also, there is always a chance I made some error so that's another reason to post it, if anyone finds any errors please let me know. You can comment below, I usually respond to comments within a day.