****************************************************************************


   Name       : Dinh Dang
   Email addr : dnd@wolf.cs.washington.edu
   Account    : c473bj

----------------------------------------------------------------------------
   Domain     : tailoring-sc   ('tailoring' is the old domain which has no
                                 control rules.)


----------------------------------------------------------------------------
1a) Prodigy is not good at the following aspects:

    -- Efficiency use of fabric:

         In the real world, a tailor always try to make a garment with
       as less fabric as possible.  He/she does this by laying all the
       paper patterns on the fabric such as follows:



                  The drawing (by hand, please see the printout)



         It is impossible to write prodigy code to handle this properly.


    -- Two-dimension problem:

         If the start state has only one big piece of fabric instead
       of different required fabric parts, it will be very difficult to
       represent the shape and size of the remaining fabric after one
       part of the garment, say, the pocket is cut form the original fabric.


                 The drawing (by hand, please see the printout)



    -- Abstract aspect 1:

         Prodigy knows the sequence of steps to be taken to sew a T-shirt 
       or a shirt-with-collar, but it does not guaranteed that they are
       the best-looking garments.

    -- Abstract aspect 2:

         There are uncountable number of T-shirt styles and shirt-with-collar
       styles.  For example, if there are two collar styles, then they will 
       make the two shirt-with-collars look different.  It is easy to tell
       Prodigy about this difference, but if there are  n  collar styles,
       it is too much work to tell Prodigy all these n differences.

      
       
-----------------------------------------------------------------------------
1b) It took me quite a long time to think of a way to represent the fabric
    and its size in Prodigy.  I spent quite a long time to 'shop' around
    the directory c473/prodigy/domains, and finally have some inspiration
    from the domain 'machining.' I found that it is not realistic to start
    with a big piece of fabric for the reasons mentioned in (1a), so I
    chose to ask prodigy to model different fabric parts.  Fortunately,
    the basic fabric parts required to make a T-shirt and a shirt-with-collar
    are not a lot.  Some of the basic fabric parts of the T-shirt and the 
    shirt-with-collar overlap.  For example, both the T-shirt and the
    shirt-with-collar require a left-sleeve and a right-sleeve.


    I would say that the way I chose to represent the fabric parts has made
    my life easy in encoding this domain.  It also contribute to the simple
    coding in the domain.

    In addition, the control rules are easy to code also.  This is because
    I need only to deal with goal ordering.



--------------------------------------------------------------------------------
1c) Useful features in Prodigy:

    -- Unification, pattern recognition.
    -- The program is very readable.  This is made possible by using
       meaningful operator, predicate, and variable names.
    -- The search control rules are powerful.  They are easy to encode (at least
       in my domain) and really increase prodigy's problem solving ability.
    -- The Tracing and Analysis facilities provided ease a great deal the
       debugging task.

--------------------------------------------------------------------------------
1d) Modification/Addition to Prodigy: 

       I would make prodigy (if possible) to be more generous to
    non static generators because they are very often needed.  For example,
    in this domain, the generator for the size of the fabric is non static,
    but it is necessary to do so.


-------------------------------------------------------------------------------
2)  All the control rules in the file ~c473bj/my-domains/tailoring-sc/sc-rules
    are thoroughly documented.
 
    All the control rules deal with the goal ordering problems in the domain.
    Some examples are:
    
    -- The original domain 'tailoring' will solve the problem with the goal
       states

           (T-shirt)
           (with-option POCKET FRONT)           

       in 1280 nodes.
   
       The modified domain 'tailoring-sc' will solve this problem in 36 nodes.

    -- The original domain 'tailoring can not solve the problem with the goal
       states


           (shirt-with-collar)
           (with-embroidery RED COLLAR)
           (tag-attached-at BACK)
           (with-buttons 1 GREEN)
  
       in less than 2500 nodes.  This is because the goal (shirt-with-collar)
       should be subgoaled on after the goals (with-embroidery ...) and 
       (tag-attached ...) are satisfied.

       The modified domain 'tailoring-sc' will solve this problem in 80 nodes.




    
    
    
  
