-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
44 lines (39 loc) · 955 Bytes
/
main.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from random_player import Random
from minimax import Minimax
from play_game import play_game, play_games
from qlearning import QLearning
from mcts import Mcts
from human import Human
from qneural import QNeural
from abpruning import ABPruning
from torch.nn import MSELoss
human = Human()
tree = Mcts()
minimax = Minimax()
random = Random()
ab_pruning = ABPruning()
# tree.train()
# x_learning = QLearning()
# o_learning = QLearning()
#
#
# neural = QNeural(MSELoss())
#
# neural.train(1)
# play_games(1000, neural, random)
# play_games(1000, neural, minimax)
# play_game(human, ab_pruning)
# play_game(ab_pruning, human)
play_games(1000, ab_pruning, random)
play_games(1000, random, ab_pruning)
play_games(1, minimax, ab_pruning)
play_games(1, ab_pruning, minimax)
# neural.games = 0
# neural.train(2)
#
# play_games(1000, neural, random)
# play_games(1000, random, neural)
#
#
# play_games(1000, neural, minimax)
# play_games(1000, minimax, neural)