#include "blocks_main.h" #include #include #include #include #include using namespace std; int main(void){ int move_counter =0; int init =1; int init2=1; int bottom1 = 2; int bottom2 = 3; int stack1_top =0; int stack2_top=0; int stack1_length = 4; int stack2_length = 3; int iTable=0; //set up arrays to hold our values char blocks_stack1[5]; char blocks_stack2[5]; char table_stack[10]; char final_stack1[5]; char final_stack2[5]; char temp_stack1[5]; char temp_stack2[5]; //set up the example problem blocks_stack1[0]= 'F'; blocks_stack1[1]= 'C'; blocks_stack1[2]= 'A'; blocks_stack1[3]= 'G'; blocks_stack2[0]= 'D'; blocks_stack2[1]= 'B'; blocks_stack2[2]= 'E'; final_stack1[0] = 'D'; final_stack1[1] = 'A'; final_stack1[2] = 'G'; final_stack2[0] = 'C'; final_stack2[1] = 'F'; final_stack2[2] = 'B'; final_stack2[3] = 'E'; cout<<"Hueristic 1"<= 0 || bottom2 >= 0) { for(int i=0; i < 10; i++) { if(final_stack1[bottom1]==table_stack[i]) { temp_stack1[bottom1] = table_stack[i]; table_stack[i] = NULL; cout<=0 || bottom2>=0) { //check first stack against final 1st if(blocks_stack1[stack1_top] == final_stack1[bottom1]) { temp_stack1[bottom1] = blocks_stack1[stack1_top]; cout<= stack2_length) { table_stack[iTable] = blocks_stack1[stack1_top]; cout< stack1_length) { table_stack[iTable] = blocks_stack2[stack2_top]; cout<