![JAR search and dependency download from the Maven repository](/logo.png)
com.thesett.aima.search.QueueBasedSearchMethod Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of search Show documentation
Show all versions of search Show documentation
Search code developed from 'Artificial Intelligence a Modern Approach', Prentice Hall.
The newest version!
/*
* Copyright The Sett Ltd, 2005 to 2014.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.thesett.aima.search;
import com.thesett.common.util.logic.UnaryPredicate;
/**
* Interface for any class that implements a search method. A search method is an object that discovers a
* {@link SearchNode} that corresponds to a goal state.
*
*
CRC Card
* Responsibilities
* Calculate a {@link SearchNode} corresponding to a goal state.
* Attach a repeated state filtering strategy to a search algorithm.
* Set up the start states for a search.
* Set a maximum number of search steps allowable.
* Reset a search algorithm.
*
*
* @author Rupert Smith
* @todo Add more methods to this interface to make monitoring/controlling searches in progress possible. A running
* search should be capable of generating events, for when the search is started, completes, and for each step
* taken. A listener may be attached to this event model to monitor search progress, or to stop/restart searches
* at the single step granularity. Heuristic searches should report their heuristic evaluations as events on
* each step. For example in an A* search, search progress could be monitored by the ratio of cost/f as an
* approximation of the percent complete.
* @todo Usually a heuristic assumes a goal state, or gets it from the state. Allowing goal predicates to be set in
* the search algorithm means that they will have to be passed to the heuristic for consideration too. Also if
* there are multiple goals, what should the heuristic calculate? the estimated cost to the nearest one? Might
* need to think about how the goal predicate is comunicated to heuristics. One way to do his might be to
* parameterize the heuristic over goal predicates, and perform a check at the start of the search to ensure
* that the goal predicate being used matches the one the heuristic works with.
*/
public interface QueueBasedSearchMethod© 2015 - 2025 Weber Informatics LLC | Privacy Policy