This is a brief summary of the global variables and functions in FF. Refer to the comments in the code for more details. Overview -------- FF internally represents a grounded version of the planning problem. This implies that all possible (reachable) ground facts and ground actions are precomputed. Indeed, there is a unique index associated to any fact and any action of a planning task. In addition, FF converts the planning problem to a STRIPS representation. For each conditional operator in the planning domain, FF associates a non-empty set of STRIPS actions. In the FF implementation operators are referred to as "op" and a strips action as an "ef". The name for the latter is rather confusing, as it suggests "effect". So beware, an "ef" is always a strips *action*. In a planning task that is already a STRIPS task, there is only one "ef" associated to every "op". Relevant data structures/variables ================================== Operators (ops) --------------- Description: operators have a number of possible strips actions (efs). Data structure/variables: - data structure for operators, defined by the struct _OpConn (ff.h:869). - stored in global variable gop_conn[] - there number of operators is stored in the global variable gnum_op_conn STRIPS actions (efs) -------------------- Descriptions: Strips actions for each operator. Data structure/variables: - data structure defined in ff.h:893 - stored in global variabel geff_conn[] (size= gnum_ef_conn) Elements: - contains the following arrays with facts * preconditions (PC) (size= num_PC) * added facts (A) (size= num_A) * deleted facts (D) (size= num_D) * implied efs (I) (size=num_I) The implied efs is only relevant in some planning tasks that are not formulated originally in STRIPS. This is NOT relevant for our assignment because the domains we are dealing with are STRIPS. - there is additional data for relaxed plan extraction: * level: level at which this effect is executable * in_E: whether or not the ef is part of the relaxed plan * num_active_PCs: active preconditions (preconditios that have already been achieved) - in_plan: whether or not the effect is part of the current plan Facts ----- Description: atomic facts of the planning problem Data structure/variables: - data structure defined in ff.h:930 - stored in global variabel gft_conn[] (size= gnum_ft_conn) Elements: - PC (size= num_PC): Array of effects that have this fact as a precondition - A (size= num_A): Array of effects that add this fact. - D (size= num_D): Array of effects that delete this fact. Plans ----- While performing the EHC, each time a new better state has been found, the chunk of actions that were used to reach such a state is stored in the gplan_ops[] global variable. This is done by the extract_plan_fragment function (search.c:666). Relevant Functions ================== Functions that you will probably have to look into for the assignment are: print_op_name (output.c:701): prints an operator whose index is given as argument. do_enforced_hill_climbing (search.c:154): main EHC search function. Other functions are called by this function. Refer to the code for details. get_1P_and_H (relax.c:111): computes a relaxed plan and returns heuristic value. build_fixpoint (relax.c:339): builds the relaxed graph.