|
|
|
@ -874,8 +874,10 @@ public class MDPSimple extends MDPExplicit implements NondetModelSimple |
|
|
|
minmax += mdpRewards.getStateReward(s); |
|
|
|
// If strategy generation is enabled, store optimal choice |
|
|
|
if (strat != null & !first) { |
|
|
|
// Only remember strictly better choices (required for max) |
|
|
|
if (strat[s] == -1 || (min && minmax < vect[s]) || (!min && minmax > vect[s])) { |
|
|
|
// For max, only remember strictly better choices |
|
|
|
if (min) { |
|
|
|
strat[s] = stratCh; |
|
|
|
} else if (strat[s] == -1 || minmax > vect[s]) { |
|
|
|
strat[s] = stratCh; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -925,8 +927,10 @@ public class MDPSimple extends MDPExplicit implements NondetModelSimple |
|
|
|
minmax += mdpRewards.getStateReward(s); |
|
|
|
// If strategy generation is enabled, store optimal choice |
|
|
|
if (strat != null & !first) { |
|
|
|
// Only remember strictly better choices (required for max) |
|
|
|
if (strat[s] == -1 || (min && minmax < vect[s]) || (!min && minmax > vect[s])) { |
|
|
|
// For max, only remember strictly better choices |
|
|
|
if (min) { |
|
|
|
strat[s] = stratCh; |
|
|
|
} else if (strat[s] == -1 || minmax > vect[s]) { |
|
|
|
strat[s] = stratCh; |
|
|
|
} |
|
|
|
} |
|
|
|
|