-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.py
26 lines (20 loc) · 874 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from src.processing.load_dataframe import load_dataframe
from src.search.mcts.mcts import MCTSTree
import time
import wandb
if __name__ == '__main__':
hyperparameters_default = {
'exploration': 100,
'n_simulations': 300000
}
wandb.init(project='searchalgosportsteam', entity='searchalgosports',
config=hyperparameters_default)
config = wandb.config
empty_positions = ['PG','SG','SF','PF','C','F','G','UTIL']
dataframe = load_dataframe('2021_03_12_slate.csv', empty_positions)
budget = 50000
mcts_tree = MCTSTree(dataframe, empty_positions, budget, exploration=config.exploration)
start = time.time()
best_node = mcts_tree.run(config.n_simulations)
print(f'Best config found in {time.time()-start:.1f}s: {best_node} with value {best_node.value}')
wandb.log({'best_lineup_score': best_node.value})