| int tuneValueFire = 27; |
| real bestFitness; |
| for each cell |
| //tune for fire event |
| real currentFitness = . //calculate the cell's fitness value |
| While (tuneValueFire >0) |
| Find the fitness when add the temperature value by tuneValueFire |
| Find the fitness when subtract the temperature value by tuneValueFire |
| Find the fitness when add the mass value by tuneValueFire |
| Find the fitness when subtract the mass value by tuneValueFire |
| Find the fitness when add the damage value by tuneValueFire |
| //try both add and subtract for all parameters of fire chromosomes |
| |
| |
| if (the best fitness value (compared to currentFitness) is found from the tuning |
| trial results above) |
| select a modification that causes such fitness |
| commit changes according to the selected modification |
| else |
| tuneValueFire = tuneValueFire; |
| |
| // end while |
| // end for each cell |