# Search modes ## Heuristic A*, Greedy and Beam search all use the following heuristic to select candidates to expand on the next layer of the graph $$mult(n) = \begin{cases} 4 &\text{if $n$ is a neutron star} \\\\ 1.5 &\text{if $n$ is a white dwarf star} \\\\ 1 &\text{otherwise} \end{cases} $$ $$d(a,b) = \sqrt{(a_x-b_x)^2+(a_y-b_y)^2+(a_z-b_z)^2}$$ $$ h(\text{node},\text{goal})= \max( d(\text{node},\text{goal})- ( \text{range}*mult(\text{node}) ),0) $$ potential new heuristic: $$ h(\text{node},\text{next},\text{goal})= 1 - {\cos^{-1}(|(\text{next}-\text{node})| \cdot |(\text{goal}-\text{node})|)\over\pi} $$