carykh / PrisonersDilemmaTournament

Watch This Place's awesome video about iterated Prisoner's Dilemma for context! https://www.youtube.com/watch?v=BOvAbjfJ0x0
MIT License
205 stars 159 forks source link

Fix unexpected loops/errors in tournament running code #57

Open gezakerecsenyi opened 3 years ago

gezakerecsenyi commented 3 years ago

This change wraps the final line of prisonersDilemma.py in a if __name__ == '__main__': statement, to prevent unexpected bugs when trying to e.g. use multiprocessing.Pool inside a strategy. This also helps to mitigate unexpected loops when running the program within certain environments/picklers.