Hexagon grid shortest path weighted tiles : <p>I'm not a programmer by trade (Chemical Engineer) but I'm working on some hobby code for a kid's science Olympics. </p>

<p>Essentially, there is a Catan like (hexagonal) board with different tiles (8 types) with a start tile and end tile. Movement has no cost but moving through a tile incurs the tile's cost (example: moving to the tile A would incur a cost of 2). you can move in 6 directions through the sides of the hexagon (you don't ride the edge like Catan).</p>

<p>The goal of the game is to get the lowest score for your path at the end.</p>

<p><strong>What I've researched and tried</strong></p>

<p>So far I've tried to code a shortest path algorithm using matlab and dijkstra. However, I'm finding I have to do a lot of work because there are 250 nodes and each require 6 exiting lines that are weighted. I don't know how to place these nodes in a space and essentially say, "alright, you're worth X amount and can travel to any adjacent space" without manually coding each line. </p>

<p>FWIW i'm using matlab and was trying to adapt <a href="http://www.mathworks.com/matlabcentral/fileexchange/20025-dijkstra-s-minimum-cost-path-algorithm" rel="nofollow">this code</a> but am struggling on populating the table for E3 and V, less so V but mostly an easy way to say "okay, here are the tiles that are worth X."</p>

<p>Thanks in advance,</p>
