planning with certainty and is ( )( returns false note that the underscore ('is part of the namehere we use it as the convention that it is function that returns function this uses two different styles to define is and if returning function defined by lambda is equivalent to returning the embedded functionexcept that the embedded function has name the embedded function can also be given docstring stripscspplanner py -(continued def is_(val)"""returns function that is true when it is it applied to val ""#return lambda xx =val def is_fun( )return =val is_fun __name__ "value_is_"+str(valreturn is_fun def if_( , )"""if the second argument is the first argument must be ""#return lambda , == if == else true def if_fun( , )return == if == else true if_fun __name__ "if is "+str( )+then is "+str( return if_fun def eq_if_not_in_(actset)"""first and third arguments are equal if action is not in actset""return lambda ax == if not in actset else true def eq_if_not_fun( ax )return == if not in actset else true eq_if_not_fun __name__ "first and third arguments are equal if action is not in "+str(actsetreturn eq_if_not_fun putting it togetherthis returns list of actions that solves the problem prob for given horizon if you want to do more than just return the list of actionsyou might want to get it to return the solution or even enumerate the solutions (by using search with ac from cspstripscspplanner py -(continued def con_plan(prob,horizon)"""finds plan for problem prob given horizon ""csp csp_from_strips(probhorizonsol con_solver(cspsolve_one(return csp extract_plan(solif sol else sol the following are some example queries stripscspplanner py -(continued from searchgeneric import searcher version june