Esempio n. 1
0
    def create(self):

        kwargs = {'board_size': 19, 'komi': 6.5, 'handicap': 0}
        bot_settings = BOTS[self._bot_config]
        kwargs.update(bot_settings)

        if bot_settings['bot_type'] == 'leela':
            return LeelaCLI(**kwargs)

        elif bot_settings['bot_type'] == 'leela-zero':
            return LeelaZeroCLI(**kwargs)
Esempio n. 2
0
    def factory(self):

        kwargs = {'board_size': self.board_size,
                  'komi': self.komi,
                  'handicap': self.handicap}
        bot_settings = BOTS[self._bot_config]
        kwargs.update(bot_settings)

        if bot_settings['bot_type'] == 'leela':
            return LeelaCLI(**kwargs)

        elif bot_settings['bot_type'] == 'leela-zero':
            return LeelaZeroCLI(**kwargs)