This work investigates the way humans plan their paths in a goal-directed motion, assuming that a person acts as an optimal controller that plans the path minimizing a certain (unknown) cost function. Taking this viewpoint, the problem can be formulated as an inverse optimal control one, i.e., starting from control and state trajectories one wants to figure out the cost function used by a person while planning the path. The so-obtained model can be used to support the design of safe humanrobot interaction systems, as well as to plan human-like paths for humanoid robots. To test the envisaged ideas, a set of walking paths of different volunteers were recorded using a motion capture facility. The collected data were used to compare two solutions to the inverse optimal control problem coming from the literature to a novel one. The obtained results, ranked using the discrete Fréchet distance, show the effectiveness of the proposed approach.