The segmentation fault was arising due to a flaw in design related to maxim_val. When maxim_val was getting negative then the revised value of 0.3*maxim_val was showing a value bigger than original maxim_val, hence all the nodes in root->array[z] were getting cleared and this resulted to a segmentation fault as the vic_shell had nothing to point to, except it's marker value 200.
Now the program is free from any kind of bug, but more logical solutions and algorithms are still needed in the AI.
In future XBoard may be added to provide a better experience.