Exemple #1
0
int get_1P_and_H( State *S, State *current_goals, int new_goal )

{

  int h, max;

  source_to_dest( &lgoals, current_goals );  
  if ( new_goal != -1 ) {
    lnew_goal = TRUE;
  } else {
    lnew_goal = FALSE;
  }
  
  gevaluated_states++;

  max = build_fixpoint( S );
  h = extract_1P( max, TRUE );

  if ( gcmd_line.display_info == 122 ) {
    print_fixpoint_result();
  }

  reset_fixpoint();

  return h;

}
Exemple #2
0
int get_1P( State *S, State *current_goals ) {
    
    int h, max;
    
    source_to_dest( &lcurrent_goals, current_goals );
    
    if ( gcmd_line.display_info >= 1 ) {
        printf("\nDebugInfo: in function get_1P.\n the lcurrent_goals is: \n");
        print_state(lcurrent_goals);
    }

    gevaluated_states++;
    
    max = build_fixpoint( S );
    h = extract_1P( max, FALSE );
    
    if ( gcmd_line.display_info == 122 ) {
        print_fixpoint_result();
    }
    
    reset_fixpoint();
    
    return h;
    
}
Exemple #3
0
/*get he heuristic data*/
int get_1P_and_H( State *S, State *current_goals ) {
    
    int h, max;
    
    source_to_dest( &lcurrent_goals, current_goals );
    
    gevaluated_states++;
    
    max = build_fixpoint( S );
    h = extract_1P( max, TRUE );
    
    if ( gcmd_line.display_info == 122 ) {
        print_fixpoint_result();
    }
    
    reset_fixpoint();
    
    return h;
}
Exemple #4
0
/*get he heuristic data*/
int get_1P_and_H_for_multiple_purpose ( State *S, State *current_goals ) {

    int h, max;

    source_to_dest( &lcurrent_goals, current_goals );

    gevaluated_states++;

    max = build_fixpoint( S );
    h = extract_1P_for_multiple_purpose ( max, TRUE );

    if ( gcmd_line.display_info >= 1 ) {
        printf("\nDebugInfo: extract_1P_for_multiple_purpose get heuristic: %4d\n", h);
    }

    if ( gcmd_line.display_info == 122 ) {
        print_fixpoint_result();
    }

    reset_fixpoint();

    return h;
}