{"id":10908,"date":"2019-08-09T09:00:59","date_gmt":"2019-08-09T13:00:59","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=10908"},"modified":"2019-08-09T17:59:08","modified_gmt":"2019-08-09T21:59:08","slug":"maze","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2019\/08\/09\/maze\/","title":{"rendered":"Maze"},"content":{"rendered":"<p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/76890\">Will<\/a>&#8216;s pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/6705-maze\">Maze<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/35425-rodney-meyer\">Rodney Meyer<\/a>.<\/p>\n<p>This simple submission is surprisingly effective at providing hours of diversion. From the command line, you call the maze function with arguments specifying dimensions and the maze pattern. The pattern (which can be horizontal, vertical, , checkerboard, spiral, burst, or random) influences the layout of a two-dimensional maze. A red diamond represents your pencil. You use the arrow keys to move your cursor through the maze from the upper left to bottom right. A timer lets you know how long it takes to complete the maze.<\/p>\n<p><center><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/will_campbell\/potw_maze2\/maze_01.png\" alt=\"First Maze\" \/><\/center>It turns out that I&#8217;m not so good with mazes but I kept at it. After several attempts on a smaller maze, I finally did respectably.<\/p>\n<p><center><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/will_campbell\/potw_maze2\/maze_02.png\" alt=\"Nailed it!\" \/><\/center>One person commented that the mazes were too simple. I ask them to try and solve this 120&#215;160 maze!<\/p>\n<p><center><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/will_campbell\/potw_maze2\/maze_03.png\" alt=\"I dare you\" \/><\/center>A couple further comments. One is that this submission was uploaded way back in 2005&#8230;and it still runs! The function only has a dozen warnings from the code analyzer. That&#8217;s some solid programming. So if you&#8217;re still out there, Rodney, I tip my hat to you. Now if you&#8217;re looking for a more recent take on labyrinths, check out <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/70451-amaze-a-maze-generator\">this submission<\/a> by the creator of MATLAB himself, Cleve Moler.<\/p>\n<p>Let us know what you think <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=10908#respond\">here<\/a> or leave a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/6705-maze#comments\">comment<\/a> for Rodney.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/will_campbell\/potw_maze2\/maze_01.png\" onError=\"this.style.display ='none';\" \/><\/div>\n<p>Will&#8216;s pick this week is Maze by Rodney Meyer.<br \/>\nThis simple submission is surprisingly effective at providing hours of diversion. From the command line, you call the maze function with arguments&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2019\/08\/09\/maze\/\">read more >><\/a><\/p>\n","protected":false},"author":45,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[15],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/10908"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=10908"}],"version-history":[{"count":5,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/10908\/revisions"}],"predecessor-version":[{"id":10920,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/10908\/revisions\/10920"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=10908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=10908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=10908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}