Class Parameters
Class intended to provide the grounding to establish the parameters required to search for a solution to a puzzle by abstractly implementing the IParameters interface. It is recommended that custom parameter classes inherit from this class.
Implements
Namespace: TreeProblemFramework.Solver
Constructors
Parameters()
Initializes a new instance of the Parameters class.
Declaration
protected Parameters()
Properties
HeuristicPriority
Gets or sets the priority to determine which environments to expand the first based on their heuristic values.
Declaration
public Priority HeuristicPriority { get; set; }
Property Value
| Type | Description |
|---|---|
| Priority | The heuristic priority. |
SetSolutionsAsNotSeen
Gets or sets a value indicating whether a solution, once found, should be set as not seen. This allows for finding a same solution that is reached through different paths.
Declaration
public bool SetSolutionsAsNotSeen { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True if set solutions as not seen, false if not. |
TraverseAlgorithm
Gets or sets the algorithm to be used in order to find a solution to a puzzle.
Declaration
public Algorithm TraverseAlgorithm { get; set; }
Property Value
| Type | Description |
|---|---|
| Algorithm | The search algorithm. |
Methods
ComputeHeuristic(IEnvironment)
Method that calculates the heuristic of a given environment against the solution.
Declaration
public abstract double ComputeHeuristic(IEnvironment env)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnvironment | env | The environment from which to compute its heuristic value. |
Returns
| Type | Description |
|---|---|
| System.Double | The heuristic value. |
ComputeSummary(IEnvironment)
Calculates the summary, which should be unique, of a given environment.
Declaration
public abstract string ComputeSummary(IEnvironment env)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnvironment | env | The environment from which to compute its summary. |
Returns
| Type | Description |
|---|---|
| System.String | An string representation of the environment's summary. |