Main Page Files Productions Problem Spaces Operators Goal Hierarchy Groups Prod. By Type Todo All
blocks_world/
initialise.soar
[src]
Go to the documentation for this file...
00001 00002 ##! 00003 # @production propose*initialise 00004 # @brief Initialise the (internalised) Blocks World problem space. 00005 # 00006 # @desc <blockquote><i> 00007 # Propose to initialise the system... 00008 # </i></blockquote> 00009 # @problem-space any-ps 00010 # @type proposal 00011 00012 sp {propose*initialise 00013 (state <s> ^name blocks_world 00014 -^initialised) 00015 --> 00016 (<s> ^operator <o>) 00017 (<o> ^name initialise)} 00018 00019 00020 ##! 00021 # @production apply*initialise 00022 # @brief Initialise the (internalised) Blocks World problem space. 00023 # 00024 # @desc <blockquote><i> 00025 # This rule sets up the initial state of the blocks and the goal state, 00026 # i.e. it creates the initial "block" structures, after which we may begin 00027 # proposing the block movements and solve the problem. 00028 # </i></blockquote> 00029 # @problem-space any-ps 00030 # @type operator-application 00031 00032 sp {apply*initialise 00033 (state <s> ^operator.name initialise) 00034 --> 00035 (<s> ^initialised yes) 00036 # Initial State 00037 (<s> ^block <a> <b> <c>) 00038 (<a> ^name a ^on table ^below o) 00039 (<b> ^name b ^on table ^below o) 00040 (<c> ^name c ^on table ^below o) 00041 (write (crlf) |Initial state has A, B & C on the table.|) 00042 # Goal State 00043 (<s> ^goal <g>) 00044 (<g> ^block <ga> <gb> <gc>) 00045 (<ga> ^name a ^on b ^below o) 00046 (<gb> ^name b ^on c ^below a) 00047 (<gc> ^name c ^on table ^below b) 00048 (write (crlf) |The goal is to get A on B on C on the table.|)} 00049 00050