(self, states)
return actions[0] if num_states == 1 else actions
returns action(s),
            - if states contains only a single state then we return the optimal action as an integer,
            - if states contains an array of states then we return the optimal action for each state of the array
returns action(s),
            - if states contains only a single state then we return the optimal action as an integer,
            - if states contains an array of states then we return the optimal action for each state of the array
returns action ( s ) - if states contains only a single state then we return the optimal action as an integer - if states contains an array of states then we return the optimal action for each state of the array
def get_action(self, states):
        """
        returns action(s),
            - if states contains only a single state then we return the optimal action as an integer,
            - if states contains an array of states then we return the optimal action for each state of the array
        """
        states = states.reshape(-1, 4, self.height, self.width)
        num_states = states.shape[0]
        actions = self.session.run(self.a, {self.state: states})
        return actions[0] if num_states == 1 else actions
def get_action ( self , states ) : states = states . reshape ( - 1 , 4 , self . height , self . width ) num_states = states . shape [ 0 ] actions = self . session . run ( self . a , { self . state : states } ) return actions [ 0 ] if num_states == 1 else actions