mlpy.experiments.task.SearchTask¶
-
class
mlpy.experiments.task.SearchTask(initial_states, terminal_states=None, env=None)[source]¶ Bases:
mlpy.experiments.task.EpisodicTaskThe abstract class for a search task definition.
Parameters: initial_states : str or State or list[str or State]
List of possible initial states.
terminal_states : str or State or list[str or State]
List of terminal states.
env : Environment, optional
The environment in which the agent performs the task.
Attributes
event_delayEvent delay. is_episodicIdentifies if the task is episodic or not. Methods
get_path_cost(c, _)Returns the cost for the current path. get_reward(state, action)Retrieve the reward. get_successor(state)Find valid successors. is_complete()Check if the task has completed. random_initial_state()Return a random initial state. request_termination(value)Request termination of the task. reset(t, **kwargs)Reset the task. sensation(**kwargs)Gather the state feature information. terminate(value)Set the termination flag. termination_requested()Check if termination was requested.