140 likes | 225 Views
Plan Adaptation In Darmok System . A. Atta. Unit Adaptation . Find the most similar unit to the one used in the case for this particular basic action. How..?!. Unit Adaptation . Find the most similar unit to the one used in the case for this particular basic action. How..?!
E N D
Plan AdaptationIn Darmok System A. Atta
Unit Adaptation • Find the most similar unit to the one used in the case for this particular basic action. • How..?!
Unit Adaptation • Find the most similar unit to the one used in the case for this particular basic action. • How..?! • Use Euclidean Distance between the unit specified in the action and all units in the map according to : • Owner • Type • Position (x, y) • hit-points • Status ( idle, moving, attacking, etc.)
Coordinate Adaptation • The coordinates in the current map may don’t have the same nature as the area referred to in the retrieved action. • So how the can be adapted..?
Coordinate Adaptation • The coordinates in the current map may don’t have the same nature as the area referred to in the retrieved action. • So how the can be adapted..? • Look in the current map for a spot that is the most similar to the 7x7 window around the specified coordinates in the retrieved action.
Structural Plan Adaptation • Plan Dependency Graph Generation. • Removal of unnecessary actions. • Adaptation for unsatisfied preconditions.
Plan Dependency Graph Generation • Take the success conditions of the root of the plan. • Find the direct sub-plans (actions contribute to the achievement of these success conditions) • All direct sub-plans are added to the plan dependency graph. • Analyze the preconditions of each of these direct sub-plans. • Let B1 be an action in the plan which contributes to satisfying the preconditions of a direct sub-plan D1. Then, it adds B1 to the plan dependency graph and forms a directed edge from B1 to D1. • This is done for each of the direct sub-plans. Further this is repeated for each of the actions which are added to the graph.
precondition-success condition matcher • A simple rule-based ps-matcher that incorporates a collection of rules for the appropriate condition matching. • In some cases it is not clear whether a relation exists or not. However it is necessary to capture all of the dependencies, even if some non- existing dependencies are included.
Removal of unnecessary actions • The algorithm works by maintaining a set of active actions A • At the end of the algorithm, all the actions not in A will be removed from the plan. • Each of these actions p with unsatisfied success conditions is added to the list of active actions. • Check The set of actions B0 on which the action p has a dependency. • Such actions are obtained using the function GetParentActions • The result of this process is a set A. Actions that are not active (not in A) are removed from the plan.
Adaptation for unsatisfied preconditions • Each unsatisfied condition is associated with a corresponding satisfying goal. • For each unsatisfied precondition, a satisfying goal is obtained, using the function GetSatisfyingGoal. • A parallel plan q is generated where each satisfying goal can be achieved in parallel. • q is inserted as the first step of plan p.