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

May we import typing for static type checking? #51

Open create-dot opened 3 years ago

create-dot commented 3 years ago

I realise that as it currently stands no imports other than numpy and random are allowed. I would to like to ask @carykh to consider permitting us to use static type-checking through the typing standard library module, which provides for instance the helpful typing.Optional[sometype].

To the best of my knowledge, nothing in typing does anything to circumvent the rules of the competition.

If this can't be granted, then I suppose I will remove type signatures dependent on typing and delete the import before submission.

duckboycool commented 3 years ago

I'm pretty sure that parts of the standard library that don't allow for anything particularly problematic (such as ctypes or socket) are allowed. For example, I've seen some people making strategies with the standard decimal module for higher precision.

I suppose it would probably be a good idea to get confirmation on it though.