Skip to content

Commit

Permalink
chore: remove unused method str_to_bool()
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianFredrikJohnsen committed May 2, 2024
1 parent e58bb42 commit 7f1d619
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,6 @@ def play(context: GameContext, first: bool, mcts: bool = False):
save_path=connect4_path
)

def str2bool(v: str) -> bool:
if isinstance(v, bool):
return v
if v.lower() in ('yes', 'true', 't', 'y', '1'):
return True
elif v.lower() in ('no', 'false', 'f', 'n', '0'):
return False
else:
raise ArgumentTypeError('Boolean value expected.')

parser: ArgumentParser = ArgumentParser(description='Control the execution of the AlphaZero game playing system.')
parser.add_argument('--test_overfit', action='store_true', help='Test overfitting on Connect Four.')
parser.add_argument('--train_ttt', action='store_true', help='Train AlphaZero on Tic Tac Toe.')
Expand Down

0 comments on commit 7f1d619

Please sign in to comment.