We present LPG, a fast planner using local search for solving planning graphs. LPG can use various heuristics based on a parametrized objective function. These parameters weight different types of inconsistencies in the partial plan represented by the current search state, and are dynamically evaluated during search using Lagrange multipliers. LPG’s basic heuristic was inspired by Walksat, which in Kautz and Selman’s Blackbox can be used to solve the SAT-encoding of a planning graph. An advantage of LPG is that its heuristics exploit the structure of the planning graph, while Blackbox relies on general heuristics for SAT-problems, and requires the translation of the planning graph into propositional clauses. Another major difference is that LPG can handle action costs to produce good quality plans. This is achieved by an "anytime" process minimizing an objective function based on the number of inconsistencies in the partial plan and on its overall cost. The objective function can also take into account the number of parallel steps and the overall plan duration. Experimental results illustrate the efficiency of our approach showing, in particular, that for a set of well-known benchmark domains LPG is significantly faster than existing Graphplan-style planners.