Configure iterative deepening time with command line
This commit is contained in:
parent
f927aa1462
commit
2bcfc96ea0
1 changed files with 16 additions and 2 deletions
18
src/game.py
18
src/game.py
|
@ -63,12 +63,26 @@ def parse_aguments():
|
||||||
type=bool,
|
type=bool,
|
||||||
default=True,
|
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',
|
parser.add_argument('--weight',
|
||||||
help='Weight table for weight based heuristic engines',
|
help='Weight table for weight based heuristic engines',
|
||||||
type=int,
|
type=int,
|
||||||
nargs=4,
|
nargs=4,
|
||||||
default=[-5, 2, 10,25]
|
default=[-5, 2, 10,25]
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument('--show-weights-table',
|
parser.add_argument('--show-weights-table',
|
||||||
help='Display weight table used in \'weight\' and \'full\' heuristic calculation and exit',
|
help='Display weight table used in \'weight\' and \'full\' heuristic calculation and exit',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
|
@ -144,7 +158,7 @@ if __name__ == '__main__':
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
'depth': args.white_depth_exploration,
|
'depth': args.white_depth_exploration,
|
||||||
'time_limit': 10,
|
'time_limit': args.white_player_deepening_time,
|
||||||
'randomize_moves': args.white_randomize_moves
|
'randomize_moves': args.white_randomize_moves
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -159,7 +173,7 @@ if __name__ == '__main__':
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
'depth': args.black_depth_exploration,
|
'depth': args.black_depth_exploration,
|
||||||
'time_limit': 10,
|
'time_limit': args.black_player_deepening_time,
|
||||||
'randomize_moves': args.black_randomize_moves
|
'randomize_moves': args.black_randomize_moves
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue