title: Using uniform cost search on a matrix in python
body: <p>Good day, I have an 11x11 matrix (shown below) where the 0s represent open spaces and the 1s represent walls. The horizontal and vertical movements are weighted at 1 and the diagonal movements are weighted at sqrt(2) The matrix looks as follows:</p>
  
  <pre><code> `board = [[0,0,0,0,0,0,0,0,0,0,0,0],
             [0,0,0,0,0,1,1,1,0,1,1,0],
             [0,1,0,0,0,0,1,1,0,1,1,0],
             [0,1,1,0,0,0,0,0,0,1,1,0],
             [0,1,1,1,0,0,0,0,0,1,1,0],
             [0,1,1,1,1,0,0,0,0,1,1,0],
             [0,1,1,1,1,1,1,1,1,1,1,0],
             [1,1,1,1,1,1,1,1,1,1,1,0],
             [0,0,0,0,0,0,0,0,0,0,1,0],
             [0,0,0,0,0,0,0,0,0,0,1,0],
             [0,0,1,1,1,1,1,1,1,1,1,0],
             [0,0,0,0,0,0,0,0,0,0,0,0]]`
  </code></pre>
  
  <p>My goal is to write a Uniform cost search code in python to find the most cost effective path from a starting point (e.g [1,1]) to an end point (e.g [5,1]). Most of the code I have come across works with graphs and not matrices. I need help with working around this with a matrix.</p>
  
  <p>I am fairly new at python and all help and advice will be highly appreciated. I am using python 3.</p>