Rework options, now can be defined per player
This commit is contained in:
parent
1c039106d9
commit
c3ac347364
2 changed files with 31 additions and 15 deletions
|
@ -6,7 +6,10 @@ class PlayerEngine:
|
|||
# init logger do display informations
|
||||
self.logger = logger
|
||||
self.options = options
|
||||
self.logger.info("Init engine {}".format(self.__class__.__name__))
|
||||
self.logger.info("Init engine {}, options:{}".format(
|
||||
self.__class__.__name__,
|
||||
self.options
|
||||
))
|
||||
|
||||
def get_move(self, board):
|
||||
self.logger.info("engine: {} - player:{}".format(
|
||||
|
@ -155,7 +158,6 @@ class AlphabetaPlayerEngine(PlayerEngine):
|
|||
leafs = 0
|
||||
if depth == 0 :
|
||||
leafs +=1
|
||||
self.logger.debug("option: {}".format(self.options))
|
||||
if self.options['heuristic'] == 'weight':
|
||||
score = ReversiHeuristic(self.logger).get(board)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue