blob: d7fafbf3b5912882cfab64b18889e78e168b5318 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
"""Create decision algorithms"""
from imago.data.enums import DecisionAlgorithms
from imago.engine.monteCarlo import MCTS
from imago.engine.keras.keras import Keras
def create(algorithm, move):
"""Creates an instance of the requested algorithm."""
if algorithm == DecisionAlgorithms.MONTECARLO:
return MCTS(move)
if algorithm == DecisionAlgorithms.KERAS:
return Keras(move)
if algorithm == DecisionAlgorithms.DENSE\
or algorithm == DecisionAlgorithms.CONV:
return Keras(move, algorithm)
else:
return MCTS(move)
|