ai_utils/search/frontier.py
def contains_state(self, state: any):
        """ Checks if the frontier contains a specific state.

        Args:
            state: current state of a node.

        Returns:
            True if any of the nodes in the frontier have equal state,
            False if none of the nodes in the frontier have equal state
        """
        # check if any of the nodes in the frontier have the same
        return any(node.state == state for node in self.frontier)
 Checks if the frontier contains a specific state.

        Args:
            state: current state of a node.

        Returns:
            True if any of the nodes in the frontier have equal state,
            False if none of the nodes in the frontier have equal state
        
Checks if the frontier contains a specific state.
Checks if the frontier contains a specific state .
def contains_state(self, state: any):
        return any(node.state == state for node in self.frontier)
def contains_state ( self , state : any ) : return any ( node . state == state for node in self . frontier )
Checks if the frontier contains a specific state.
Checks if the frontier contains a specific state .
""" Checks if the frontier contains a specific state.

        Args:
            state: current state of a node.

        Returns:
            True if any of the nodes in the frontier have equal state,
            False if none of the nodes in the frontier have equal state
        """ # check if any of the nodes in the frontier have the same
True if any of the nodes in the frontier have equal state,
False if none of the nodes in the frontier have equal state
True if any of the nodes in the frontier have equal state False if none of the nodes in the frontier have equal state
self
state
any
current state of a node.
current state of a node .