Fixed fuzzy logic algorithm

Added preistion of set and grid