Minneapolis LabVIEW User Group

Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.

Maze Solver: Coding Challenge for 12/11/18 Q4 User Group

Hi All, 

 

We heard your feedback last user group and we're back with a fun coding challenge: A Maze Solver!

 

The goal is simple: Navigate from the Blue starting point to the Red ending point without crossing any walls. Do it any way you want, and be as creative as you want. One idea to get you started interpreting the mazes is below: 

 

Read JPEG as 2D Array of Pixels.png

 

 

See the attachments for two mazes you can solve. 

Post any questions you have and we will respond as soon as we can.

 

Have fun!

Will
CLA, CLED, CTD, CPI
LabVIEW Champion
Choose Movement Consulting
choose-mc.com
Message 1 of 6
(1,016 Views)
5 REPLIES

Re: Maze Solver: Coding Challenge for 12/11/18 Q4 User Group

To present your solution to the mazes, use any method that lets us visualize it. Some ideas include: 

  • Picture control
  • 2D array
  • Text with fixed width font (Courier)
  • Your idea here
Will
CLA, CLED, CTD, CPI
LabVIEW Champion
Choose Movement Consulting
choose-mc.com
0 Kudos
Message 2 of 6
(1,013 Views)

Re: Maze Solver: Coding Challenge for 12/11/18 Q4 User Group

Maze 1 looks like it has some blue pixels in areas that aren't part of the starting line. This complicates finding the starting position. Attached is a picture where each blue pixel is circled in green. There are at least 2 blue pixels near the end of the maze.

 

I can work around it, but I'd rather spend more time maze finding and less time double-checking the starting zone. Maybe if it was a PNG instead of a JPG?

 

 

0 Kudos
Message 3 of 6
(959 Views)

Re: Maze Solver: Coding Challenge for 12/11/18 Q4 User Group

I figured out my blue pixel problem for maze 1 (by screening for value as well as hue). There are still blue pixels on maze 2, though, in the coordinate axis in the lower left. Some of them are actually bluer than the starting area.

 

Again, not insurmountable, but a little awkward.

0 Kudos
Message 4 of 6
(951 Views)

Re: Maze Solver: Coding Challenge for 12/11/18 Q4 User Group

You may want to consider groups of hex values rather than hue/saturation/luminosity, or even RGB, to find the start and end of the mazes.

 

But to your point - yes, the JPG compression appears to have smeared the colors so they are not as clearly defined as they could be. Let's consider it part of the challenge - work your way towards using JPGs provided by your phone.

Will
CLA, CLED, CTD, CPI
LabVIEW Champion
Choose Movement Consulting
choose-mc.com
0 Kudos
Message 5 of 6
(904 Views)
Highlighted

Re: Maze Solver: Coding Challenge for 12/11/18 Q4 User Group

Also, feel free to use your own mazes if you prefer. Or start there and then adapt your solution to the mazes I posted.

Will
CLA, CLED, CTD, CPI
LabVIEW Champion
Choose Movement Consulting
choose-mc.com
0 Kudos
Message 6 of 6
(900 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.