Skip to content

Commit

Permalink
Update memory length of FSMs
Browse files Browse the repository at this point in the history
Closes #119

Since this research was originally started, an algorithm has been proposed to
accurately measure the memory of finite state machines:
Axelrod-Python/Axelrod#1233
This step manually corrects the known discrepancies but has no effect on the
results of the work.
  • Loading branch information
drvinceknight committed Jan 24, 2019
1 parent a68048a commit 717f847
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 23 deletions.
Binary file modified assets/pdf/list_of_strategies/main.pdf
Binary file not shown.
11 changes: 8 additions & 3 deletions assets/pdf/list_of_strategies/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
includefoot,
footskip=30pt]{geometry}
\usepackage{layout}
\usepackage{multicol}

\usepackage{biblatex}
\renewcommand{\bibfont}{\scriptsize}

\bibliography{main.bib}

Expand All @@ -21,9 +23,12 @@
\maketitle


\begin{enumerate}
\input{../../tex/list_of_strategies/main.tex}
\end{enumerate}
\begin{multicols}{2}
\begin{enumerate}
\scriptsize
\input{../../tex/list_of_strategies/main.tex}
\end{enumerate}
\end{multicols}

\printbibliography

Expand Down
25 changes: 25 additions & 0 deletions assets/tex/list_of_strategies/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@

AXELRODPROJECTKEY = "Knight2018"

# Since this research was originally started, an algorithm has been proposed to
# accurately measure the memory of finite state machines:
# https://github.com/Axelrod-Python/Axelrod/pull/1233
# This step manually corrects the known discrepancies but has no effect on the
# results of the work.
# 2018-01-24 - Vince Knight
correct_memory = {
"Fortress3": 2,
"Fortress4": 3,
"Predator": float("inf"),
"Pun1": float("inf"),
"Raider": float("inf"),
"Ripoff": 3,
"UsuallyCooperates": float("inf"),
"UsuallyDefects": float("inf"),
"SolutionB1": 2,
"SolutionB5": float("inf"),
"Thumper": float("inf"),
"Evolved FSM 4": float("inf"),
"Evolved FSM 16": float("inf"),
"Evolved FSM 16 Noise 05": float("inf"),
}

def main():
with open("main.tex", "w") as f:
Expand All @@ -26,6 +48,9 @@ def main():
if player.classifier["stochastic"]
else "Deterministic"
)

if player.name in correct_memory:
player.classifier["memory_depth"] = correct_memory[player.name]
memory_length = str(player.classifier["memory_depth"]).replace(
"inf", "\(\infty\)"
)
Expand Down
40 changes: 20 additions & 20 deletions assets/tex/list_of_strategies/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
\item Aggravater - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Alexei: (D,) - Deterministic - Memory length: \(\infty\) - \cite{LessWrong2011}
\item ALLCorALLD - Stochastic - Memory length: 1 - \cite{Akin2015}
\item Alternator - Deterministic - Memory length: 1 - \cite{Mittal2009, Axelrod1984}
\item Alternator - Deterministic - Memory length: 1 - \cite{Axelrod1984, Mittal2009}
\item Alternator Hunter - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item AntiCycler - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Anti Tit For Tat - Deterministic - Memory length: 1 - \cite{Hilbe2013}
Expand All @@ -26,7 +26,7 @@
\item Colbert - Deterministic - Memory length: 4 - \cite{Axelrod1980b}
\item CollectiveStrategy - Deterministic - Memory length: \(\infty\) - \cite{Li2009}
\item Contrite Tit For Tat - Deterministic - Memory length: 3 - \cite{Axelrod1995}
\item Cooperator - Deterministic - Memory length: 0 - \cite{Mittal2009, Axelrod1984, Press2012}
\item Cooperator - Deterministic - Memory length: 0 - \cite{Axelrod1984, Mittal2009, Press2012}
\item Cooperator Hunter - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Cycle Hunter - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Cycler CCCCCD - Deterministic - Memory length: 5 - \cite{Knight2018}
Expand All @@ -36,23 +36,23 @@
\item Cycler DDC - Deterministic - Memory length: 2 - \cite{Mittal2009}
\item Cycler CCCDCD - Deterministic - Memory length: 5 - \cite{Knight2018}
\item Davis: 10 - Deterministic - Memory length: \(\infty\) - \cite{Axelrod1980}
\item Defector - Deterministic - Memory length: 0 - \cite{Mittal2009, Axelrod1984, Press2012}
\item Defector - Deterministic - Memory length: 0 - \cite{Axelrod1984, Mittal2009, Press2012}
\item Defector Hunter - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Desperate - Stochastic - Memory length: 1 - \cite{Berg2015}
\item Delayed AON1 - Deterministic - Memory length: 2 - \cite{Hilbe2017}
\item DoubleCrosser: (D, D) - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Doubler - Deterministic - Memory length: \(\infty\) - \cite{Prison1998}
\item DoubleResurrection - Deterministic - Memory length: 5 - \cite{Eckhart2015}
\item EasyGo - Deterministic - Memory length: \(\infty\) - \cite{Li2011, Prison1998}
\item EasyGo - Deterministic - Memory length: \(\infty\) - \cite{Prison1998, Li2011}
\item Eatherley - Stochastic - Memory length: \(\infty\) - \cite{Axelrod1980b}
\item EugineNier: (D,) - Deterministic - Memory length: \(\infty\) - \cite{LessWrong2011}
\item Eventual Cycle Hunter - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Evolved ANN - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Evolved ANN 5 - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Evolved ANN 5 Noise 05 - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Evolved FSM 4 - Deterministic - Memory length: 4 - \cite{Knight2018}
\item Evolved FSM 16 - Deterministic - Memory length: 16 - \cite{Knight2018}
\item Evolved FSM 16 Noise 05 - Deterministic - Memory length: 16 - \cite{Knight2018}
\item Evolved FSM 4 - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Evolved FSM 16 - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Evolved FSM 16 Noise 05 - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item EvolvedLookerUp1\_1\_1 - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item EvolvedLookerUp2\_2\_2 - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Evolved HMM 5 - Stochastic - Memory length: 5 - \cite{Knight2018}
Expand All @@ -64,13 +64,13 @@
\item Forgetful Grudger - Deterministic - Memory length: 10 - \cite{Knight2018}
\item Forgiver - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Forgiving Tit For Tat - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Fortress3 - Deterministic - Memory length: 3 - \cite{Ashlock2006b}
\item Fortress4 - Deterministic - Memory length: 4 - \cite{Ashlock2006b}
\item GTFT: 0.33 - Stochastic - Memory length: 1 - \cite{Gaudesi2016, Nowak1993}
\item Fortress3 - Deterministic - Memory length: 2 - \cite{Ashlock2006b}
\item Fortress4 - Deterministic - Memory length: 3 - \cite{Ashlock2006b}
\item GTFT: 0.33 - Stochastic - Memory length: 1 - \cite{Nowak1993, Gaudesi2016}
\item General Soft Grudger: n=1,d=4,c=2 - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Getzler - Stochastic - Memory length: \(\infty\) - \cite{Axelrod1980b}
\item Gladstein - Deterministic - Memory length: \(\infty\) - \cite{Axelrod1980b}
\item Soft Go By Majority - Deterministic - Memory length: \(\infty\) - \cite{Mittal2009, Axelrod1984, Axelrod1980b}
\item Soft Go By Majority - Deterministic - Memory length: \(\infty\) - \cite{Axelrod1984, Mittal2009, Axelrod1980b}
\item Soft Go By Majority: 10 - Deterministic - Memory length: 10 - \cite{Knight2018}
\item Soft Go By Majority: 20 - Deterministic - Memory length: 20 - \cite{Knight2018}
\item Soft Go By Majority: 40 - Deterministic - Memory length: 40 - \cite{Knight2018}
Expand All @@ -80,7 +80,7 @@
\item Gradual - Deterministic - Memory length: \(\infty\) - \cite{Beaufils1997}
\item Gradual Killer: (D, D, D, D, D, C, C) - Deterministic - Memory length: \(\infty\) - \cite{Prison1998}
\item Grofman - Stochastic - Memory length: \(\infty\) - \cite{Axelrod1980}
\item Grudger - Deterministic - Memory length: 1 - \cite{Banks1990, Li2011, Beaufils1997, Berg2015, Axelrod1980}
\item Grudger - Deterministic - Memory length: 1 - \cite{Li2011, Axelrod1980, Berg2015, Banks1990, Beaufils1997}
\item GrudgerAlternator - Deterministic - Memory length: \(\infty\) - \cite{Prison1998}
\item Grumpy: Nice, 10, -10 - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Handshake - Deterministic - Memory length: \(\infty\) - \cite{Robson1990}
Expand Down Expand Up @@ -120,18 +120,18 @@
\item Once Bitten - Deterministic - Memory length: 12 - \cite{Knight2018}
\item Opposite Grudger - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item $\pi$ - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Predator - Deterministic - Memory length: 9 - \cite{Ashlock2006b}
\item Predator - Deterministic - Memory length: \(\infty\) - \cite{Ashlock2006b}
\item Prober - Deterministic - Memory length: \(\infty\) - \cite{Li2011}
\item Prober 2 - Deterministic - Memory length: \(\infty\) - \cite{Prison1998}
\item Prober 3 - Deterministic - Memory length: \(\infty\) - \cite{Prison1998}
\item Prober 4 - Deterministic - Memory length: \(\infty\) - \cite{Prison1998}
\item Pun1 - Deterministic - Memory length: 2 - \cite{Ashlock2006}
\item Pun1 - Deterministic - Memory length: \(\infty\) - \cite{Ashlock2006}
\item PSO Gambler 1\_1\_1 - Stochastic - Memory length: \(\infty\) - \cite{Knight2018}
\item PSO Gambler 2\_2\_2 - Stochastic - Memory length: \(\infty\) - \cite{Knight2018}
\item PSO Gambler 2\_2\_2 Noise 05 - Stochastic - Memory length: \(\infty\) - \cite{Knight2018}
\item PSO Gambler Mem1 - Stochastic - Memory length: 1 - \cite{Knight2018}
\item Punisher - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Raider - Deterministic - Memory length: 3 - \cite{Ashlock2014}
\item Raider - Deterministic - Memory length: \(\infty\) - \cite{Ashlock2014}
\item Random: 0.5 - Stochastic - Memory length: 0 - \cite{Tzafestas2000, Axelrod1980}
\item Random Hunter - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Random Tit for Tat: 0.5 - Stochastic - Memory length: 1 - \cite{Knight2018}
Expand All @@ -142,7 +142,7 @@
\item Retaliate 3: 0.05 - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Revised Downing: True - Deterministic - Memory length: \(\infty\) - \cite{Axelrod1980}
\item RichardHufford - Deterministic - Memory length: \(\infty\) - \cite{Axelrod1980b}
\item Ripoff - Deterministic - Memory length: 2 - \cite{Ashlock2008}
\item Ripoff - Deterministic - Memory length: 3 - \cite{Ashlock2008}
\item Risky QLearner - Stochastic - Memory length: \(\infty\) - \cite{Knight2018}
\item SelfSteem - Stochastic - Memory length: \(\infty\) - \cite{Andre2013}
\item ShortMem - Deterministic - Memory length: 10 - \cite{Andre2013}
Expand All @@ -151,8 +151,8 @@
\item Sneaky Tit For Tat - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Soft Grudger - Deterministic - Memory length: 6 - \cite{Li2011}
\item Soft Joss: 0.9 - Stochastic - Memory length: 1 - \cite{Prison1998}
\item SolutionB1 - Deterministic - Memory length: 3 - \cite{Ashlock2015}
\item SolutionB5 - Deterministic - Memory length: 5 - \cite{Ashlock2015}
\item SolutionB1 - Deterministic - Memory length: 2 - \cite{Ashlock2015}
\item SolutionB5 - Deterministic - Memory length: \(\infty\) - \cite{Ashlock2015}
\item Spiteful Tit For Tat - Deterministic - Memory length: \(\infty\) - \cite{Prison1998}
\item Stalker: (D,) - Stochastic - Memory length: \(\infty\) - \cite{Andre2013}
\item Stein and Rapoport: 0.05: (D, D) - Deterministic - Memory length: \(\infty\) - \cite{Axelrod1980}
Expand All @@ -165,7 +165,7 @@
\item TF3 - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item ThueMorse - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item ThueMorseInverse - Deterministic - Memory length: \(\infty\) - \cite{Knight2018}
\item Thumper - Deterministic - Memory length: 2 - \cite{Ashlock2008}
\item Thumper - Deterministic - Memory length: \(\infty\) - \cite{Ashlock2008}
\item Tideman and Chieruzzi - Deterministic - Memory length: \(\infty\) - \cite{Axelrod1980}
\item Tit For Tat - Deterministic - Memory length: 1 - \cite{Axelrod1980}
\item Tit For 2 Tats - Deterministic - Memory length: 2 - \cite{Axelrod1984}
Expand All @@ -182,7 +182,7 @@
\item Winner12 - Deterministic - Memory length: 2 - \cite{Mathieu2015}
\item Winner21 - Deterministic - Memory length: 2 - \cite{Mathieu2015}
\item Win-Shift Lose-Stay: D - Deterministic - Memory length: 1 - \cite{Li2011}
\item Win-Stay Lose-Shift: C - Deterministic - Memory length: 1 - \cite{Stewart2012, Nowak1993, Kraines1989}
\item Win-Stay Lose-Shift: C - Deterministic - Memory length: 1 - \cite{Nowak1993, Stewart2012, Kraines1989}
\item WmAdams - Stochastic - Memory length: \(\infty\) - \cite{Axelrod1980b}
\item Worse and Worse - Stochastic - Memory length: \(\infty\) - \cite{Prison1998}
\item Worse and Worse 2 - Stochastic - Memory length: \(\infty\) - \cite{Prison1998}
Expand Down
Binary file modified main.pdf
Binary file not shown.

0 comments on commit 717f847

Please sign in to comment.