ai-se / softgoals

1 stars 4 forks source link

Dialog operator #4: (hard) cost twiddling #95

Closed timm closed 7 years ago

timm commented 8 years ago

i'm just making this one up as i type but i am trying to use an optimizer to find what cost ranges are important/dull. so feel free to change the following

replace all cost numbers with triangular distributions with mode=current, min = half_mode, max=twice_mode. divide the triangular range in to seven chunks from min to max.

now run an MOEA that mutates the cost values then runs all your current rig as a sub-routine (looking to max goals, min sub-goals, min cost (i think))

then cluster the output based on pca over goals, sup-goals decisions.

then report the cost differences seen in each cluster


p.s. how to use a random number from a random distribution. found at http://www.codeproject.com/Articles/32654/Monte-Carlo-Simulation. not sure i believe it but it looks mosty sane. looks the same as p37 of http://goo.gl/RwJ36V.

public static double triangular(double  Min,double  Mode,double  Max) { 
    //   Declarations
     double  R=0.0;
    //   Initialise
    Random r = new Random();
     R = r.NextDouble();       //between 0.0 and 1.0 gaussian
    //    Triangular
    if ( R == (( Mode -  Min) / ( Max -  Min)))
    {
        return  Mode;
    }
    else if ( R < (( Mode -  Min) / ( Max -  Min)))
    {
        return  Min + Math.Sqrt( R * ( Max -  Min) * ( Mode -  Min));
    else
    {
        return  Max - Math.Sqrt((1 -  R) * ( Max -  Min) * ( Max -  Mode));
    }
}
sei-jklein commented 8 years ago

My understanding of this: The clustering will show how total cost (and other objectives) varies as node costs are twiddled.

We would interpret a single tight cluster to mean that node cost does not really contribute to the total. Multiple clusters would mean some modal behavior - the result flips between N stable points.

I'm not sure what we do with that information.

sei-jklein commented 8 years ago

Another thought - in any discussion of cost, the estimate is usually the minimum cost, not average.

If we do any cost twiddling, it should go from: min = specified cost max = 2x specified cost

bigfatnoob commented 8 years ago

@timm 1) Currently I select the leaf nodes in the model as my independent variable(decision) for my MOEA(DE in this case). I can change the cost values(in the triangular function) for the decisions now and experiment, but does that mean I now assume all my decisions are always selected and I change their costs?

2) Since the model does not have any conflicts in them, does this not imply that always the min cost for the node would be selected since we are trying to minimize the cost?

timm commented 8 years ago

see also #101

bigfatnoob commented 8 years ago

Clusters

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Here is what i did 1) Assign cost and benefit for each node using a triangular function. 2) Run an MOEA to select the best solution for each objective. 3) Repeat steps 1 and 2 a 100 times. 4) Cluster the best solutions selected on costs, benefits, soft-goals and decisions used. 5) Stats of each cluster is reported in the hyperlink table above

timm commented 8 years ago

so much information. i'm going to dive into a whole till friday (DSE paper due and am going slow on rahul's paper)