| Algorithm 2 Selecting a Similar Set Based on Energy Cost |
|
Input: States s Output: Similar set of s 1: Create a empty stack 2: while do 3: a is the action that pops from the head of state s 4: if then 5: Clear the stack 6: else 7: Push a to the stack 8: end if 9: end while 10: Measure the length of the and mark it as l 11: 12: 13: while do 14: Select from 15: executing Line 1 to Line 10 with 16: if then 17: 18: 19: else 20: 21: end if 22: end while 23: Return |