Axelrod-Python / Axelrod

A research tool for the Iterated Prisoner's Dilemma
http://axelrod.readthedocs.org/
Other
710 stars 263 forks source link

Code Efficiency of Strategies #740

Open meatballs opened 7 years ago

meatballs commented 7 years ago

It might be interesting to have a measure of how efficient a strategy is in terms of its code complexity.

e.g. If two strategies have similar scores but one does so in 12 lines of code whereas the other has 250 lines, the first could be considered more efficient.

It's perhaps best to use the inpsect module to look at the amount of byte code produced for a strategy, rather than its actual python code as I wouldn't want to encourage poor readability.

marcharper commented 7 years ago

This would be interesting, we could also compare to the long-run time calculations (there's a notebook for it).