You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, class Human(Agent) resides in main.py. It takes in an input through terminal of what move should be made. It currently splits the input string on commas and performs int() of what's in between. This throws errors that crash the program (unless in interactive mode) if anything but a string of the form int, int is inputted. This could stop testing or showing of our code in the middle of games or after much training (which would then be lost).
To Do
We should add regular expression (there's a commented out section which isn't great: re.sub probably doesn't retain the numbers right now, and it probably only works for a 2d board). Having more sophisticated parsing that disregards typos or weird characters or maybe asks the user to resubmit a move while indicating the proper format. That would make sure progress isn't lost because of small mistakes, and this would be a great opportunity to learn regex (which is super useful).
Also, maybe make it nicer. How do we want humans to give in input? What should the text say? Code as you please.
The text was updated successfully, but these errors were encountered:
Current State
Right now, class
Human(Agent)
resides inmain.py
. It takes in an input through terminal of what move should be made. It currently splits the input string on commas and performs int() of what's in between. This throws errors that crash the program (unless in interactive mode) if anything but a string of the formint, int
is inputted. This could stop testing or showing of our code in the middle of games or after much training (which would then be lost).To Do
We should add regular expression (there's a commented out section which isn't great:
re.sub
probably doesn't retain the numbers right now, and it probably only works for a 2d board). Having more sophisticated parsing that disregards typos or weird characters or maybe asks the user to resubmit a move while indicating the proper format. That would make sure progress isn't lost because of small mistakes, and this would be a great opportunity to learn regex (which is super useful).Also, maybe make it nicer. How do we want humans to give in input? What should the text say? Code as you please.
The text was updated successfully, but these errors were encountered: