The paper presents a new meta-heuristics for solving continuous optimization problems of finding a global optimum. The algorithm is based on the behavior of a specific animal species. The main inspiration for this method was a flock of sheep, which after consuming the grass in a certain area, starts to search for new sources of food when the local sources are depleted. A special penalty function to enforce that kind of behavior is proposed. The penalty function together with a gradient-based optimization algorithm became a mechanism for avoiding local maximums and for more thorough exploration of the set of feasible solutions. The comparison with the basic genetic algorithm is presented.