Main Page   Files   Productions   Problem Spaces   Operators   Goal Hierarchy   Groups   Prod. By Type   Todo   All  


move-block.soar

move-block.soar [src]

Go to the documentation for this file...

00001 
00002 
00003 ##!
00004 # @file
00005 # @brief Rules for proposing to "move a block".
00006 #
00007 # We consider two cases determined by the 'below' and 'on' relations, namely moving
00008 # a block to the table and moving a block to another block.
00009 
00010 ##!
00011 # @operator move-block
00012 # @brief Generated by SoarDoc from dmgen
00013 # 
00014 # <img src="state-space.png" title="move-block state space" alt=""
00015 #   style="width: 662px; height: 522px;">
00016 # 
00017 # @problem-space any-ps
00018 
00019 
00020 ##!
00021 # @production propose*move-block*to-block
00022 # @brief 
00023 #
00024 # @desc <blockquote><i>
00025 #   <p>A block may be plonked on top of another block if both blocks are clear.</p>
00026 #   <p>This rule corresponds to ? CSP rules - ??? </p>
00027 #   </i></blockquote> 
00028 # @problem-space any-ps
00029 # @operator move-block
00030 # @type proposal
00031 
00032 sp {propose*move-block*to-block
00033    (state <s> ^block <block> {<> <block> <dest>})
00034    (<block> ^name <a> ^below o)
00035    (<dest>  ^name <b> ^below o)
00036 -->
00037    (<s> ^operator <o> + =)
00038    (<o> ^name move-block
00039         ^block <a>
00040         ^destination <b>)}
00041 
00042 ##!
00043 # @production propose*move-block*to-table
00044 # @brief 
00045 #
00046 # @desc <blockquote><i>
00047 #   <p>A block may be plonked onto the table if it is clear. We also insist that it is not
00048 #   already on the table! This obviates us having to consider applying a redundant
00049 #   action - without this constraint our implementation cannot implement the
00050 #   operator as there is no block beneath it to update! ;-(
00051 #   </p>
00052 #   <p>This rule corresponds to ? CSP rules - ??? </p>
00053 #   </i></blockquote>
00054 # @problem-space any-ps
00055 # @operator move-block
00056 # @type proposal
00057 
00058 sp {propose*move-block*to-table
00059    (state <s> ^block <block>)
00060    (<block> ^name <a> ^on <> table ^below o)
00061 -->
00062    (<s> ^operator <o> + =)
00063    (<o> ^name move-block
00064         ^block <a>
00065         ^destination table)
00066 }
00067 
00068 ##!
00069 # @production selection*dont-move*in-place
00070 # @brief common-sence - try not to move "in-place" blocks!
00071 #
00072 # @desc<blockquote><i>
00073 #   It's probably a bad idea to move a block that is "in-place"!
00074 #   </i></blockquote>
00075 # @problem-space any-ps
00076 # @operator move-block
00077 # @type selection
00078 
00079 sp {selection*dont-move*in-place
00080    (state <s> ^operator <o> +)
00081    (<o> ^name move-block ^block <n>)
00082    (<s> ^block <b>)
00083    (<b> ^name <n> ^in-place)
00084 -->
00085    (<s> ^operator <o> <)}

Generated with SoarDoc on Mon Jan 24 15:38:47 2005 by richard