Esempio n. 1
0
def copy(wm):
    WmCopy = WorldModel()
    for i in range(8):
        for j in range(8):
            WmCopy.board[i][j].is_empty = wm.board[i][j].is_empty
            WmCopy.board[i][j].is_white = wm.board[i][j].is_white
    WmCopy.white_team_name = wm.white_team_name
    WmCopy.black_team_name = wm.black_team_name
    WmCopy.my_color = wm.my_color
    return WmCopy
Esempio n. 2
0
    def __init__(self, episodeNum, enableGui=False):
        self.episode_num = episodeNum
        self.is_gui_enable = enableGui
        if self.is_gui_enable:
            self.gui = GUI(enableGui)
        self.wm = WorldModel()
        if self.is_gui_enable:
            self.gui.set_world_model(self.wm)

        self.Q = {}
        self.num_of_is_near_wall = 0
        self.num_of_success_repeat = 0
        self.num_of_pointless_tries = 0

        self.load_learned_data()
Esempio n. 3
0
 def __init__(self, enableAiPlayer):
     self.gui = GUI(enableAiPlayer=enableAiPlayer)
     self.wm = WorldModel()
     self.gui.set_world_model(self.wm)
     self.running = True
Esempio n. 4
0
 def __init__(self):
     self.wm = WorldModel()
     self.conn = Connection()