Human-like planning for humans and humanoids