com.thesett.aima.search.util.backtracking.PostFixBacktrackingSearch 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.
/*
* 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.util.backtracking;
import com.thesett.aima.search.spi.QueueSearchAlgorithm;
/**
* Implements a post-fix ordered search. This is done by passing a FIFO stack to the {@link BaseQueueSearch}
* implementation in combination with the 'peek at head' flag. The use of the peek at head flag ensures that successor
* nodes are examined before parent nodes, resulting in a post-fix ordering of the search.
*
* This type of search is not usefull on unbounded state spaces, because the leaf nodes will never be reached. It is
* possible for it to be usefull on an unbounded state space when used in combination with a bound. The effect of this
* type of search, is to reach out to the edge of the available state space and then to work back in to the starting
* point.
*
*
CRC Card
* Responsibilities Collaborations
* Do a post-fix ordered search.
*
*
* @author Rupert Smith
*/
public class PostFixBacktrackingSearch© 2015 - 2025 Weber Informatics LLC | Privacy Policy