def __init__(self): SettingLoader.__init__(self) # Declaration of class objects self.game_controller = None self.player_controller = None self.settings = None self.game_pipe_send = None self.game_pipe_receive = None self.player_pipe_receive = None self.player_pipe_send = None self.player_loop = None
def __init__(self): SettingLoader.__init__(self) Communicator.__init__(self) self.space_subdivisions = 10 self.actions = None self.action_list = None self.states = None self.init_state = None self.ind2state = None self.state2ind = None self.alpha = 0 self.gamma = 0 self.episode_max = 300
def __init__(self, headless=True): SettingLoader.__init__(self) Communicator.__init__(self) # self.show_every_n_episodes = 10 self.headless = headless if not self.headless: super().__init__() self.jellys = {} self.p1_rl_model = None self.king_fish = None self.state2ind = None self.ind2state = None self.actions = None self.allowed_moves = None self.actions2ind = None # ? self.exploration = True self.policy = None self.episode_len_count = 0 self.episode_len = None self.game_over = False # Create class variables and set default values self.king_fish = None self.fishes = {} # Dictionary of fishes self._cnt_steps = 0 # Count of the number of steps taken so far self.move_x = [] # Next moves of the fishes in the x axis self.move_y = [] # Next moves of the fishes in the y axis self.action = "stay" # Actions received from player self.time = 0 # Seconds since start self.total_time = 60 # Total time of the game self.player = None self.time_board = None # Time board widget # PID of the player loop in order to be able to kill it when the game is over self.player_loop_pid = None self.models = None self.update_scheduled = None self.timer_scheduled = None self.space_subdivisions = 10 self.frames_per_action = 10 self.fishderby = None # Main widget of the game self.n_jelly = 0 if not self.headless: Builder.load_file('main.kv')
def __init__(self): App.__init__(self) SettingLoader.__init__(self) Communicator.__init__(self, receiver_threshold=constants.STEP_TIME_THRESHOLD) # Create class variables and set default values self.fishes = {} # Dictionary of fishes self._cnt_steps = 0 # Count of the number of steps taken so far self.move_x = [] # Next moves of the fishes in the x axis self.move_y = [] # Next moves of the fishes in the y axis self.time = 0 # Seconds since start self.total_time = 60 # Total time of the game self.players = [] # Players list self.main_widget = None # Main widget of the game self.time_board = None # Time board widget # PID of the player loop in order to be able to kill it when the game is over self.player_loop = None self.observations_sequence = None self.models = None self.update_scheduled = None self.timer_scheduled = None self.frames_per_action = 10
def __init__(self): SettingLoader.__init__(self) Communicator.__init__(self)