From 2bcfc96ea0700f9c6af6c17276e1b32252afb654 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Thu, 21 Dec 2023 00:46:38 +0100 Subject: [PATCH] Configure iterative deepening time with command line --- src/game.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/game.py b/src/game.py index fcb72b6..673cce7 100755 --- a/src/game.py +++ b/src/game.py @@ -63,12 +63,26 @@ def parse_aguments(): type=bool, default=True, ) + + parser.add_argument('-bt', '--black-player-deepening-time', + help='Time interval in seconds for Iterative Deepening - black player', + type=int, + default=10, + ) + + parser.add_argument('-wt', '--white-player-deepening-time', + help='Time interval in seconds for Iterative Deepening - black player', + type=int, + default=10, + ) + parser.add_argument('--weight', help='Weight table for weight based heuristic engines', type=int, nargs=4, default=[-5, 2, 10,25] ) + parser.add_argument('--show-weights-table', help='Display weight table used in \'weight\' and \'full\' heuristic calculation and exit', action='store_true', @@ -144,7 +158,7 @@ if __name__ == '__main__': ), { 'depth': args.white_depth_exploration, - 'time_limit': 10, + 'time_limit': args.white_player_deepening_time, 'randomize_moves': args.white_randomize_moves } ) @@ -159,7 +173,7 @@ if __name__ == '__main__': ), { 'depth': args.black_depth_exploration, - 'time_limit': 10, + 'time_limit': args.black_player_deepening_time, 'randomize_moves': args.black_randomize_moves } )