Skip to content

Instantly share code, notes, and snippets.

@OneRaynyDay
Created November 24, 2014 01:25
Show Gist options
  • Save OneRaynyDay/fb4dfae0fd88ae519550 to your computer and use it in GitHub Desktop.
Save OneRaynyDay/fb4dfae0fd88ae519550 to your computer and use it in GitHub Desktop.
Optimization Game Plan
graph - have graph of each individual color
greedy algorithm
Start at the lowest result from # of orbs calculated w/ the distance - hardest combo to make.
longest path algorithm - djikstra's backward
find localized solutions as the answer goes towards the solution
LBHRLB
HRRGRR
BDHHGR
HRHDRG
DDLHDL
# of orbs: 3-----------------------------------------------Calculate distance(long)
B B
B
# of orbs: 4-----------------------------------------------Calculate distance(long)
L L
L L
# of orbs: 7-----------------------------------------------Calculate distance(medium)
H
H
HH
H H
H
# of orbs: 7-----------------------------------------------Calculate distance(pretty close)
R
RR RR
R
R
# of orbs: 5-----------------------------------------------Calculate distance(pretty close)
D
D
DD D
# of orbs: 3-----------------------------------------------Calculate distance(close af)
G
G
G
------------------------------------------------------------------------------------------------
calculate shortest path from 1 of the orbs from hardest combo to combo the easiest combo
2nd easiest
3rd easiest
etc
until last one
=============================================================================================
Plan 2 - brute force - using computer to select the orbs themselves and hardcode moving orbs so efficiency
can be determined on the fly
go from bottom up - spot shortest path algorithm to the bottom left row -> then shortest path algorithm to bottom right row
then 2nd bottom left row -> then shortest path 2nd bottom right row -> up until there are no more solutions(2 or less orbs)
will modify previous combos (locked in).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment