All Downloads are FREE. Search and download functionalities are using the official Maven repository.

APT.all-test.default.simple.soar Maven / Gradle / Ivy

## -*- Mode: sde -*-
##
############################# -*- Mode: Soar -*- #############################
## 
## File            : default/simple.soar
## Author          : John Laird
## Created on      : Mon Feb 27 16:15:34 1989  
## Last Modified By:  
## Last Modified On: 28 Sep 1999, 12:40:13
## 
## Contents:     Simple Default productions for Soar 8.1
##
###############################################################################
##
## Significant Changes made to Convert to Soar 8.1
##    Removed names on top state (top-state, top-goal).
##    Causes problems with other default rules
###
###
###		7.1	Default knowledge for the top context
###

## Elaborate every substate with io pointer.

sp {default*elaborate*state*io
   "Elaborate each substate with io pointer."
   :default
   (state  ^impasse no-change
              ^superstate.io )
   -->
   ( ^io )}

## Elaborate a state with the name of the superoperator

sp {elaborate*state*operator*name
   "Elaborate substates with name of operator."
   :default
   (state  ^superstate.operator.name )
-->
   ( ^name )}

### Propose wait for a state no-change

sp {top-ps*propose*wait
   "Propose wait if there is a state no-change."
   :default
   (state  ^attribute state
              ^choices none
             -^operator.name wait)
-->
   ( ^operator  + <)
   ( ^name wait)}

### This avoids a operator no-change after wait is selected
### I've included it just to keep the trace simple - it never fires

sp {top-ps*apply*wait*random
   "Fake production just to avoid extra operator no-change."
   :default
   (state  ^operator )
   ( ^name wait)
-->
   ( ^random elaboration)}

sp {default*top-goal*halt*operator*failure
   "Halt if no operator can be selected for the top goal."
   :default
   (state  ^superstate nil)
   (state  ^impasse constraint-failure ^superstate )
   -->
   (write (crlf) |No operator can be selected for top goal.| )
   (write (crlf) |Soar must halt.| )
   (halt)}

sp {default*select*indifferent-and-worst*tied
   "Indifferent an object if it leads to a tie that can not be resolved."
   :default
   (state  ^operator  +)
   (state  ^superstate 
	         ^item 
	         ^quiescence t)
   (state  ^attribute state
	         ^choices none
	         ^superstate 
	         ^quiescence t)
   -->
   ( ^operator  =, < )}

### If the problem space for handling the subgoal fails, signified by 
### the choices none impasse below it, make a reject-preference for each 
### conflicted object.

sp {default*select*reject*conflict
   "Reject an object if it leads to a conflict that can not be resolved."
   :default
   (state  ^operator  +)
   (state  ^impasse conflict
	         ^attribute operator
	         ^superstate 
	         ^item 
	         ^quiescence t)
   (state  ^attribute state
	         ^choices none
	         ^superstate 
	         ^quiescence t)
   -->
   ( ^operator  -)}