planning with certainty search_problem __init__(selfself planning_problem planning_problem self start action_instance("start"self finish action_instance("finish" def is_goal(selfnode)return node agenda =[ def start_node(self)constraints {(self startself finish)agenda [(gself finishfor in self planning_problem goal items()return pop_node([self start,self finish]constraintsagenda[the neighbors method is coroutine that enumerates the neighbors of given node stripspop py -(continued def neighbors(selfnode)"""enumerates the neighbors of node""self display( ,"finding neighbors of\ ",nodeif node agendasubgoal,act node agenda[ self display( ,"selecting",subgoal,"for",act new_agenda node agenda[ :for act in node actionsif (self achieves(act subgoaland self possible((act ,act ),node constraints))self display( ,reusing",act consts self add_constraint((act ,act ),node constraintsnew_clink (act ,subgoal,act new_cls node causal_links [new_clinkfor consts in self protect_cl_for_actions(node actions,consts ,new_clink)yield arc(nodepop_node(node actions,consts ,new_agenda,new_cls)cost= for in self planning_problem prob_domain actions# is an action if self achieves( subgoal)# acheieves subgoal new_a action_instance( self display( ,using new action",new_anew_actions node actions [new_aconsts self add_constraint((self start,new_a),node constraintsconsts self add_constraint((new_a,act ),consts new_agenda new_agenda [(pre,new_afor pre in preconds items()new_clink (new_a,subgoal,act version june