- Control Network
- Introduction to CN
- Parameters and Variables
- Static Options
- Dynamic Options
Control Network (CN)
Control Network is one of the most important element of CNP. Others are primitives. Control network consists of one or more subnets. These subnets have states that are connected each other with arrows. These arrows have functions that are called primitives When control of the program moves one state to other, corresponding primitives are executed.
In CNP there are different type of states. Each state is used for different purpose.
- Normal State
- Initial State
- Finish State
- Return State
- Stop State
- Select State
- Order State
- Range State
Another features of the control network is static and dynamic options. These options gives extra control over subnets. Here is the list of the options
- One Visit
- Arrow cost
- Max path cost
- Range order
- Order of arrows
- Number of Arrows
Parameters and Variables
Every subnet can has own parameters and variables. Values of variables and parameters can be changed through primitives. They should be given to primitives as parameters.
The code below shows textual definition of subnets above.
Normal state is the basic state in Control Network. It has no additional purpose.
Finish state is the last state for search process. When it is reached it means one solution is found. If SOLUTIONS options is equal to 1 program is terminated after one solution is found. Otherwise program use its backtrack mechanism to find different solution paths.
When a subnet call another subnet, Return state is used to go back to caller subnet. If current subnet is not invoked by another subnet, this state act like Finish state.
When this state is reached there could not be a solution path that is extension of current path. Also this state does not allow to control to progress.
This state is used to select outgoing arrows. For selection, evaluations of outgoing arrows should be equal to “Selector”, but with PROXIMITY option it able to give a tolerance value.
This state is used to order outgoing arrows. “Selector” variable is used to decide to order. Selection is made according to heuristic values of outgoing arrows. Closest heuristic value to “Selector” decides the order.
This state is used to select outgoing arrows according to their heuristic values within specific range. Range is determined with “Lo” (low) and “Hi” (high) parameters. There are two versions of this state. First one is without “ELSE” clause. When there is no arrow in the range, backtracking is implemented. Second one is with “ELSE” clause. In this version “ELSE” arrow is applied if no arrows found in the given range.
SOLUTIONS option specify maximum number of solutions to be found. Default value of this option is 1. Other values can be ALL, ASK, unsigned integer.
BACKTRACKING option disables or enables backtracking mechanism. Default value of this option is YES (backtracking is allowed). Other value can be NO (backtracking is not allowed).
ONEVISIT option specifies if multiple entries into a node (within a recursive level) are allowed. Default value of this option is NO. Other value can be YES.
LOOPS option sets maximum number of repeated visits to a node in the current path. Default value of this option is ANY. Other values can be any unsigned integer.
RECURSION option sets maximum number of repeated invocations of a subnet. Default value of this option is ANY. Other values can be any unsigned integer.
ARROWCOST option specify all arrows cost in scope. Default value for this option is 1. Other values can be any constant or variable real value.
MAXPATHCOST option specifies maximum cost of the path. Any arrow that exceeds the cost will fail. Default value for this option is ANY. Other values can be any constant or variable real value.
RANGEORDER option is used with state Range to order arrows within the given range.
ORDEROFARROWS option specifies order of the arrows that emanating from a state. Default value for this option is NO. This means all arrows examined in predefined order. Other value is RANDOM.
PROXIMITY option is used to give a tolerance value to absolute difference between evaluations and “Selector”.
NUMBEROFARROWS option specifies maximum number of attempting arrows from a state. Default value for this option is ANY. Other values can be constant or variable integer value.