initial prisoner path calculation