This paper presents a new method called Transition-based RRT (T-RRT) for path planning problems in continuous cost spaces. It combines the exploration strength of the RRT algorithm that rapidly grow random trees toward unexplored regions of the space, with the efficiency of stochastic optimization methods that use transition tests to accept or to reject a new potential state. This planner also relies on the notion of minimal work path that gives a quantitative way to compare path costs. The method also integrates self tuning of a parameter controlling its exploratory behavior. It yields to solution paths that efficiently follow low cost valleys and the saddle points of the cost space. Simulation results show that the method can be applied to a large set of applications including terrain costmap motions or planning low cost motions for free flying or articulated robots.