This document describes the flower pollination algorithm (FPA), a nature-inspired metaheuristic algorithm for optimization problems. It contains the basic components of FPA implemented in a demo program for single objective optimization of unconstrained functions. FPA mimics the pollination process of flowers, where pollen can be transported over long distances by insects or animals, and reproduced by local pollination among neighboring flowers of the same species. The demo program initializes a population of solutions, evaluates their fitness, and then iteratively updates the solutions using either long distance global pollination or local pollination until a maximum number of iterations is reached.